1 /** 2 * This file is part of the mingw-w64 runtime package. 3 * No warranty is given; refer to the file DISCLAIMER within this package. 4 */ 5 6 #include <winapifamily.h> 7 8 #ifndef _WINUSER_ 9 #define _WINUSER_ 10 11 #include <_mingw_unicode.h> 12 #include <apisetcconv.h> 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 #ifndef WINVER 19 #define WINVER 0x0502 20 #endif 21 22 #include <_mingw.h> 23 #include <stdarg.h> 24 #include <guiddef.h> 25 26 #ifndef NOAPISET 27 #include <libloaderapi.h> 28 #endif 29 30 #ifndef NOUSER 31 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 32 typedef HANDLE HDWP; 33 typedef VOID MENUTEMPLATEA; 34 typedef VOID MENUTEMPLATEW; 35 typedef PVOID LPMENUTEMPLATEA; 36 typedef PVOID LPMENUTEMPLATEW; 37 38 __MINGW_TYPEDEF_AW(MENUTEMPLATE) 39 __MINGW_TYPEDEF_AW(LPMENUTEMPLATE) 40 41 typedef LRESULT (CALLBACK *WNDPROC)(HWND,UINT,WPARAM,LPARAM); 42 #endif 43 44 #ifdef STRICT 45 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 46 typedef INT_PTR (CALLBACK *DLGPROC) (HWND, UINT, WPARAM, LPARAM); 47 #endif 48 49 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 50 typedef VOID (CALLBACK *TIMERPROC) (HWND, UINT, UINT_PTR, DWORD); 51 typedef WINBOOL (CALLBACK *GRAYSTRINGPROC) (HDC, LPARAM, int); 52 typedef WINBOOL (CALLBACK *WNDENUMPROC) (HWND, LPARAM); 53 typedef LRESULT (CALLBACK *HOOKPROC) (int code, WPARAM wParam, LPARAM lParam); 54 typedef VOID (CALLBACK *SENDASYNCPROC) (HWND, UINT, ULONG_PTR, LRESULT); 55 56 typedef WINBOOL (CALLBACK *PROPENUMPROCA) (HWND, LPCSTR, HANDLE); 57 typedef WINBOOL (CALLBACK *PROPENUMPROCW) (HWND, LPCWSTR, HANDLE); 58 59 typedef WINBOOL (CALLBACK *PROPENUMPROCEXA) (HWND, LPSTR, HANDLE, ULONG_PTR); 60 typedef WINBOOL (CALLBACK *PROPENUMPROCEXW) (HWND, LPWSTR, HANDLE, ULONG_PTR); 61 62 typedef int (CALLBACK *EDITWORDBREAKPROCA) (LPSTR lpch, int ichCurrent, int cch, int code); 63 typedef int (CALLBACK *EDITWORDBREAKPROCW) (LPWSTR lpch, int ichCurrent, int cch, int code); 64 65 typedef WINBOOL (CALLBACK *DRAWSTATEPROC) (HDC hdc, LPARAM lData, WPARAM wData, int cx, int cy); 66 #endif 67 #else 68 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 69 typedef FARPROC DLGPROC; 70 #endif 71 72 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 73 typedef FARPROC TIMERPROC; 74 typedef FARPROC GRAYSTRINGPROC; 75 typedef FARPROC WNDENUMPROC; 76 typedef FARPROC HOOKPROC; 77 typedef FARPROC SENDASYNCPROC; 78 79 typedef FARPROC EDITWORDBREAKPROCA; 80 typedef FARPROC EDITWORDBREAKPROCW; 81 82 typedef FARPROC PROPENUMPROCA; 83 typedef FARPROC PROPENUMPROCW; 84 85 typedef FARPROC PROPENUMPROCEXA; 86 typedef FARPROC PROPENUMPROCEXW; 87 88 typedef FARPROC DRAWSTATEPROC; 89 #endif 90 #endif 91 92 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 93 __MINGW_TYPEDEF_AW(PROPENUMPROC) 94 __MINGW_TYPEDEF_AW(PROPENUMPROCEX) 95 __MINGW_TYPEDEF_AW(EDITWORDBREAKPROC) 96 97 #ifdef STRICT 98 typedef WINBOOL (CALLBACK *NAMEENUMPROCA) (LPSTR, LPARAM); 99 typedef WINBOOL (CALLBACK *NAMEENUMPROCW) (LPWSTR, LPARAM); 100 typedef NAMEENUMPROCA WINSTAENUMPROCA; 101 typedef NAMEENUMPROCW WINSTAENUMPROCW; 102 typedef NAMEENUMPROCA DESKTOPENUMPROCA; 103 typedef NAMEENUMPROCW DESKTOPENUMPROCW; 104 #else 105 typedef FARPROC NAMEENUMPROCA; 106 typedef FARPROC NAMEENUMPROCW; 107 typedef FARPROC WINSTAENUMPROCA; 108 typedef FARPROC WINSTAENUMPROCW; 109 typedef FARPROC DESKTOPENUMPROCA; 110 typedef FARPROC DESKTOPENUMPROCW; 111 #endif 112 113 __MINGW_TYPEDEF_AW(WINSTAENUMPROC) 114 __MINGW_TYPEDEF_AW(DESKTOPENUMPROC) 115 #endif 116 117 #define IS_INTRESOURCE(_r) ((((ULONG_PTR)(_r)) >> 16)==0) 118 #define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i)))) 119 #define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i)))) 120 #define MAKEINTRESOURCE __MINGW_NAME_AW(MAKEINTRESOURCE) 121 122 #ifndef NORESOURCE 123 #define RT_CURSOR MAKEINTRESOURCE(1) 124 #define RT_BITMAP MAKEINTRESOURCE(2) 125 #define RT_ICON MAKEINTRESOURCE(3) 126 #define RT_MENU MAKEINTRESOURCE(4) 127 #define RT_DIALOG MAKEINTRESOURCE(5) 128 #define RT_STRING MAKEINTRESOURCE(6) 129 #define RT_FONTDIR MAKEINTRESOURCE(7) 130 #define RT_FONT MAKEINTRESOURCE(8) 131 #define RT_ACCELERATOR MAKEINTRESOURCE(9) 132 #define RT_RCDATA MAKEINTRESOURCE(10) 133 #define RT_MESSAGETABLE MAKEINTRESOURCE(11) 134 135 #define DIFFERENCE 11 136 #define RT_GROUP_CURSOR MAKEINTRESOURCE ((ULONG_PTR) (RT_CURSOR) + DIFFERENCE) 137 #define RT_GROUP_ICON MAKEINTRESOURCE ((ULONG_PTR) (RT_ICON) + DIFFERENCE) 138 #define RT_VERSION MAKEINTRESOURCE(16) 139 #define RT_DLGINCLUDE MAKEINTRESOURCE(17) 140 #define RT_PLUGPLAY MAKEINTRESOURCE(19) 141 #define RT_VXD MAKEINTRESOURCE(20) 142 #define RT_ANICURSOR MAKEINTRESOURCE(21) 143 #define RT_ANIICON MAKEINTRESOURCE(22) 144 #define RT_HTML MAKEINTRESOURCE(23) 145 #ifdef RC_INVOKED 146 #define RT_MANIFEST 24 147 148 #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 149 #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2 150 #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3 151 #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1 152 #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16 153 #else 154 #define RT_MANIFEST MAKEINTRESOURCE(24) 155 156 #define CREATEPROCESS_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(1) 157 #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(2) 158 #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(3) 159 #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(1) 160 #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(16) 161 #endif 162 #endif 163 164 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 165 #define wvsprintf __MINGW_NAME_AW(wvsprintf) 166 #define wsprintf __MINGW_NAME_AW(wsprintf) 167 168 WINUSERAPI int WINAPI wvsprintfA(LPSTR,LPCSTR,va_list arglist); 169 WINUSERAPI int WINAPI wvsprintfW(LPWSTR,LPCWSTR,va_list arglist); 170 WINUSERAPI int WINAPIV wsprintfA(LPSTR,LPCSTR,...); 171 WINUSERAPI int WINAPIV wsprintfW(LPWSTR,LPCWSTR,...); 172 #endif 173 174 #define SETWALLPAPER_DEFAULT ((LPWSTR)-1) 175 176 #ifndef NOSCROLL 177 #define SB_HORZ 0 178 #define SB_VERT 1 179 #define SB_CTL 2 180 #define SB_BOTH 3 181 182 #define SB_LINEUP 0 183 #define SB_LINELEFT 0 184 #define SB_LINEDOWN 1 185 #define SB_LINERIGHT 1 186 #define SB_PAGEUP 2 187 #define SB_PAGELEFT 2 188 #define SB_PAGEDOWN 3 189 #define SB_PAGERIGHT 3 190 #define SB_THUMBPOSITION 4 191 #define SB_THUMBTRACK 5 192 #define SB_TOP 6 193 #define SB_LEFT 6 194 #define SB_BOTTOM 7 195 #define SB_RIGHT 7 196 #define SB_ENDSCROLL 8 197 #endif 198 199 #ifndef NOSHOWWINDOW 200 #define SW_HIDE 0 201 #define SW_SHOWNORMAL 1 202 #define SW_NORMAL 1 203 #define SW_SHOWMINIMIZED 2 204 #define SW_SHOWMAXIMIZED 3 205 #define SW_MAXIMIZE 3 206 #define SW_SHOWNOACTIVATE 4 207 #define SW_SHOW 5 208 #define SW_MINIMIZE 6 209 #define SW_SHOWMINNOACTIVE 7 210 #define SW_SHOWNA 8 211 #define SW_RESTORE 9 212 #define SW_SHOWDEFAULT 10 213 #define SW_FORCEMINIMIZE 11 214 #define SW_MAX 11 215 216 #define HIDE_WINDOW 0 217 #define SHOW_OPENWINDOW 1 218 #define SHOW_ICONWINDOW 2 219 #define SHOW_FULLSCREEN 3 220 #define SHOW_OPENNOACTIVATE 4 221 222 #define SW_PARENTCLOSING 1 223 #define SW_OTHERZOOM 2 224 #define SW_PARENTOPENING 3 225 #define SW_OTHERUNZOOM 4 226 #endif 227 228 #define AW_HOR_POSITIVE 0x00000001 229 #define AW_HOR_NEGATIVE 0x00000002 230 #define AW_VER_POSITIVE 0x00000004 231 #define AW_VER_NEGATIVE 0x00000008 232 #define AW_CENTER 0x00000010 233 #define AW_HIDE 0x00010000 234 #define AW_ACTIVATE 0x00020000 235 #define AW_SLIDE 0x00040000 236 #define AW_BLEND 0x00080000 237 238 #define KF_EXTENDED 0x0100 239 #define KF_DLGMODE 0x0800 240 #define KF_MENUMODE 0x1000 241 #define KF_ALTDOWN 0x2000 242 #define KF_REPEAT 0x4000 243 #define KF_UP 0x8000 244 245 #ifndef NOVIRTUALKEYCODES 246 247 #define VK_LBUTTON 0x01 248 #define VK_RBUTTON 0x02 249 #define VK_CANCEL 0x03 250 #define VK_MBUTTON 0x04 251 #define VK_XBUTTON1 0x05 252 #define VK_XBUTTON2 0x06 253 #define VK_BACK 0x08 254 #define VK_TAB 0x09 255 #define VK_CLEAR 0x0C 256 #define VK_RETURN 0x0D 257 #define VK_SHIFT 0x10 258 #define VK_CONTROL 0x11 259 #define VK_MENU 0x12 260 #define VK_PAUSE 0x13 261 #define VK_CAPITAL 0x14 262 #define VK_KANA 0x15 263 #define VK_HANGEUL 0x15 264 #define VK_HANGUL 0x15 265 #define VK_JUNJA 0x17 266 #define VK_FINAL 0x18 267 #define VK_HANJA 0x19 268 #define VK_KANJI 0x19 269 #define VK_ESCAPE 0x1B 270 #define VK_CONVERT 0x1C 271 #define VK_NONCONVERT 0x1D 272 #define VK_ACCEPT 0x1E 273 #define VK_MODECHANGE 0x1F 274 #define VK_SPACE 0x20 275 #define VK_PRIOR 0x21 276 #define VK_NEXT 0x22 277 #define VK_END 0x23 278 #define VK_HOME 0x24 279 #define VK_LEFT 0x25 280 #define VK_UP 0x26 281 #define VK_RIGHT 0x27 282 #define VK_DOWN 0x28 283 #define VK_SELECT 0x29 284 #define VK_PRINT 0x2A 285 #define VK_EXECUTE 0x2B 286 #define VK_SNAPSHOT 0x2C 287 #define VK_INSERT 0x2D 288 #define VK_DELETE 0x2E 289 #define VK_HELP 0x2F 290 291 #define VK_LWIN 0x5B 292 #define VK_RWIN 0x5C 293 #define VK_APPS 0x5D 294 #define VK_SLEEP 0x5F 295 #define VK_NUMPAD0 0x60 296 #define VK_NUMPAD1 0x61 297 #define VK_NUMPAD2 0x62 298 #define VK_NUMPAD3 0x63 299 #define VK_NUMPAD4 0x64 300 #define VK_NUMPAD5 0x65 301 #define VK_NUMPAD6 0x66 302 #define VK_NUMPAD7 0x67 303 #define VK_NUMPAD8 0x68 304 #define VK_NUMPAD9 0x69 305 #define VK_MULTIPLY 0x6A 306 #define VK_ADD 0x6B 307 #define VK_SEPARATOR 0x6C 308 #define VK_SUBTRACT 0x6D 309 #define VK_DECIMAL 0x6E 310 #define VK_DIVIDE 0x6F 311 #define VK_F1 0x70 312 #define VK_F2 0x71 313 #define VK_F3 0x72 314 #define VK_F4 0x73 315 #define VK_F5 0x74 316 #define VK_F6 0x75 317 #define VK_F7 0x76 318 #define VK_F8 0x77 319 #define VK_F9 0x78 320 #define VK_F10 0x79 321 #define VK_F11 0x7A 322 #define VK_F12 0x7B 323 #define VK_F13 0x7C 324 #define VK_F14 0x7D 325 #define VK_F15 0x7E 326 #define VK_F16 0x7F 327 #define VK_F17 0x80 328 #define VK_F18 0x81 329 #define VK_F19 0x82 330 #define VK_F20 0x83 331 #define VK_F21 0x84 332 #define VK_F22 0x85 333 #define VK_F23 0x86 334 #define VK_F24 0x87 335 #define VK_NUMLOCK 0x90 336 #define VK_SCROLL 0x91 337 #define VK_OEM_NEC_EQUAL 0x92 338 #define VK_OEM_FJ_JISHO 0x92 339 #define VK_OEM_FJ_MASSHOU 0x93 340 #define VK_OEM_FJ_TOUROKU 0x94 341 #define VK_OEM_FJ_LOYA 0x95 342 #define VK_OEM_FJ_ROYA 0x96 343 #define VK_LSHIFT 0xA0 344 #define VK_RSHIFT 0xA1 345 #define VK_LCONTROL 0xA2 346 #define VK_RCONTROL 0xA3 347 #define VK_LMENU 0xA4 348 #define VK_RMENU 0xA5 349 #define VK_BROWSER_BACK 0xA6 350 #define VK_BROWSER_FORWARD 0xA7 351 #define VK_BROWSER_REFRESH 0xA8 352 #define VK_BROWSER_STOP 0xA9 353 #define VK_BROWSER_SEARCH 0xAA 354 #define VK_BROWSER_FAVORITES 0xAB 355 #define VK_BROWSER_HOME 0xAC 356 #define VK_VOLUME_MUTE 0xAD 357 #define VK_VOLUME_DOWN 0xAE 358 #define VK_VOLUME_UP 0xAF 359 #define VK_MEDIA_NEXT_TRACK 0xB0 360 #define VK_MEDIA_PREV_TRACK 0xB1 361 #define VK_MEDIA_STOP 0xB2 362 #define VK_MEDIA_PLAY_PAUSE 0xB3 363 #define VK_LAUNCH_MAIL 0xB4 364 #define VK_LAUNCH_MEDIA_SELECT 0xB5 365 #define VK_LAUNCH_APP1 0xB6 366 #define VK_LAUNCH_APP2 0xB7 367 #define VK_OEM_1 0xBA 368 #define VK_OEM_PLUS 0xBB 369 #define VK_OEM_COMMA 0xBC 370 #define VK_OEM_MINUS 0xBD 371 #define VK_OEM_PERIOD 0xBE 372 #define VK_OEM_2 0xBF 373 #define VK_OEM_3 0xC0 374 #define VK_OEM_4 0xDB 375 #define VK_OEM_5 0xDC 376 #define VK_OEM_6 0xDD 377 #define VK_OEM_7 0xDE 378 #define VK_OEM_8 0xDF 379 #define VK_OEM_AX 0xE1 380 #define VK_OEM_102 0xE2 381 #define VK_ICO_HELP 0xE3 382 #define VK_ICO_00 0xE4 383 #define VK_PROCESSKEY 0xE5 384 #define VK_ICO_CLEAR 0xE6 385 #define VK_PACKET 0xE7 386 #define VK_OEM_RESET 0xE9 387 #define VK_OEM_JUMP 0xEA 388 #define VK_OEM_PA1 0xEB 389 #define VK_OEM_PA2 0xEC 390 #define VK_OEM_PA3 0xED 391 #define VK_OEM_WSCTRL 0xEE 392 #define VK_OEM_CUSEL 0xEF 393 #define VK_OEM_ATTN 0xF0 394 #define VK_OEM_FINISH 0xF1 395 #define VK_OEM_COPY 0xF2 396 #define VK_OEM_AUTO 0xF3 397 #define VK_OEM_ENLW 0xF4 398 #define VK_OEM_BACKTAB 0xF5 399 #define VK_ATTN 0xF6 400 #define VK_CRSEL 0xF7 401 #define VK_EXSEL 0xF8 402 #define VK_EREOF 0xF9 403 #define VK_PLAY 0xFA 404 #define VK_ZOOM 0xFB 405 #define VK_NONAME 0xFC 406 #define VK_PA1 0xFD 407 #define VK_OEM_CLEAR 0xFE 408 #endif 409 410 #ifndef NOWH 411 412 #define WH_MIN (-1) 413 #define WH_MSGFILTER (-1) 414 #define WH_JOURNALRECORD 0 415 #define WH_JOURNALPLAYBACK 1 416 #define WH_KEYBOARD 2 417 #define WH_GETMESSAGE 3 418 #define WH_CALLWNDPROC 4 419 #define WH_CBT 5 420 #define WH_SYSMSGFILTER 6 421 #define WH_MOUSE 7 422 #define WH_HARDWARE 8 423 #define WH_DEBUG 9 424 #define WH_SHELL 10 425 #define WH_FOREGROUNDIDLE 11 426 #define WH_CALLWNDPROCRET 12 427 428 #define WH_KEYBOARD_LL 13 429 #define WH_MOUSE_LL 14 430 431 #define WH_MAX 14 432 433 #define WH_MINHOOK WH_MIN 434 #define WH_MAXHOOK WH_MAX 435 436 #define HC_ACTION 0 437 #define HC_GETNEXT 1 438 #define HC_SKIP 2 439 #define HC_NOREMOVE 3 440 #define HC_NOREM HC_NOREMOVE 441 #define HC_SYSMODALON 4 442 #define HC_SYSMODALOFF 5 443 444 #define HCBT_MOVESIZE 0 445 #define HCBT_MINMAX 1 446 #define HCBT_QS 2 447 #define HCBT_CREATEWND 3 448 #define HCBT_DESTROYWND 4 449 #define HCBT_ACTIVATE 5 450 #define HCBT_CLICKSKIPPED 6 451 #define HCBT_KEYSKIPPED 7 452 #define HCBT_SYSCOMMAND 8 453 #define HCBT_SETFOCUS 9 454 455 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 456 typedef struct tagCBT_CREATEWNDA { 457 struct tagCREATESTRUCTA *lpcs; 458 HWND hwndInsertAfter; 459 } CBT_CREATEWNDA,*LPCBT_CREATEWNDA; 460 461 typedef struct tagCBT_CREATEWNDW { 462 struct tagCREATESTRUCTW *lpcs; 463 HWND hwndInsertAfter; 464 } CBT_CREATEWNDW,*LPCBT_CREATEWNDW; 465 466 __MINGW_TYPEDEF_AW(CBT_CREATEWND) 467 __MINGW_TYPEDEF_AW(LPCBT_CREATEWND) 468 469 typedef struct tagCBTACTIVATESTRUCT { 470 WINBOOL fMouse; 471 HWND hWndActive; 472 } CBTACTIVATESTRUCT,*LPCBTACTIVATESTRUCT; 473 #endif 474 475 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 476 typedef struct tagWTSSESSION_NOTIFICATION { 477 DWORD cbSize; 478 DWORD dwSessionId; 479 } WTSSESSION_NOTIFICATION,*PWTSSESSION_NOTIFICATION; 480 #endif 481 482 #define WTS_CONSOLE_CONNECT 0x1 483 #define WTS_CONSOLE_DISCONNECT 0x2 484 #define WTS_REMOTE_CONNECT 0x3 485 #define WTS_REMOTE_DISCONNECT 0x4 486 #define WTS_SESSION_LOGON 0x5 487 #define WTS_SESSION_LOGOFF 0x6 488 #define WTS_SESSION_LOCK 0x7 489 #define WTS_SESSION_UNLOCK 0x8 490 #define WTS_SESSION_REMOTE_CONTROL 0x9 491 #define WTS_SESSION_CREATE 0xa 492 #define WTS_SESSION_TERMINATE 0xb 493 494 #define MSGF_DIALOGBOX 0 495 #define MSGF_MESSAGEBOX 1 496 #define MSGF_MENU 2 497 #define MSGF_SCROLLBAR 5 498 #define MSGF_NEXTWINDOW 6 499 #define MSGF_MAX 8 500 #define MSGF_USER 4096 501 502 #define HSHELL_WINDOWCREATED 1 503 #define HSHELL_WINDOWDESTROYED 2 504 #define HSHELL_ACTIVATESHELLWINDOW 3 505 #define HSHELL_WINDOWACTIVATED 4 506 #define HSHELL_GETMINRECT 5 507 #define HSHELL_REDRAW 6 508 #define HSHELL_TASKMAN 7 509 #define HSHELL_LANGUAGE 8 510 #define HSHELL_SYSMENU 9 511 #define HSHELL_ENDTASK 10 512 #define HSHELL_ACCESSIBILITYSTATE 11 513 #define HSHELL_APPCOMMAND 12 514 #define HSHELL_WINDOWREPLACED 13 515 #define HSHELL_WINDOWREPLACING 14 516 #if _WIN32_WINNT >= 0x0602 517 #define HSHELL_MONITORCHANGED 16 518 #endif 519 520 #define HSHELL_HIGHBIT 0x8000 521 #define HSHELL_FLASH (HSHELL_REDRAW|HSHELL_HIGHBIT) 522 #define HSHELL_RUDEAPPACTIVATED (HSHELL_WINDOWACTIVATED|HSHELL_HIGHBIT) 523 524 #define ACCESS_STICKYKEYS 0x0001 525 #define ACCESS_FILTERKEYS 0x0002 526 #define ACCESS_MOUSEKEYS 0x0003 527 528 #define APPCOMMAND_BROWSER_BACKWARD 1 529 #define APPCOMMAND_BROWSER_FORWARD 2 530 #define APPCOMMAND_BROWSER_REFRESH 3 531 #define APPCOMMAND_BROWSER_STOP 4 532 #define APPCOMMAND_BROWSER_SEARCH 5 533 #define APPCOMMAND_BROWSER_FAVORITES 6 534 #define APPCOMMAND_BROWSER_HOME 7 535 #define APPCOMMAND_VOLUME_MUTE 8 536 #define APPCOMMAND_VOLUME_DOWN 9 537 #define APPCOMMAND_VOLUME_UP 10 538 #define APPCOMMAND_MEDIA_NEXTTRACK 11 539 #define APPCOMMAND_MEDIA_PREVIOUSTRACK 12 540 #define APPCOMMAND_MEDIA_STOP 13 541 #define APPCOMMAND_MEDIA_PLAY_PAUSE 14 542 #define APPCOMMAND_LAUNCH_MAIL 15 543 #define APPCOMMAND_LAUNCH_MEDIA_SELECT 16 544 #define APPCOMMAND_LAUNCH_APP1 17 545 #define APPCOMMAND_LAUNCH_APP2 18 546 #define APPCOMMAND_BASS_DOWN 19 547 #define APPCOMMAND_BASS_BOOST 20 548 #define APPCOMMAND_BASS_UP 21 549 #define APPCOMMAND_TREBLE_DOWN 22 550 #define APPCOMMAND_TREBLE_UP 23 551 #define APPCOMMAND_MICROPHONE_VOLUME_MUTE 24 552 #define APPCOMMAND_MICROPHONE_VOLUME_DOWN 25 553 #define APPCOMMAND_MICROPHONE_VOLUME_UP 26 554 #define APPCOMMAND_HELP 27 555 #define APPCOMMAND_FIND 28 556 #define APPCOMMAND_NEW 29 557 #define APPCOMMAND_OPEN 30 558 #define APPCOMMAND_CLOSE 31 559 #define APPCOMMAND_SAVE 32 560 #define APPCOMMAND_PRINT 33 561 #define APPCOMMAND_UNDO 34 562 #define APPCOMMAND_REDO 35 563 #define APPCOMMAND_COPY 36 564 #define APPCOMMAND_CUT 37 565 #define APPCOMMAND_PASTE 38 566 #define APPCOMMAND_REPLY_TO_MAIL 39 567 #define APPCOMMAND_FORWARD_MAIL 40 568 #define APPCOMMAND_SEND_MAIL 41 569 #define APPCOMMAND_SPELL_CHECK 42 570 #define APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE 43 571 #define APPCOMMAND_MIC_ON_OFF_TOGGLE 44 572 #define APPCOMMAND_CORRECTION_LIST 45 573 #define APPCOMMAND_MEDIA_PLAY 46 574 #define APPCOMMAND_MEDIA_PAUSE 47 575 #define APPCOMMAND_MEDIA_RECORD 48 576 #define APPCOMMAND_MEDIA_FAST_FORWARD 49 577 #define APPCOMMAND_MEDIA_REWIND 50 578 #define APPCOMMAND_MEDIA_CHANNEL_UP 51 579 #define APPCOMMAND_MEDIA_CHANNEL_DOWN 52 580 #if _WIN32_WINNT >= 0x0600 581 #define APPCOMMAND_DELETE 53 582 #define APPCOMMAND_DWM_FLIP3D 54 583 #endif 584 585 #define FAPPCOMMAND_MOUSE 0x8000 586 #define FAPPCOMMAND_KEY 0 587 #define FAPPCOMMAND_OEM 0x1000 588 #define FAPPCOMMAND_MASK 0xF000 589 590 #define GET_APPCOMMAND_LPARAM(lParam) ((short)(HIWORD(lParam) & ~FAPPCOMMAND_MASK)) 591 #define GET_DEVICE_LPARAM(lParam) ((WORD)(HIWORD(lParam) & FAPPCOMMAND_MASK)) 592 #define GET_MOUSEORKEY_LPARAM GET_DEVICE_LPARAM 593 #define GET_FLAGS_LPARAM(lParam) (LOWORD(lParam)) 594 #define GET_KEYSTATE_LPARAM(lParam) GET_FLAGS_LPARAM(lParam) 595 596 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 597 typedef struct { 598 HWND hwnd; 599 RECT rc; 600 } SHELLHOOKINFO,*LPSHELLHOOKINFO; 601 602 typedef struct tagEVENTMSG { 603 UINT message; 604 UINT paramL; 605 UINT paramH; 606 DWORD time; 607 HWND hwnd; 608 } EVENTMSG,*PEVENTMSGMSG,*NPEVENTMSGMSG,*LPEVENTMSGMSG; 609 610 typedef struct tagEVENTMSG *PEVENTMSG,*NPEVENTMSG,*LPEVENTMSG; 611 612 typedef struct tagCWPSTRUCT { 613 LPARAM lParam; 614 WPARAM wParam; 615 UINT message; 616 HWND hwnd; 617 } CWPSTRUCT,*PCWPSTRUCT,*NPCWPSTRUCT,*LPCWPSTRUCT; 618 619 typedef struct tagCWPRETSTRUCT { 620 LRESULT lResult; 621 LPARAM lParam; 622 WPARAM wParam; 623 UINT message; 624 HWND hwnd; 625 } CWPRETSTRUCT,*PCWPRETSTRUCT,*NPCWPRETSTRUCT,*LPCWPRETSTRUCT; 626 #endif 627 628 #define LLKHF_EXTENDED (KF_EXTENDED >> 8) 629 #define LLKHF_INJECTED 0x00000010 630 #define LLKHF_ALTDOWN (KF_ALTDOWN >> 8) 631 #define LLKHF_UP (KF_UP >> 8) 632 633 #define LLMHF_INJECTED 0x00000001 634 635 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 636 typedef struct tagKBDLLHOOKSTRUCT { 637 DWORD vkCode; 638 DWORD scanCode; 639 DWORD flags; 640 DWORD time; 641 ULONG_PTR dwExtraInfo; 642 } KBDLLHOOKSTRUCT,*LPKBDLLHOOKSTRUCT,*PKBDLLHOOKSTRUCT; 643 644 typedef struct tagMSLLHOOKSTRUCT { 645 POINT pt; 646 DWORD mouseData; 647 DWORD flags; 648 DWORD time; 649 ULONG_PTR dwExtraInfo; 650 } MSLLHOOKSTRUCT,*LPMSLLHOOKSTRUCT,*PMSLLHOOKSTRUCT; 651 652 typedef struct tagDEBUGHOOKINFO { 653 DWORD idThread; 654 DWORD idThreadInstaller; 655 LPARAM lParam; 656 WPARAM wParam; 657 int code; 658 } DEBUGHOOKINFO,*PDEBUGHOOKINFO,*NPDEBUGHOOKINFO,*LPDEBUGHOOKINFO; 659 660 typedef struct tagMOUSEHOOKSTRUCT { 661 POINT pt; 662 HWND hwnd; 663 UINT wHitTestCode; 664 ULONG_PTR dwExtraInfo; 665 } MOUSEHOOKSTRUCT,*LPMOUSEHOOKSTRUCT,*PMOUSEHOOKSTRUCT; 666 667 #ifdef __cplusplus 668 typedef struct tagMOUSEHOOKSTRUCTEX : public tagMOUSEHOOKSTRUCT { 669 DWORD mouseData; 670 } MOUSEHOOKSTRUCTEX,*LPMOUSEHOOKSTRUCTEX,*PMOUSEHOOKSTRUCTEX; 671 #else 672 typedef struct tagMOUSEHOOKSTRUCTEX { 673 MOUSEHOOKSTRUCT __unnamed; 674 DWORD mouseData; 675 } MOUSEHOOKSTRUCTEX,*LPMOUSEHOOKSTRUCTEX,*PMOUSEHOOKSTRUCTEX; 676 #endif 677 678 typedef struct tagHARDWAREHOOKSTRUCT { 679 HWND hwnd; 680 UINT message; 681 WPARAM wParam; 682 LPARAM lParam; 683 } HARDWAREHOOKSTRUCT,*LPHARDWAREHOOKSTRUCT,*PHARDWAREHOOKSTRUCT; 684 #endif 685 #endif 686 687 #define HKL_PREV 0 688 #define HKL_NEXT 1 689 690 #define KLF_ACTIVATE 0x00000001 691 #define KLF_SUBSTITUTE_OK 0x00000002 692 #define KLF_REORDER 0x00000008 693 #define KLF_REPLACELANG 0x00000010 694 #define KLF_NOTELLSHELL 0x00000080 695 #define KLF_SETFORPROCESS 0x00000100 696 #define KLF_SHIFTLOCK 0x00010000 697 #define KLF_RESET 0x40000000 698 699 #define INPUTLANGCHANGE_SYSCHARSET 0x0001 700 #define INPUTLANGCHANGE_FORWARD 0x0002 701 #define INPUTLANGCHANGE_BACKWARD 0x0004 702 703 #define KL_NAMELENGTH 9 704 705 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 706 #define LoadKeyboardLayout __MINGW_NAME_AW(LoadKeyboardLayout) 707 #define GetKeyboardLayoutName __MINGW_NAME_AW(GetKeyboardLayoutName) 708 709 WINUSERAPI HKL WINAPI LoadKeyboardLayoutA(LPCSTR pwszKLID,UINT Flags); 710 WINUSERAPI HKL WINAPI LoadKeyboardLayoutW(LPCWSTR pwszKLID,UINT Flags); 711 WINUSERAPI HKL WINAPI ActivateKeyboardLayout(HKL hkl,UINT Flags); 712 WINUSERAPI int WINAPI ToUnicodeEx(UINT wVirtKey,UINT wScanCode,CONST BYTE *lpKeyState,LPWSTR pwszBuff,int cchBuff,UINT wFlags,HKL dwhkl); 713 WINUSERAPI WINBOOL WINAPI UnloadKeyboardLayout(HKL hkl); 714 WINUSERAPI WINBOOL WINAPI GetKeyboardLayoutNameA(LPSTR pwszKLID); 715 WINUSERAPI WINBOOL WINAPI GetKeyboardLayoutNameW(LPWSTR pwszKLID); 716 WINUSERAPI int WINAPI GetKeyboardLayoutList(int nBuff,HKL *lpList); 717 WINUSERAPI HKL WINAPI GetKeyboardLayout(DWORD idThread); 718 719 typedef struct tagMOUSEMOVEPOINT { 720 int x; 721 int y; 722 DWORD time; 723 ULONG_PTR dwExtraInfo; 724 } MOUSEMOVEPOINT,*PMOUSEMOVEPOINT,*LPMOUSEMOVEPOINT; 725 726 WINUSERAPI int WINAPI GetMouseMovePointsEx(UINT cbSize,LPMOUSEMOVEPOINT lppt,LPMOUSEMOVEPOINT lpptBuf,int nBufPoints,DWORD resolution); 727 #endif 728 729 #define GMMP_USE_DISPLAY_POINTS 1 730 #define GMMP_USE_HIGH_RESOLUTION_POINTS 2 731 732 #ifndef NODESKTOP 733 734 #define DESKTOP_READOBJECTS __MSABI_LONG(0x0001) 735 #define DESKTOP_CREATEWINDOW __MSABI_LONG(0x0002) 736 #define DESKTOP_CREATEMENU __MSABI_LONG(0x0004) 737 #define DESKTOP_HOOKCONTROL __MSABI_LONG(0x0008) 738 #define DESKTOP_JOURNALRECORD __MSABI_LONG(0x0010) 739 #define DESKTOP_JOURNALPLAYBACK __MSABI_LONG(0x0020) 740 #define DESKTOP_ENUMERATE __MSABI_LONG(0x0040) 741 #define DESKTOP_WRITEOBJECTS __MSABI_LONG(0x0080) 742 #define DESKTOP_SWITCHDESKTOP __MSABI_LONG(0x0100) 743 744 #define DF_ALLOWOTHERACCOUNTHOOK __MSABI_LONG(0x0001) 745 746 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 747 #ifdef _WINGDI_ 748 #ifndef NOGDI 749 750 #define CreateDesktop __MINGW_NAME_AW(CreateDesktop) 751 #define CreateDesktopEx __MINGW_NAME_AW(CreateDesktopEx) 752 753 WINUSERAPI HDESK WINAPI CreateDesktopA(LPCSTR lpszDesktop,LPCSTR lpszDevice,LPDEVMODEA pDevmode,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa); 754 WINUSERAPI HDESK WINAPI CreateDesktopW(LPCWSTR lpszDesktop,LPCWSTR lpszDevice,LPDEVMODEW pDevmode,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa); 755 WINUSERAPI HDESK WINAPI CreateDesktopExA (LPCSTR lpszDesktop, LPCSTR lpszDevice, DEVMODEA *pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa, ULONG ulHeapSize, PVOID pvoid); 756 WINUSERAPI HDESK WINAPI CreateDesktopExW (LPCWSTR lpszDesktop, LPCWSTR lpszDevice, DEVMODEW *pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa, ULONG ulHeapSize, PVOID pvoid); 757 #endif 758 #endif 759 760 #define OpenDesktop __MINGW_NAME_AW(OpenDesktop) 761 #define EnumDesktops __MINGW_NAME_AW(EnumDesktops) 762 763 WINUSERAPI HDESK WINAPI OpenDesktopA(LPCSTR lpszDesktop,DWORD dwFlags,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess); 764 WINUSERAPI HDESK WINAPI OpenDesktopW(LPCWSTR lpszDesktop,DWORD dwFlags,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess); 765 WINUSERAPI HDESK WINAPI OpenInputDesktop(DWORD dwFlags,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess); 766 WINUSERAPI WINBOOL WINAPI EnumDesktopsA(HWINSTA hwinsta,DESKTOPENUMPROCA lpEnumFunc,LPARAM lParam); 767 WINUSERAPI WINBOOL WINAPI EnumDesktopsW(HWINSTA hwinsta,DESKTOPENUMPROCW lpEnumFunc,LPARAM lParam); 768 WINUSERAPI WINBOOL WINAPI EnumDesktopWindows(HDESK hDesktop,WNDENUMPROC lpfn,LPARAM lParam); 769 WINUSERAPI WINBOOL WINAPI SwitchDesktop(HDESK hDesktop); 770 WINUSERAPI WINBOOL WINAPI SetThreadDesktop(HDESK hDesktop); 771 WINUSERAPI WINBOOL WINAPI CloseDesktop(HDESK hDesktop); 772 WINUSERAPI HDESK WINAPI GetThreadDesktop(DWORD dwThreadId); 773 #endif 774 #endif 775 776 #ifndef NOWINDOWSTATION 777 #define WINSTA_ENUMDESKTOPS __MSABI_LONG(0x0001) 778 #define WINSTA_READATTRIBUTES __MSABI_LONG(0x0002) 779 #define WINSTA_ACCESSCLIPBOARD __MSABI_LONG(0x0004) 780 #define WINSTA_CREATEDESKTOP __MSABI_LONG(0x0008) 781 #define WINSTA_WRITEATTRIBUTES __MSABI_LONG(0x0010) 782 #define WINSTA_ACCESSGLOBALATOMS __MSABI_LONG(0x0020) 783 #define WINSTA_EXITWINDOWS __MSABI_LONG(0x0040) 784 #define WINSTA_ENUMERATE __MSABI_LONG(0x0100) 785 #define WINSTA_READSCREEN __MSABI_LONG(0x0200) 786 #define WINSTA_ALL_ACCESS (WINSTA_ENUMDESKTOPS | WINSTA_READATTRIBUTES | WINSTA_ACCESSCLIPBOARD | WINSTA_CREATEDESKTOP | WINSTA_WRITEATTRIBUTES | WINSTA_ACCESSGLOBALATOMS | WINSTA_EXITWINDOWS | WINSTA_ENUMERATE | WINSTA_READSCREEN) 787 788 #define CWF_CREATE_ONLY 0x00000001 789 790 #define WSF_VISIBLE __MSABI_LONG(0x0001) 791 792 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 793 #define CreateWindowStation __MINGW_NAME_AW(CreateWindowStation) 794 #define OpenWindowStation __MINGW_NAME_AW(OpenWindowStation) 795 #define EnumWindowStations __MINGW_NAME_AW(EnumWindowStations) 796 797 WINUSERAPI HWINSTA WINAPI CreateWindowStationA(LPCSTR lpwinsta,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa); 798 WINUSERAPI HWINSTA WINAPI CreateWindowStationW(LPCWSTR lpwinsta,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa); 799 WINUSERAPI HWINSTA WINAPI OpenWindowStationA(LPCSTR lpszWinSta,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess); 800 WINUSERAPI HWINSTA WINAPI OpenWindowStationW(LPCWSTR lpszWinSta,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess); 801 WINUSERAPI WINBOOL WINAPI EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,LPARAM lParam); 802 WINUSERAPI WINBOOL WINAPI EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,LPARAM lParam); 803 WINUSERAPI WINBOOL WINAPI CloseWindowStation(HWINSTA hWinSta); 804 WINUSERAPI WINBOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta); 805 WINUSERAPI HWINSTA WINAPI GetProcessWindowStation(VOID); 806 #endif 807 #endif 808 809 #ifndef NOSECURITY 810 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 811 WINUSERAPI WINBOOL WINAPI SetUserObjectSecurity(HANDLE hObj,PSECURITY_INFORMATION pSIRequested,PSECURITY_DESCRIPTOR pSID); 812 WINUSERAPI WINBOOL WINAPI GetUserObjectSecurity(HANDLE hObj,PSECURITY_INFORMATION pSIRequested,PSECURITY_DESCRIPTOR pSID,DWORD nLength,LPDWORD lpnLengthNeeded); 813 #endif 814 815 #define UOI_FLAGS 1 816 #define UOI_NAME 2 817 #define UOI_TYPE 3 818 #define UOI_USER_SID 4 819 #if WINVER >= 0x0600 820 #define UOI_HEAPSIZE 5 821 #define UOI_IO 6 822 #endif 823 824 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 825 typedef struct tagUSEROBJECTFLAGS { 826 WINBOOL fInherit; 827 WINBOOL fReserved; 828 DWORD dwFlags; 829 } USEROBJECTFLAGS,*PUSEROBJECTFLAGS; 830 831 #define GetUserObjectInformation __MINGW_NAME_AW(GetUserObjectInformation) 832 #define SetUserObjectInformation __MINGW_NAME_AW(SetUserObjectInformation) 833 834 WINUSERAPI WINBOOL WINAPI GetUserObjectInformationA(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength,LPDWORD lpnLengthNeeded); 835 WINUSERAPI WINBOOL WINAPI GetUserObjectInformationW(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength,LPDWORD lpnLengthNeeded); 836 WINUSERAPI WINBOOL WINAPI SetUserObjectInformationA(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength); 837 WINUSERAPI WINBOOL WINAPI SetUserObjectInformationW(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength); 838 #endif 839 #endif 840 841 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 842 typedef struct tagWNDCLASSEXA { 843 UINT cbSize; 844 UINT style; 845 WNDPROC lpfnWndProc; 846 int cbClsExtra; 847 int cbWndExtra; 848 HINSTANCE hInstance; 849 HICON hIcon; 850 HCURSOR hCursor; 851 HBRUSH hbrBackground; 852 LPCSTR lpszMenuName; 853 LPCSTR lpszClassName; 854 HICON hIconSm; 855 } WNDCLASSEXA,*PWNDCLASSEXA,*NPWNDCLASSEXA,*LPWNDCLASSEXA; 856 857 typedef struct tagWNDCLASSEXW { 858 UINT cbSize; 859 UINT style; 860 WNDPROC lpfnWndProc; 861 int cbClsExtra; 862 int cbWndExtra; 863 HINSTANCE hInstance; 864 HICON hIcon; 865 HCURSOR hCursor; 866 HBRUSH hbrBackground; 867 LPCWSTR lpszMenuName; 868 LPCWSTR lpszClassName; 869 HICON hIconSm; 870 } WNDCLASSEXW,*PWNDCLASSEXW,*NPWNDCLASSEXW,*LPWNDCLASSEXW; 871 872 __MINGW_TYPEDEF_AW(WNDCLASSEX) 873 __MINGW_TYPEDEF_AW(PWNDCLASSEX) 874 __MINGW_TYPEDEF_AW(NPWNDCLASSEX) 875 __MINGW_TYPEDEF_AW(LPWNDCLASSEX) 876 877 typedef struct tagWNDCLASSA { 878 UINT style; 879 WNDPROC lpfnWndProc; 880 int cbClsExtra; 881 int cbWndExtra; 882 HINSTANCE hInstance; 883 HICON hIcon; 884 HCURSOR hCursor; 885 HBRUSH hbrBackground; 886 LPCSTR lpszMenuName; 887 LPCSTR lpszClassName; 888 } WNDCLASSA,*PWNDCLASSA,*NPWNDCLASSA,*LPWNDCLASSA; 889 890 typedef struct tagWNDCLASSW { 891 UINT style; 892 WNDPROC lpfnWndProc; 893 int cbClsExtra; 894 int cbWndExtra; 895 HINSTANCE hInstance; 896 HICON hIcon; 897 HCURSOR hCursor; 898 HBRUSH hbrBackground; 899 LPCWSTR lpszMenuName; 900 LPCWSTR lpszClassName; 901 } WNDCLASSW,*PWNDCLASSW,*NPWNDCLASSW,*LPWNDCLASSW; 902 903 __MINGW_TYPEDEF_AW(WNDCLASS) 904 __MINGW_TYPEDEF_AW(PWNDCLASS) 905 __MINGW_TYPEDEF_AW(NPWNDCLASS) 906 __MINGW_TYPEDEF_AW(LPWNDCLASS) 907 908 WINUSERAPI WINBOOL WINAPI IsHungAppWindow(HWND hwnd); 909 WINUSERAPI VOID WINAPI DisableProcessWindowsGhosting(VOID); 910 #endif 911 912 #ifndef NOMSG 913 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 914 typedef struct tagMSG { 915 HWND hwnd; 916 UINT message; 917 WPARAM wParam; 918 LPARAM lParam; 919 DWORD time; 920 POINT pt; 921 } MSG,*PMSG,*NPMSG,*LPMSG; 922 #endif 923 924 #define POINTSTOPOINT(pt,pts) { (pt).x = (LONG)(SHORT)LOWORD(*(LONG*)&pts); (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); } 925 926 #define POINTTOPOINTS(pt) (MAKELONG((short)((pt).x),(short)((pt).y))) 927 #define MAKEWPARAM(l,h) ((WPARAM)(DWORD)MAKELONG(l,h)) 928 #define MAKELPARAM(l,h) ((LPARAM)(DWORD)MAKELONG(l,h)) 929 #define MAKELRESULT(l,h) ((LRESULT)(DWORD)MAKELONG(l,h)) 930 #endif 931 932 #ifndef NOWINOFFSETS 933 #define GWL_WNDPROC (-4) 934 #define GWL_HINSTANCE (-6) 935 #define GWL_HWNDPARENT (-8) 936 #define GWL_STYLE (-16) 937 #define GWL_EXSTYLE (-20) 938 #define GWL_USERDATA (-21) 939 #define GWL_ID (-12) 940 941 #ifdef _WIN64 942 #undef GWL_WNDPROC 943 #undef GWL_HINSTANCE 944 #undef GWL_HWNDPARENT 945 #undef GWL_USERDATA 946 #endif 947 948 #define GWLP_WNDPROC (-4) 949 #define GWLP_HINSTANCE (-6) 950 #define GWLP_HWNDPARENT (-8) 951 #define GWLP_USERDATA (-21) 952 #define GWLP_ID (-12) 953 954 #define GCL_MENUNAME (-8) 955 #define GCL_HBRBACKGROUND (-10) 956 #define GCL_HCURSOR (-12) 957 #define GCL_HICON (-14) 958 #define GCL_HMODULE (-16) 959 #define GCL_CBWNDEXTRA (-18) 960 #define GCL_CBCLSEXTRA (-20) 961 #define GCL_WNDPROC (-24) 962 #define GCL_STYLE (-26) 963 #define GCW_ATOM (-32) 964 #define GCL_HICONSM (-34) 965 966 #ifdef _WIN64 967 #undef GCL_MENUNAME 968 #undef GCL_HBRBACKGROUND 969 #undef GCL_HCURSOR 970 #undef GCL_HICON 971 #undef GCL_HMODULE 972 #undef GCL_WNDPROC 973 #undef GCL_HICONSM 974 #endif 975 976 #define GCLP_MENUNAME (-8) 977 #define GCLP_HBRBACKGROUND (-10) 978 #define GCLP_HCURSOR (-12) 979 #define GCLP_HICON (-14) 980 #define GCLP_HMODULE (-16) 981 #define GCLP_WNDPROC (-24) 982 #define GCLP_HICONSM (-34) 983 #endif 984 985 #ifndef NOWINMESSAGES 986 987 #define WM_NULL 0x0000 988 #define WM_CREATE 0x0001 989 #define WM_DESTROY 0x0002 990 #define WM_MOVE 0x0003 991 #define WM_SIZE 0x0005 992 993 #define WM_ACTIVATE 0x0006 994 995 #define WA_INACTIVE 0 996 #define WA_ACTIVE 1 997 #define WA_CLICKACTIVE 2 998 999 #define WM_SETFOCUS 0x0007 1000 #define WM_KILLFOCUS 0x0008 1001 #define WM_ENABLE 0x000A 1002 #define WM_SETREDRAW 0x000B 1003 #define WM_SETTEXT 0x000C 1004 #define WM_GETTEXT 0x000D 1005 #define WM_GETTEXTLENGTH 0x000E 1006 #define WM_PAINT 0x000F 1007 #define WM_CLOSE 0x0010 1008 #ifndef _WIN32_WCE 1009 #define WM_QUERYENDSESSION 0x0011 1010 #define WM_QUERYOPEN 0x0013 1011 #define WM_ENDSESSION 0x0016 1012 #endif 1013 #define WM_QUIT 0x0012 1014 #define WM_ERASEBKGND 0x0014 1015 #define WM_SYSCOLORCHANGE 0x0015 1016 #define WM_SHOWWINDOW 0x0018 1017 #define WM_WININICHANGE 0x001A 1018 #define WM_SETTINGCHANGE WM_WININICHANGE 1019 #define WM_DEVMODECHANGE 0x001B 1020 #define WM_ACTIVATEAPP 0x001C 1021 #define WM_FONTCHANGE 0x001D 1022 #define WM_TIMECHANGE 0x001E 1023 #define WM_CANCELMODE 0x001F 1024 #define WM_SETCURSOR 0x0020 1025 #define WM_MOUSEACTIVATE 0x0021 1026 #define WM_CHILDACTIVATE 0x0022 1027 #define WM_QUEUESYNC 0x0023 1028 #define WM_GETMINMAXINFO 0x0024 1029 1030 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1031 typedef struct tagMINMAXINFO { 1032 POINT ptReserved; 1033 POINT ptMaxSize; 1034 POINT ptMaxPosition; 1035 POINT ptMinTrackSize; 1036 POINT ptMaxTrackSize; 1037 } MINMAXINFO,*PMINMAXINFO,*LPMINMAXINFO; 1038 #endif 1039 1040 #define WM_PAINTICON 0x0026 1041 #define WM_ICONERASEBKGND 0x0027 1042 #define WM_NEXTDLGCTL 0x0028 1043 #define WM_SPOOLERSTATUS 0x002A 1044 #define WM_DRAWITEM 0x002B 1045 #define WM_MEASUREITEM 0x002C 1046 #define WM_DELETEITEM 0x002D 1047 #define WM_VKEYTOITEM 0x002E 1048 #define WM_CHARTOITEM 0x002F 1049 #define WM_SETFONT 0x0030 1050 #define WM_GETFONT 0x0031 1051 #define WM_SETHOTKEY 0x0032 1052 #define WM_GETHOTKEY 0x0033 1053 #define WM_QUERYDRAGICON 0x0037 1054 #define WM_COMPAREITEM 0x0039 1055 #ifndef _WIN32_WCE 1056 #define WM_GETOBJECT 0x003D 1057 #endif 1058 #define WM_COMPACTING 0x0041 1059 #define WM_COMMNOTIFY 0x0044 1060 #define WM_WINDOWPOSCHANGING 0x0046 1061 #define WM_WINDOWPOSCHANGED 0x0047 1062 #define WM_POWER 0x0048 1063 1064 #define PWR_OK 1 1065 #define PWR_FAIL (-1) 1066 #define PWR_SUSPENDREQUEST 1 1067 #define PWR_SUSPENDRESUME 2 1068 #define PWR_CRITICALRESUME 3 1069 1070 #define WM_COPYDATA 0x004A 1071 #define WM_CANCELJOURNAL 0x004B 1072 1073 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1074 typedef struct tagCOPYDATASTRUCT { 1075 ULONG_PTR dwData; 1076 DWORD cbData; 1077 PVOID lpData; 1078 } COPYDATASTRUCT,*PCOPYDATASTRUCT; 1079 1080 typedef struct tagMDINEXTMENU { 1081 HMENU hmenuIn; 1082 HMENU hmenuNext; 1083 HWND hwndNext; 1084 } MDINEXTMENU,*PMDINEXTMENU,*LPMDINEXTMENU; 1085 #endif 1086 1087 #define WM_NOTIFY 0x004E 1088 #define WM_INPUTLANGCHANGEREQUEST 0x0050 1089 #define WM_INPUTLANGCHANGE 0x0051 1090 #define WM_TCARD 0x0052 1091 #define WM_HELP 0x0053 1092 #define WM_USERCHANGED 0x0054 1093 #define WM_NOTIFYFORMAT 0x0055 1094 1095 #define NFR_ANSI 1 1096 #define NFR_UNICODE 2 1097 #define NF_QUERY 3 1098 #define NF_REQUERY 4 1099 1100 #define WM_CONTEXTMENU 0x007B 1101 #define WM_STYLECHANGING 0x007C 1102 #define WM_STYLECHANGED 0x007D 1103 #define WM_DISPLAYCHANGE 0x007E 1104 #define WM_GETICON 0x007F 1105 #define WM_SETICON 0x0080 1106 1107 #define WM_NCCREATE 0x0081 1108 #define WM_NCDESTROY 0x0082 1109 #define WM_NCCALCSIZE 0x0083 1110 #define WM_NCHITTEST 0x0084 1111 #define WM_NCPAINT 0x0085 1112 #define WM_NCACTIVATE 0x0086 1113 #define WM_GETDLGCODE 0x0087 1114 #ifndef _WIN32_WCE 1115 #define WM_SYNCPAINT 0x0088 1116 #endif 1117 #define WM_NCMOUSEMOVE 0x00A0 1118 #define WM_NCLBUTTONDOWN 0x00A1 1119 #define WM_NCLBUTTONUP 0x00A2 1120 #define WM_NCLBUTTONDBLCLK 0x00A3 1121 #define WM_NCRBUTTONDOWN 0x00A4 1122 #define WM_NCRBUTTONUP 0x00A5 1123 #define WM_NCRBUTTONDBLCLK 0x00A6 1124 #define WM_NCMBUTTONDOWN 0x00A7 1125 #define WM_NCMBUTTONUP 0x00A8 1126 #define WM_NCMBUTTONDBLCLK 0x00A9 1127 1128 #define WM_NCXBUTTONDOWN 0x00AB 1129 #define WM_NCXBUTTONUP 0x00AC 1130 #define WM_NCXBUTTONDBLCLK 0x00AD 1131 #define WM_INPUT_DEVICE_CHANGE 0x00fe 1132 #define WM_INPUT 0x00FF 1133 #define WM_KEYFIRST 0x0100 1134 #define WM_KEYDOWN 0x0100 1135 #define WM_KEYUP 0x0101 1136 #define WM_CHAR 0x0102 1137 #define WM_DEADCHAR 0x0103 1138 #define WM_SYSKEYDOWN 0x0104 1139 #define WM_SYSKEYUP 0x0105 1140 #define WM_SYSCHAR 0x0106 1141 #define WM_SYSDEADCHAR 0x0107 1142 #define WM_UNICHAR 0x0109 1143 #define WM_KEYLAST 0x0109 1144 #define UNICODE_NOCHAR 0xFFFF 1145 #define WM_IME_STARTCOMPOSITION 0x010D 1146 #define WM_IME_ENDCOMPOSITION 0x010E 1147 #define WM_IME_COMPOSITION 0x010F 1148 #define WM_IME_KEYLAST 0x010F 1149 #define WM_INITDIALOG 0x0110 1150 #define WM_COMMAND 0x0111 1151 #define WM_SYSCOMMAND 0x0112 1152 #define WM_TIMER 0x0113 1153 #define WM_HSCROLL 0x0114 1154 #define WM_VSCROLL 0x0115 1155 #define WM_INITMENU 0x0116 1156 #define WM_INITMENUPOPUP 0x0117 1157 #define WM_MENUSELECT 0x011F 1158 #if _WIN32_WINNT >= 0x0601 1159 #define WM_GESTURE 0x0119 1160 #define WM_GESTURENOTIFY 0x011A 1161 #endif /* _WIN32_WINNT >= 0x0601 */ 1162 #define WM_MENUCHAR 0x0120 1163 #define WM_ENTERIDLE 0x0121 1164 #ifndef _WIN32_WCE 1165 #define WM_MENURBUTTONUP 0x0122 1166 #define WM_MENUDRAG 0x0123 1167 #define WM_MENUGETOBJECT 0x0124 1168 #define WM_UNINITMENUPOPUP 0x0125 1169 #define WM_MENUCOMMAND 0x0126 1170 #define WM_CHANGEUISTATE 0x0127 1171 #define WM_UPDATEUISTATE 0x0128 1172 #define WM_QUERYUISTATE 0x0129 1173 1174 #define UIS_SET 1 1175 #define UIS_CLEAR 2 1176 #define UIS_INITIALIZE 3 1177 1178 #define UISF_HIDEFOCUS 0x1 1179 #define UISF_HIDEACCEL 0x2 1180 #define UISF_ACTIVE 0x4 1181 #endif 1182 1183 #define WM_CTLCOLORMSGBOX 0x0132 1184 #define WM_CTLCOLOREDIT 0x0133 1185 #define WM_CTLCOLORLISTBOX 0x0134 1186 #define WM_CTLCOLORBTN 0x0135 1187 #define WM_CTLCOLORDLG 0x0136 1188 #define WM_CTLCOLORSCROLLBAR 0x0137 1189 #define WM_CTLCOLORSTATIC 0x0138 1190 #define MN_GETHMENU 0x01E1 1191 1192 #define WM_MOUSEFIRST 0x0200 1193 #define WM_MOUSEMOVE 0x0200 1194 #define WM_LBUTTONDOWN 0x0201 1195 #define WM_LBUTTONUP 0x0202 1196 #define WM_LBUTTONDBLCLK 0x0203 1197 #define WM_RBUTTONDOWN 0x0204 1198 #define WM_RBUTTONUP 0x0205 1199 #define WM_RBUTTONDBLCLK 0x0206 1200 #define WM_MBUTTONDOWN 0x0207 1201 #define WM_MBUTTONUP 0x0208 1202 #define WM_MBUTTONDBLCLK 0x0209 1203 #define WM_MOUSEWHEEL 0x020A 1204 #define WM_XBUTTONDOWN 0x020B 1205 #define WM_XBUTTONUP 0x020C 1206 #define WM_XBUTTONDBLCLK 0x020D 1207 #if _WIN32_WINNT >= 0x0600 1208 #define WM_MOUSEHWHEEL 0x020e 1209 #endif 1210 1211 #if _WIN32_WINNT >= 0x0600 1212 #define WM_MOUSELAST 0x020e 1213 #else 1214 #define WM_MOUSELAST 0x020d 1215 #endif 1216 1217 #define WHEEL_DELTA 120 1218 #define GET_WHEEL_DELTA_WPARAM(wParam) ((short)HIWORD(wParam)) 1219 1220 #define WHEEL_PAGESCROLL (UINT_MAX) 1221 1222 #define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam)) 1223 #define GET_NCHITTEST_WPARAM(wParam) ((short)LOWORD(wParam)) 1224 #define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam)) 1225 1226 #define XBUTTON1 0x0001 1227 #define XBUTTON2 0x0002 1228 1229 #define WM_PARENTNOTIFY 0x0210 1230 #define WM_ENTERMENULOOP 0x0211 1231 #define WM_EXITMENULOOP 0x0212 1232 #define WM_NEXTMENU 0x0213 1233 #define WM_SIZING 0x0214 1234 #define WM_CAPTURECHANGED 0x0215 1235 #define WM_MOVING 0x0216 1236 #define WM_POWERBROADCAST 0x0218 1237 1238 #ifndef _WIN32_WCE 1239 #define PBT_APMQUERYSUSPEND 0x0000 1240 #define PBT_APMQUERYSTANDBY 0x0001 1241 1242 #define PBT_APMQUERYSUSPENDFAILED 0x0002 1243 #define PBT_APMQUERYSTANDBYFAILED 0x0003 1244 1245 #define PBT_APMSUSPEND 0x0004 1246 #define PBT_APMSTANDBY 0x0005 1247 1248 #define PBT_APMRESUMECRITICAL 0x0006 1249 #define PBT_APMRESUMESUSPEND 0x0007 1250 #define PBT_APMRESUMESTANDBY 0x0008 1251 1252 #define PBTF_APMRESUMEFROMFAILURE 0x00000001 1253 1254 #define PBT_APMBATTERYLOW 0x0009 1255 #define PBT_APMPOWERSTATUSCHANGE 0x000A 1256 1257 #define PBT_APMOEMEVENT 0x000B 1258 #define PBT_APMRESUMEAUTOMATIC 0x0012 1259 #if _WIN32_WINNT >= 0x0502 1260 #ifndef PBT_POWERSETTINGCHANGE 1261 #define PBT_POWERSETTINGCHANGE 32787 1262 1263 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1264 typedef struct { 1265 GUID PowerSetting; 1266 DWORD DataLength; 1267 UCHAR Data[1]; 1268 } POWERBROADCAST_SETTING,*PPOWERBROADCAST_SETTING; 1269 #endif 1270 #endif 1271 #endif 1272 #endif 1273 1274 #define WM_DEVICECHANGE 0x0219 1275 1276 #define WM_MDICREATE 0x0220 1277 #define WM_MDIDESTROY 0x0221 1278 #define WM_MDIACTIVATE 0x0222 1279 #define WM_MDIRESTORE 0x0223 1280 #define WM_MDINEXT 0x0224 1281 #define WM_MDIMAXIMIZE 0x0225 1282 #define WM_MDITILE 0x0226 1283 #define WM_MDICASCADE 0x0227 1284 #define WM_MDIICONARRANGE 0x0228 1285 #define WM_MDIGETACTIVE 0x0229 1286 1287 #define WM_MDISETMENU 0x0230 1288 #define WM_ENTERSIZEMOVE 0x0231 1289 #define WM_EXITSIZEMOVE 0x0232 1290 #define WM_DROPFILES 0x0233 1291 #define WM_MDIREFRESHMENU 0x0234 1292 #if WINVER >= 0x0602 1293 #define WM_POINTERDEVICECHANGE 0x238 1294 #define WM_POINTERDEVICEINRANGE 0x239 1295 #define WM_POINTERDEVICEOUTOFRANGE 0x23a 1296 #endif 1297 #if WINVER >= 0x0601 1298 #define WM_TOUCH 0x0240 1299 #endif 1300 #if WINVER >= 0x0602 1301 #define WM_NCPOINTERUPDATE 0x0241 1302 #define WM_NCPOINTERDOWN 0x0242 1303 #define WM_NCPOINTERUP 0x0243 1304 #define WM_POINTERUPDATE 0x0245 1305 #define WM_POINTERDOWN 0x0246 1306 #define WM_POINTERUP 0x0247 1307 #define WM_POINTERENTER 0x0249 1308 #define WM_POINTERLEAVE 0x024a 1309 #define WM_POINTERACTIVATE 0x024b 1310 #define WM_POINTERCAPTURECHANGED 0x024c 1311 #define WM_TOUCHHITTESTING 0x024d 1312 #define WM_POINTERWHEEL 0x024e 1313 #define WM_POINTERHWHEEL 0x024f 1314 #endif 1315 1316 #define WM_IME_SETCONTEXT 0x0281 1317 #define WM_IME_NOTIFY 0x0282 1318 #define WM_IME_CONTROL 0x0283 1319 #define WM_IME_COMPOSITIONFULL 0x0284 1320 #define WM_IME_SELECT 0x0285 1321 #define WM_IME_CHAR 0x0286 1322 #define WM_IME_REQUEST 0x0288 1323 #define WM_IME_KEYDOWN 0x0290 1324 #define WM_IME_KEYUP 0x0291 1325 1326 #define WM_MOUSEHOVER 0x02A1 1327 #define WM_MOUSELEAVE 0x02A3 1328 #define WM_NCMOUSEHOVER 0x02A0 1329 #define WM_NCMOUSELEAVE 0x02A2 1330 #define WM_WTSSESSION_CHANGE 0x02B1 1331 #define WM_TABLET_FIRST 0x02c0 1332 #define WM_TABLET_LAST 0x02df 1333 #if WINVER >= 0x0601 1334 #define WM_DPICHANGED 0x02e0 1335 #endif 1336 #define WM_CUT 0x0300 1337 #define WM_COPY 0x0301 1338 #define WM_PASTE 0x0302 1339 #define WM_CLEAR 0x0303 1340 #define WM_UNDO 0x0304 1341 #define WM_RENDERFORMAT 0x0305 1342 #define WM_RENDERALLFORMATS 0x0306 1343 #define WM_DESTROYCLIPBOARD 0x0307 1344 #define WM_DRAWCLIPBOARD 0x0308 1345 #define WM_PAINTCLIPBOARD 0x0309 1346 #define WM_VSCROLLCLIPBOARD 0x030A 1347 #define WM_SIZECLIPBOARD 0x030B 1348 #define WM_ASKCBFORMATNAME 0x030C 1349 #define WM_CHANGECBCHAIN 0x030D 1350 #define WM_HSCROLLCLIPBOARD 0x030E 1351 #define WM_QUERYNEWPALETTE 0x030F 1352 #define WM_PALETTEISCHANGING 0x0310 1353 #define WM_PALETTECHANGED 0x0311 1354 #define WM_HOTKEY 0x0312 1355 #define WM_PRINT 0x0317 1356 #define WM_PRINTCLIENT 0x0318 1357 #define WM_APPCOMMAND 0x0319 1358 #define WM_THEMECHANGED 0x031A 1359 #define WM_CLIPBOARDUPDATE 0x031d 1360 #if _WIN32_WINNT >= 0x0600 1361 #define WM_DWMCOMPOSITIONCHANGED 0x031e 1362 #define WM_DWMNCRENDERINGCHANGED 0x031f 1363 #define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320 1364 #define WM_DWMWINDOWMAXIMIZEDCHANGE 0x0321 1365 #endif 1366 #if _WIN32_WINNT >= 0x0601 1367 #define WM_DWMSENDICONICTHUMBNAIL 0x0323 1368 #define WM_DWMSENDICONICLIVEPREVIEWBITMAP 0x0326 1369 #endif 1370 #if WINVER >= 0x0600 1371 #define WM_GETTITLEBARINFOEX 0x033f 1372 #endif 1373 1374 #define WM_HANDHELDFIRST 0x0358 1375 #define WM_HANDHELDLAST 0x035F 1376 #define WM_AFXFIRST 0x0360 1377 #define WM_AFXLAST 0x037F 1378 #define WM_PENWINFIRST 0x0380 1379 #define WM_PENWINLAST 0x038F 1380 #define WM_APP 0x8000 1381 #define WM_USER 0x0400 1382 1383 #define WMSZ_LEFT 1 1384 #define WMSZ_RIGHT 2 1385 #define WMSZ_TOP 3 1386 #define WMSZ_TOPLEFT 4 1387 #define WMSZ_TOPRIGHT 5 1388 #define WMSZ_BOTTOM 6 1389 #define WMSZ_BOTTOMLEFT 7 1390 #define WMSZ_BOTTOMRIGHT 8 1391 1392 #ifndef NONCMESSAGES 1393 1394 #define HTERROR (-2) 1395 #define HTTRANSPARENT (-1) 1396 #define HTNOWHERE 0 1397 #define HTCLIENT 1 1398 #define HTCAPTION 2 1399 #define HTSYSMENU 3 1400 #define HTGROWBOX 4 1401 #define HTSIZE HTGROWBOX 1402 #define HTMENU 5 1403 #define HTHSCROLL 6 1404 #define HTVSCROLL 7 1405 #define HTMINBUTTON 8 1406 #define HTMAXBUTTON 9 1407 #define HTLEFT 10 1408 #define HTRIGHT 11 1409 #define HTTOP 12 1410 #define HTTOPLEFT 13 1411 #define HTTOPRIGHT 14 1412 #define HTBOTTOM 15 1413 #define HTBOTTOMLEFT 16 1414 #define HTBOTTOMRIGHT 17 1415 #define HTBORDER 18 1416 #define HTREDUCE HTMINBUTTON 1417 #define HTZOOM HTMAXBUTTON 1418 #define HTSIZEFIRST HTLEFT 1419 #define HTSIZELAST HTBOTTOMRIGHT 1420 #define HTOBJECT 19 1421 #define HTCLOSE 20 1422 #define HTHELP 21 1423 1424 #define SMTO_NORMAL 0x0000 1425 #define SMTO_BLOCK 0x0001 1426 #define SMTO_ABORTIFHUNG 0x0002 1427 #define SMTO_NOTIMEOUTIFNOTHUNG 0x0008 1428 #if WINVER >= 0x0600 1429 #define SMTO_ERRORONEXIT 0x0020 1430 #endif 1431 #endif 1432 1433 #define MA_ACTIVATE 1 1434 #define MA_ACTIVATEANDEAT 2 1435 #define MA_NOACTIVATE 3 1436 #define MA_NOACTIVATEANDEAT 4 1437 1438 #define ICON_SMALL 0 1439 #define ICON_BIG 1 1440 #define ICON_SMALL2 2 1441 1442 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1443 #define RegisterWindowMessage __MINGW_NAME_AW(RegisterWindowMessage) 1444 1445 WINUSERAPI UINT WINAPI RegisterWindowMessageA(LPCSTR lpString); 1446 WINUSERAPI UINT WINAPI RegisterWindowMessageW(LPCWSTR lpString); 1447 #endif 1448 1449 #define SIZE_RESTORED 0 1450 #define SIZE_MINIMIZED 1 1451 #define SIZE_MAXIMIZED 2 1452 #define SIZE_MAXSHOW 3 1453 #define SIZE_MAXHIDE 4 1454 1455 #define SIZENORMAL SIZE_RESTORED 1456 #define SIZEICONIC SIZE_MINIMIZED 1457 #define SIZEFULLSCREEN SIZE_MAXIMIZED 1458 #define SIZEZOOMSHOW SIZE_MAXSHOW 1459 #define SIZEZOOMHIDE SIZE_MAXHIDE 1460 1461 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1462 typedef struct tagWINDOWPOS { 1463 HWND hwnd; 1464 HWND hwndInsertAfter; 1465 int x; 1466 int y; 1467 int cx; 1468 int cy; 1469 UINT flags; 1470 } WINDOWPOS,*LPWINDOWPOS,*PWINDOWPOS; 1471 1472 typedef struct tagNCCALCSIZE_PARAMS { 1473 RECT rgrc[3]; 1474 PWINDOWPOS lppos; 1475 } NCCALCSIZE_PARAMS,*LPNCCALCSIZE_PARAMS; 1476 #endif 1477 1478 #define WVR_ALIGNTOP 0x0010 1479 #define WVR_ALIGNLEFT 0x0020 1480 #define WVR_ALIGNBOTTOM 0x0040 1481 #define WVR_ALIGNRIGHT 0x0080 1482 #define WVR_HREDRAW 0x0100 1483 #define WVR_VREDRAW 0x0200 1484 #define WVR_REDRAW (WVR_HREDRAW | WVR_VREDRAW) 1485 #define WVR_VALIDRECTS 0x0400 1486 1487 #ifndef NOKEYSTATES 1488 1489 #define MK_LBUTTON 0x0001 1490 #define MK_RBUTTON 0x0002 1491 #define MK_SHIFT 0x0004 1492 #define MK_CONTROL 0x0008 1493 #define MK_MBUTTON 0x0010 1494 #define MK_XBUTTON1 0x0020 1495 #define MK_XBUTTON2 0x0040 1496 #endif 1497 1498 #ifndef NOTRACKMOUSEEVENT 1499 #define TME_HOVER 0x00000001 1500 #define TME_LEAVE 0x00000002 1501 #define TME_NONCLIENT 0x00000010 1502 #define TME_QUERY 0x40000000 1503 #define TME_CANCEL 0x80000000 1504 1505 #define HOVER_DEFAULT 0xFFFFFFFF 1506 #endif 1507 1508 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1509 typedef struct tagTRACKMOUSEEVENT { 1510 DWORD cbSize; 1511 DWORD dwFlags; 1512 HWND hwndTrack; 1513 DWORD dwHoverTime; 1514 } TRACKMOUSEEVENT,*LPTRACKMOUSEEVENT; 1515 1516 WINUSERAPI WINBOOL WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack); 1517 #endif 1518 #endif 1519 1520 #ifndef NOWINSTYLES 1521 1522 #define WS_OVERLAPPED __MSABI_LONG(0x00000000) 1523 #define WS_POPUP __MSABI_LONG(0x80000000) 1524 #define WS_CHILD __MSABI_LONG(0x40000000) 1525 #define WS_MINIMIZE __MSABI_LONG(0x20000000) 1526 #define WS_VISIBLE __MSABI_LONG(0x10000000) 1527 #define WS_DISABLED __MSABI_LONG(0x08000000) 1528 #define WS_CLIPSIBLINGS __MSABI_LONG(0x04000000) 1529 #define WS_CLIPCHILDREN __MSABI_LONG(0x02000000) 1530 #define WS_MAXIMIZE __MSABI_LONG(0x01000000) 1531 #define WS_CAPTION __MSABI_LONG(0x00C00000) 1532 #define WS_BORDER __MSABI_LONG(0x00800000) 1533 #define WS_DLGFRAME __MSABI_LONG(0x00400000) 1534 #define WS_VSCROLL __MSABI_LONG(0x00200000) 1535 #define WS_HSCROLL __MSABI_LONG(0x00100000) 1536 #define WS_SYSMENU __MSABI_LONG(0x00080000) 1537 #define WS_THICKFRAME __MSABI_LONG(0x00040000) 1538 #define WS_GROUP __MSABI_LONG(0x00020000) 1539 #define WS_TABSTOP __MSABI_LONG(0x00010000) 1540 #define WS_MINIMIZEBOX __MSABI_LONG(0x00020000) 1541 #define WS_MAXIMIZEBOX __MSABI_LONG(0x00010000) 1542 #define WS_TILED WS_OVERLAPPED 1543 #define WS_ICONIC WS_MINIMIZE 1544 #define WS_SIZEBOX WS_THICKFRAME 1545 #define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW 1546 1547 #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX) 1548 #define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU) 1549 #define WS_CHILDWINDOW (WS_CHILD) 1550 1551 #define WS_EX_DLGMODALFRAME __MSABI_LONG(0x00000001) 1552 #define WS_EX_NOPARENTNOTIFY __MSABI_LONG(0x00000004) 1553 #define WS_EX_TOPMOST __MSABI_LONG(0x00000008) 1554 #define WS_EX_ACCEPTFILES __MSABI_LONG(0x00000010) 1555 #define WS_EX_TRANSPARENT __MSABI_LONG(0x00000020) 1556 #define WS_EX_MDICHILD __MSABI_LONG(0x00000040) 1557 #define WS_EX_TOOLWINDOW __MSABI_LONG(0x00000080) 1558 #define WS_EX_WINDOWEDGE __MSABI_LONG(0x00000100) 1559 #define WS_EX_CLIENTEDGE __MSABI_LONG(0x00000200) 1560 #define WS_EX_CONTEXTHELP __MSABI_LONG(0x00000400) 1561 #define WS_EX_RIGHT __MSABI_LONG(0x00001000) 1562 #define WS_EX_LEFT __MSABI_LONG(0x00000000) 1563 #define WS_EX_RTLREADING __MSABI_LONG(0x00002000) 1564 #define WS_EX_LTRREADING __MSABI_LONG(0x00000000) 1565 #define WS_EX_LEFTSCROLLBAR __MSABI_LONG(0x00004000) 1566 #define WS_EX_RIGHTSCROLLBAR __MSABI_LONG(0x00000000) 1567 #define WS_EX_CONTROLPARENT __MSABI_LONG(0x00010000) 1568 #define WS_EX_STATICEDGE __MSABI_LONG(0x00020000) 1569 #define WS_EX_APPWINDOW __MSABI_LONG(0x00040000) 1570 1571 #define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE) 1572 #define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST) 1573 #define WS_EX_LAYERED 0x00080000 1574 #define WS_EX_NOINHERITLAYOUT __MSABI_LONG(0x00100000) 1575 #if WINVER >= 0x0602 1576 #define WS_EX_NOREDIRECTIONBITMAP __MSABI_LONG(0x00200000) 1577 #endif 1578 #define WS_EX_LAYOUTRTL __MSABI_LONG(0x00400000) 1579 #define WS_EX_COMPOSITED __MSABI_LONG(0x02000000) 1580 #define WS_EX_NOACTIVATE __MSABI_LONG(0x08000000) 1581 1582 #define CS_VREDRAW 0x0001 1583 #define CS_HREDRAW 0x0002 1584 #define CS_DBLCLKS 0x0008 1585 #define CS_OWNDC 0x0020 1586 #define CS_CLASSDC 0x0040 1587 #define CS_PARENTDC 0x0080 1588 #define CS_NOCLOSE 0x0200 1589 #define CS_SAVEBITS 0x0800 1590 #define CS_BYTEALIGNCLIENT 0x1000 1591 #define CS_BYTEALIGNWINDOW 0x2000 1592 #define CS_GLOBALCLASS 0x4000 1593 #define CS_IME 0x00010000 1594 #define CS_DROPSHADOW 0x00020000 1595 #endif 1596 1597 #define PRF_CHECKVISIBLE __MSABI_LONG(0x00000001) 1598 #define PRF_NONCLIENT __MSABI_LONG(0x00000002) 1599 #define PRF_CLIENT __MSABI_LONG(0x00000004) 1600 #define PRF_ERASEBKGND __MSABI_LONG(0x00000008) 1601 #define PRF_CHILDREN __MSABI_LONG(0x00000010) 1602 #define PRF_OWNED __MSABI_LONG(0x00000020) 1603 1604 #define BDR_RAISEDOUTER 0x0001 1605 #define BDR_SUNKENOUTER 0x0002 1606 #define BDR_RAISEDINNER 0x0004 1607 #define BDR_SUNKENINNER 0x0008 1608 1609 #define BDR_OUTER (BDR_RAISEDOUTER | BDR_SUNKENOUTER) 1610 #define BDR_INNER (BDR_RAISEDINNER | BDR_SUNKENINNER) 1611 #define BDR_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER) 1612 #define BDR_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER) 1613 1614 #define EDGE_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER) 1615 #define EDGE_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER) 1616 #define EDGE_ETCHED (BDR_SUNKENOUTER | BDR_RAISEDINNER) 1617 #define EDGE_BUMP (BDR_RAISEDOUTER | BDR_SUNKENINNER) 1618 1619 #define BF_LEFT 0x0001 1620 #define BF_TOP 0x0002 1621 #define BF_RIGHT 0x0004 1622 #define BF_BOTTOM 0x0008 1623 1624 #define BF_TOPLEFT (BF_TOP | BF_LEFT) 1625 #define BF_TOPRIGHT (BF_TOP | BF_RIGHT) 1626 #define BF_BOTTOMLEFT (BF_BOTTOM | BF_LEFT) 1627 #define BF_BOTTOMRIGHT (BF_BOTTOM | BF_RIGHT) 1628 #define BF_RECT (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM) 1629 1630 #define BF_DIAGONAL 0x0010 1631 1632 #define BF_DIAGONAL_ENDTOPRIGHT (BF_DIAGONAL | BF_TOP | BF_RIGHT) 1633 #define BF_DIAGONAL_ENDTOPLEFT (BF_DIAGONAL | BF_TOP | BF_LEFT) 1634 #define BF_DIAGONAL_ENDBOTTOMLEFT (BF_DIAGONAL | BF_BOTTOM | BF_LEFT) 1635 #define BF_DIAGONAL_ENDBOTTOMRIGHT (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT) 1636 1637 #define BF_MIDDLE 0x0800 1638 #define BF_SOFT 0x1000 1639 #define BF_ADJUST 0x2000 1640 #define BF_FLAT 0x4000 1641 #define BF_MONO 0x8000 1642 1643 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1644 WINUSERAPI WINBOOL WINAPI DrawEdge(HDC hdc,LPRECT qrc,UINT edge,UINT grfFlags); 1645 #endif 1646 1647 #define DFC_CAPTION 1 1648 #define DFC_MENU 2 1649 #define DFC_SCROLL 3 1650 #define DFC_BUTTON 4 1651 #define DFC_POPUPMENU 5 1652 1653 #define DFCS_CAPTIONCLOSE 0x0000 1654 #define DFCS_CAPTIONMIN 0x0001 1655 #define DFCS_CAPTIONMAX 0x0002 1656 #define DFCS_CAPTIONRESTORE 0x0003 1657 #define DFCS_CAPTIONHELP 0x0004 1658 1659 #define DFCS_MENUARROW 0x0000 1660 #define DFCS_MENUCHECK 0x0001 1661 #define DFCS_MENUBULLET 0x0002 1662 #define DFCS_MENUARROWRIGHT 0x0004 1663 #define DFCS_SCROLLUP 0x0000 1664 #define DFCS_SCROLLDOWN 0x0001 1665 #define DFCS_SCROLLLEFT 0x0002 1666 #define DFCS_SCROLLRIGHT 0x0003 1667 #define DFCS_SCROLLCOMBOBOX 0x0005 1668 #define DFCS_SCROLLSIZEGRIP 0x0008 1669 #define DFCS_SCROLLSIZEGRIPRIGHT 0x0010 1670 1671 #define DFCS_BUTTONCHECK 0x0000 1672 #define DFCS_BUTTONRADIOIMAGE 0x0001 1673 #define DFCS_BUTTONRADIOMASK 0x0002 1674 #define DFCS_BUTTONRADIO 0x0004 1675 #define DFCS_BUTTON3STATE 0x0008 1676 #define DFCS_BUTTONPUSH 0x0010 1677 1678 #define DFCS_INACTIVE 0x0100 1679 #define DFCS_PUSHED 0x0200 1680 #define DFCS_CHECKED 0x0400 1681 1682 #define DFCS_TRANSPARENT 0x0800 1683 #define DFCS_HOT 0x1000 1684 1685 #define DFCS_ADJUSTRECT 0x2000 1686 #define DFCS_FLAT 0x4000 1687 #define DFCS_MONO 0x8000 1688 1689 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1690 WINUSERAPI WINBOOL WINAPI DrawFrameControl(HDC,LPRECT,UINT,UINT); 1691 #endif 1692 1693 #define DC_ACTIVE 0x0001 1694 #define DC_SMALLCAP 0x0002 1695 #define DC_ICON 0x0004 1696 #define DC_TEXT 0x0008 1697 #define DC_INBUTTON 0x0010 1698 #define DC_GRADIENT 0x0020 1699 #define DC_BUTTONS 0x1000 1700 1701 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1702 WINUSERAPI WINBOOL WINAPI DrawCaption(HWND hwnd,HDC hdc,CONST RECT *lprect,UINT flags); 1703 #endif 1704 1705 #define IDANI_OPEN 1 1706 #define IDANI_CAPTION 3 1707 1708 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1709 WINUSERAPI WINBOOL WINAPI DrawAnimatedRects(HWND hwnd,int idAni,CONST RECT *lprcFrom,CONST RECT *lprcTo); 1710 #endif 1711 1712 #ifndef NOCLIPBOARD 1713 1714 #define CF_TEXT 1 1715 #define CF_BITMAP 2 1716 #define CF_METAFILEPICT 3 1717 #define CF_SYLK 4 1718 #define CF_DIF 5 1719 #define CF_TIFF 6 1720 #define CF_OEMTEXT 7 1721 #define CF_DIB 8 1722 #define CF_PALETTE 9 1723 #define CF_PENDATA 10 1724 #define CF_RIFF 11 1725 #define CF_WAVE 12 1726 #define CF_UNICODETEXT 13 1727 #define CF_ENHMETAFILE 14 1728 #define CF_HDROP 15 1729 #define CF_LOCALE 16 1730 #define CF_DIBV5 17 1731 #define CF_MAX 18 1732 1733 #define CF_OWNERDISPLAY 0x0080 1734 #define CF_DSPTEXT 0x0081 1735 #define CF_DSPBITMAP 0x0082 1736 #define CF_DSPMETAFILEPICT 0x0083 1737 #define CF_DSPENHMETAFILE 0x008E 1738 1739 #define CF_PRIVATEFIRST 0x0200 1740 #define CF_PRIVATELAST 0x02FF 1741 1742 #define CF_GDIOBJFIRST 0x0300 1743 #define CF_GDIOBJLAST 0x03FF 1744 #endif 1745 1746 #define FVIRTKEY TRUE 1747 #define FNOINVERT 0x02 1748 #define FSHIFT 0x04 1749 #define FCONTROL 0x08 1750 #define FALT 0x10 1751 1752 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1753 typedef struct tagACCEL { 1754 BYTE fVirt; 1755 WORD key; 1756 WORD cmd; 1757 } ACCEL,*LPACCEL; 1758 1759 typedef struct tagPAINTSTRUCT { 1760 HDC hdc; 1761 WINBOOL fErase; 1762 RECT rcPaint; 1763 WINBOOL fRestore; 1764 WINBOOL fIncUpdate; 1765 BYTE rgbReserved[32]; 1766 } PAINTSTRUCT,*PPAINTSTRUCT,*NPPAINTSTRUCT,*LPPAINTSTRUCT; 1767 1768 typedef struct tagCREATESTRUCTA { 1769 LPVOID lpCreateParams; 1770 HINSTANCE hInstance; 1771 HMENU hMenu; 1772 HWND hwndParent; 1773 int cy; 1774 int cx; 1775 int y; 1776 int x; 1777 LONG style; 1778 LPCSTR lpszName; 1779 LPCSTR lpszClass; 1780 DWORD dwExStyle; 1781 } CREATESTRUCTA,*LPCREATESTRUCTA; 1782 1783 typedef struct tagCREATESTRUCTW { 1784 LPVOID lpCreateParams; 1785 HINSTANCE hInstance; 1786 HMENU hMenu; 1787 HWND hwndParent; 1788 int cy; 1789 int cx; 1790 int y; 1791 int x; 1792 LONG style; 1793 LPCWSTR lpszName; 1794 LPCWSTR lpszClass; 1795 DWORD dwExStyle; 1796 } CREATESTRUCTW,*LPCREATESTRUCTW; 1797 1798 __MINGW_TYPEDEF_AW(CREATESTRUCT) 1799 __MINGW_TYPEDEF_AW(LPCREATESTRUCT) 1800 1801 typedef struct tagWINDOWPLACEMENT { 1802 UINT length; 1803 UINT flags; 1804 UINT showCmd; 1805 POINT ptMinPosition; 1806 POINT ptMaxPosition; 1807 RECT rcNormalPosition; 1808 } WINDOWPLACEMENT; 1809 typedef WINDOWPLACEMENT *PWINDOWPLACEMENT,*LPWINDOWPLACEMENT; 1810 #endif 1811 1812 #define WPF_SETMINPOSITION 0x0001 1813 #define WPF_RESTORETOMAXIMIZED 0x0002 1814 #define WPF_ASYNCWINDOWPLACEMENT 0x0004 1815 1816 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 1817 typedef struct tagNMHDR { 1818 HWND hwndFrom; 1819 UINT_PTR idFrom; 1820 UINT code; 1821 } NMHDR; 1822 #endif 1823 1824 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1825 typedef NMHDR *LPNMHDR; 1826 1827 typedef struct tagSTYLESTRUCT { 1828 DWORD styleOld; 1829 DWORD styleNew; 1830 } STYLESTRUCT,*LPSTYLESTRUCT; 1831 #endif 1832 1833 #define ODT_MENU 1 1834 #define ODT_LISTBOX 2 1835 #define ODT_COMBOBOX 3 1836 #define ODT_BUTTON 4 1837 #define ODT_STATIC 5 1838 1839 #define ODA_DRAWENTIRE 0x0001 1840 #define ODA_SELECT 0x0002 1841 #define ODA_FOCUS 0x0004 1842 1843 #define ODS_SELECTED 0x0001 1844 #define ODS_GRAYED 0x0002 1845 #define ODS_DISABLED 0x0004 1846 #define ODS_CHECKED 0x0008 1847 #define ODS_FOCUS 0x0010 1848 #define ODS_DEFAULT 0x0020 1849 #define ODS_COMBOBOXEDIT 0x1000 1850 #define ODS_HOTLIGHT 0x0040 1851 #define ODS_INACTIVE 0x0080 1852 #define ODS_NOACCEL 0x0100 1853 #define ODS_NOFOCUSRECT 0x0200 1854 1855 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1856 typedef struct tagMEASUREITEMSTRUCT { 1857 UINT CtlType; 1858 UINT CtlID; 1859 UINT itemID; 1860 UINT itemWidth; 1861 UINT itemHeight; 1862 ULONG_PTR itemData; 1863 } MEASUREITEMSTRUCT,*PMEASUREITEMSTRUCT,*LPMEASUREITEMSTRUCT; 1864 1865 typedef struct tagDRAWITEMSTRUCT { 1866 UINT CtlType; 1867 UINT CtlID; 1868 UINT itemID; 1869 UINT itemAction; 1870 UINT itemState; 1871 HWND hwndItem; 1872 HDC hDC; 1873 RECT rcItem; 1874 ULONG_PTR itemData; 1875 } DRAWITEMSTRUCT,*PDRAWITEMSTRUCT,*LPDRAWITEMSTRUCT; 1876 1877 typedef struct tagDELETEITEMSTRUCT { 1878 UINT CtlType; 1879 UINT CtlID; 1880 UINT itemID; 1881 HWND hwndItem; 1882 ULONG_PTR itemData; 1883 } DELETEITEMSTRUCT,*PDELETEITEMSTRUCT,*LPDELETEITEMSTRUCT; 1884 1885 typedef struct tagCOMPAREITEMSTRUCT { 1886 UINT CtlType; 1887 UINT CtlID; 1888 HWND hwndItem; 1889 UINT itemID1; 1890 ULONG_PTR itemData1; 1891 UINT itemID2; 1892 ULONG_PTR itemData2; 1893 DWORD dwLocaleId; 1894 } COMPAREITEMSTRUCT,*PCOMPAREITEMSTRUCT,*LPCOMPAREITEMSTRUCT; 1895 #endif 1896 1897 #ifndef NOMSG 1898 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1899 #define GetMessage __MINGW_NAME_AW(GetMessage) 1900 #define DispatchMessage __MINGW_NAME_AW(DispatchMessage) 1901 #define PeekMessage __MINGW_NAME_AW(PeekMessage) 1902 1903 WINUSERAPI WINBOOL WINAPI GetMessageA(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax); 1904 WINUSERAPI WINBOOL WINAPI GetMessageW(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax); 1905 WINUSERAPI WINBOOL WINAPI TranslateMessage(CONST MSG *lpMsg); 1906 WINUSERAPI LRESULT WINAPI DispatchMessageA(CONST MSG *lpMsg); 1907 WINUSERAPI LRESULT WINAPI DispatchMessageW(CONST MSG *lpMsg); 1908 WINUSERAPI WINBOOL WINAPI SetMessageQueue(int cMessagesMax); 1909 WINUSERAPI WINBOOL WINAPI PeekMessageA(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax,UINT wRemoveMsg); 1910 WINUSERAPI WINBOOL WINAPI PeekMessageW(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax,UINT wRemoveMsg); 1911 #endif 1912 1913 #define PM_NOREMOVE 0x0000 1914 #define PM_REMOVE 0x0001 1915 #define PM_NOYIELD 0x0002 1916 1917 #define PM_QS_INPUT (QS_INPUT << 16) 1918 #define PM_QS_POSTMESSAGE ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16) 1919 #define PM_QS_PAINT (QS_PAINT << 16) 1920 #define PM_QS_SENDMESSAGE (QS_SENDMESSAGE << 16) 1921 #endif 1922 1923 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1924 WINUSERAPI WINBOOL WINAPI RegisterHotKey(HWND hWnd,int id,UINT fsModifiers,UINT vk); 1925 WINUSERAPI WINBOOL WINAPI UnregisterHotKey(HWND hWnd,int id); 1926 #endif 1927 1928 #define MOD_ALT 0x0001 1929 #define MOD_CONTROL 0x0002 1930 #define MOD_SHIFT 0x0004 1931 #define MOD_WIN 0x0008 1932 #if WINVER >= 0x0601 1933 #define MOD_NOREPEAT 0x4000 1934 #endif 1935 1936 #define IDHOT_SNAPWINDOW (-1) 1937 #define IDHOT_SNAPDESKTOP (-2) 1938 1939 #ifdef WIN_INTERNAL 1940 #ifndef LSTRING 1941 #define NOLSTRING 1942 #endif 1943 #ifndef LFILEIO 1944 #define NOLFILEIO 1945 #endif 1946 #endif 1947 1948 #define ENDSESSION_CLOSEAPP 0x00000001 1949 #define ENDSESSION_CRITICAL 0x40000000 1950 #define ENDSESSION_LOGOFF 0x80000000 1951 1952 #define EWX_LOGOFF 0x00000000 1953 #define EWX_SHUTDOWN 0x00000001 1954 #define EWX_REBOOT 0x00000002 1955 #define EWX_FORCE 0x00000004 1956 #define EWX_POWEROFF 0x00000008 1957 #define EWX_FORCEIFHUNG 0x00000010 1958 #define EWX_QUICKRESOLVE 0x00000020 1959 #if _WIN32_WINNT >= 0x0600 1960 #define EWX_RESTARTAPPS 0x00000040 1961 #endif 1962 #define EWX_HYBRID_SHUTDOWN 0x00400000 1963 #define EWX_BOOTOPTIONS 0x01000000 1964 1965 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 1966 #define ExitWindows(dwReserved,Code) ExitWindowsEx(EWX_LOGOFF,0xFFFFFFFF) 1967 1968 #define SendMessage __MINGW_NAME_AW(SendMessage) 1969 #define SendMessageTimeout __MINGW_NAME_AW(SendMessageTimeout) 1970 #define SendNotifyMessage __MINGW_NAME_AW(SendNotifyMessage) 1971 #define SendMessageCallback __MINGW_NAME_AW(SendMessageCallback) 1972 1973 WINUSERAPI WINBOOL WINAPI ExitWindowsEx(UINT uFlags,DWORD dwReason); 1974 WINUSERAPI WINBOOL WINAPI SwapMouseButton(WINBOOL fSwap); 1975 WINUSERAPI DWORD WINAPI GetMessagePos(VOID); 1976 WINUSERAPI LONG WINAPI GetMessageTime(VOID); 1977 WINUSERAPI LPARAM WINAPI GetMessageExtraInfo(VOID); 1978 #if _WIN32_WINNT >= 0x0602 1979 WINUSERAPI DWORD WINAPI GetUnpredictedMessagePos (VOID); 1980 #endif 1981 WINUSERAPI WINBOOL WINAPI IsWow64Message(VOID); 1982 WINUSERAPI LPARAM WINAPI SetMessageExtraInfo(LPARAM lParam); 1983 WINUSERAPI LRESULT WINAPI SendMessageA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam); 1984 WINUSERAPI LRESULT WINAPI SendMessageW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam); 1985 WINUSERAPI LRESULT WINAPI SendMessageTimeoutA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,UINT fuFlags,UINT uTimeout,PDWORD_PTR lpdwResult); 1986 WINUSERAPI LRESULT WINAPI SendMessageTimeoutW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,UINT fuFlags,UINT uTimeout,PDWORD_PTR lpdwResult); 1987 WINUSERAPI WINBOOL WINAPI SendNotifyMessageA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam); 1988 WINUSERAPI WINBOOL WINAPI SendNotifyMessageW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam); 1989 WINUSERAPI WINBOOL WINAPI SendMessageCallbackA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,SENDASYNCPROC lpResultCallBack,ULONG_PTR dwData); 1990 WINUSERAPI WINBOOL WINAPI SendMessageCallbackW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,SENDASYNCPROC lpResultCallBack,ULONG_PTR dwData); 1991 1992 typedef struct { 1993 UINT cbSize; 1994 HDESK hdesk; 1995 HWND hwnd; 1996 LUID luid; 1997 } BSMINFO,*PBSMINFO; 1998 1999 #define BroadcastSystemMessageEx __MINGW_NAME_AW(BroadcastSystemMessageEx) 2000 #define BroadcastSystemMessage __MINGW_NAME_AW(BroadcastSystemMessage) 2001 2002 WINUSERAPI __LONG32 WINAPI BroadcastSystemMessageExA(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam,PBSMINFO pbsmInfo); 2003 WINUSERAPI __LONG32 WINAPI BroadcastSystemMessageExW(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam,PBSMINFO pbsmInfo); 2004 WINUSERAPI __LONG32 WINAPI BroadcastSystemMessageA(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam); 2005 WINUSERAPI __LONG32 WINAPI BroadcastSystemMessageW(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam); 2006 #endif 2007 2008 #define BSM_ALLCOMPONENTS 0x00000000 2009 #define BSM_VXDS 0x00000001 2010 #define BSM_NETDRIVER 0x00000002 2011 #define BSM_INSTALLABLEDRIVERS 0x00000004 2012 #define BSM_APPLICATIONS 0x00000008 2013 #define BSM_ALLDESKTOPS 0x00000010 2014 2015 #define BSF_QUERY 0x00000001 2016 #define BSF_IGNORECURRENTTASK 0x00000002 2017 #define BSF_FLUSHDISK 0x00000004 2018 #define BSF_NOHANG 0x00000008 2019 #define BSF_POSTMESSAGE 0x00000010 2020 #define BSF_FORCEIFHUNG 0x00000020 2021 #define BSF_NOTIMEOUTIFNOTHUNG 0x00000040 2022 #define BSF_ALLOWSFW 0x00000080 2023 #define BSF_SENDNOTIFYMESSAGE 0x00000100 2024 #define BSF_RETURNHDESK 0x00000200 2025 #define BSF_LUID 0x00000400 2026 2027 #define BROADCAST_QUERY_DENY 0x424D5144 2028 2029 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2030 typedef PVOID HDEVNOTIFY; 2031 typedef HDEVNOTIFY *PHDEVNOTIFY; 2032 #endif 2033 2034 #define DEVICE_NOTIFY_WINDOW_HANDLE 0x00000000 2035 #define DEVICE_NOTIFY_SERVICE_HANDLE 0x00000001 2036 #define DEVICE_NOTIFY_ALL_INTERFACE_CLASSES 0x00000004 2037 2038 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2039 #define RegisterDeviceNotification __MINGW_NAME_AW(RegisterDeviceNotification) 2040 #define PostMessage __MINGW_NAME_AW(PostMessage) 2041 #define PostThreadMessage __MINGW_NAME_AW(PostThreadMessage) 2042 #define PostAppMessage __MINGW_NAME_AW(PostAppMessage) 2043 #define DefWindowProc __MINGW_NAME_AW(DefWindowProc) 2044 #define CallWindowProc __MINGW_NAME_AW(CallWindowProc) 2045 #define RegisterClass __MINGW_NAME_AW(RegisterClass) 2046 #define UnregisterClass __MINGW_NAME_AW(UnregisterClass) 2047 #define GetClassInfo __MINGW_NAME_AW(GetClassInfo) 2048 #define RegisterClassEx __MINGW_NAME_AW(RegisterClassEx) 2049 #define GetClassInfoEx __MINGW_NAME_AW(GetClassInfoEx) 2050 2051 #if _WIN32_WINNT >= 0x0502 2052 #ifndef _HPOWERNOTIFY_DEF_ 2053 #define _HPOWERNOTIFY_DEF_ 2054 typedef HANDLE HPOWERNOTIFY; 2055 typedef HPOWERNOTIFY *PHPOWERNOTIFY; 2056 #endif 2057 2058 WINUSERAPI HPOWERNOTIFY WINAPI RegisterPowerSettingNotification (HANDLE hRecipient, LPCGUID PowerSettingGuid, DWORD Flags); 2059 WINUSERAPI WINBOOL WINAPI UnregisterPowerSettingNotification (HPOWERNOTIFY Handle); 2060 WINUSERAPI HPOWERNOTIFY WINAPI RegisterSuspendResumeNotification (HANDLE hRecipient, DWORD Flags); 2061 WINUSERAPI WINBOOL WINAPI UnregisterSuspendResumeNotification (HPOWERNOTIFY Handle); 2062 #endif 2063 2064 WINUSERAPI WINBOOL WINAPI PostMessageA (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 2065 WINUSERAPI WINBOOL WINAPI PostMessageW (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 2066 WINUSERAPI WINBOOL WINAPI PostThreadMessageA (DWORD idThread, UINT Msg, WPARAM wParam, LPARAM lParam); 2067 WINUSERAPI WINBOOL WINAPI PostThreadMessageW (DWORD idThread, UINT Msg, WPARAM wParam, LPARAM lParam); 2068 2069 #define PostAppMessageA(idThread, wMsg, wParam, lParam) PostThreadMessageA ((DWORD)idThread, wMsg, wParam, lParam) 2070 #define PostAppMessageW(idThread, wMsg, wParam, lParam) PostThreadMessageW ((DWORD)idThread, wMsg, wParam, lParam) 2071 2072 WINUSERAPI WINBOOL WINAPI AttachThreadInput (DWORD idAttach, DWORD idAttachTo, WINBOOL fAttach); 2073 WINUSERAPI WINBOOL WINAPI ReplyMessage (LRESULT lResult); 2074 WINUSERAPI WINBOOL WINAPI WaitMessage (VOID); 2075 WINUSERAPI DWORD WINAPI WaitForInputIdle (HANDLE hProcess, DWORD dwMilliseconds); 2076 WINUSERAPI LRESULT WINAPI DefWindowProcA (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 2077 WINUSERAPI LRESULT WINAPI DefWindowProcW (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 2078 WINUSERAPI VOID WINAPI PostQuitMessage (int nExitCode); 2079 WINUSERAPI WINBOOL WINAPI InSendMessage (VOID); 2080 WINUSERAPI DWORD WINAPI InSendMessageEx (LPVOID lpReserved); 2081 WINUSERAPI UINT WINAPI GetDoubleClickTime (VOID); 2082 WINUSERAPI WINBOOL WINAPI SetDoubleClickTime (UINT); 2083 WINUSERAPI ATOM WINAPI RegisterClassA (CONST WNDCLASSA *lpWndClass); 2084 WINUSERAPI ATOM WINAPI RegisterClassW (CONST WNDCLASSW *lpWndClass); 2085 WINUSERAPI WINBOOL WINAPI UnregisterClassA (LPCSTR lpClassName, HINSTANCE hInstance); 2086 WINUSERAPI WINBOOL WINAPI UnregisterClassW (LPCWSTR lpClassName, HINSTANCE hInstance); 2087 WINUSERAPI WINBOOL WINAPI GetClassInfoA (HINSTANCE hInstance, LPCSTR lpClassName, LPWNDCLASSA lpWndClass); 2088 WINUSERAPI WINBOOL WINAPI GetClassInfoW (HINSTANCE hInstance, LPCWSTR lpClassName, LPWNDCLASSW lpWndClass); 2089 WINUSERAPI ATOM WINAPI RegisterClassExA (CONST WNDCLASSEXA *); 2090 WINUSERAPI ATOM WINAPI RegisterClassExW (CONST WNDCLASSEXW *); 2091 WINUSERAPI WINBOOL WINAPI GetClassInfoExA (HINSTANCE hInstance, LPCSTR lpszClass, LPWNDCLASSEXA lpwcx); 2092 WINUSERAPI WINBOOL WINAPI GetClassInfoExW (HINSTANCE hInstance, LPCWSTR lpszClass, LPWNDCLASSEXW lpwcx); 2093 2094 #ifdef STRICT 2095 WINUSERAPI LRESULT WINAPI CallWindowProcA (WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 2096 WINUSERAPI LRESULT WINAPI CallWindowProcW (WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 2097 #else 2098 WINUSERAPI LRESULT WINAPI CallWindowProcA (FARPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 2099 WINUSERAPI LRESULT WINAPI CallWindowProcW (FARPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 2100 #endif 2101 #endif 2102 2103 #define CW_USEDEFAULT ((int)0x80000000) 2104 2105 #define HWND_BROADCAST ((HWND)0xffff) 2106 #define HWND_MESSAGE ((HWND)-3) 2107 #define HWND_DESKTOP ((HWND)0) 2108 2109 #define ISMEX_NOSEND 0x00000000 2110 #define ISMEX_SEND 0x00000001 2111 #define ISMEX_NOTIFY 0x00000002 2112 #define ISMEX_CALLBACK 0x00000004 2113 #define ISMEX_REPLIED 0x00000008 2114 2115 #if (_WIN32_WINNT >= 0x0502) 2116 extern const GUID GUID_POWERSCHEME_PERSONALITY; 2117 extern const GUID GUID_MIN_POWER_SAVINGS; 2118 extern const GUID GUID_MAX_POWER_SAVINGS; 2119 extern const GUID GUID_TYPICAL_POWER_SAVINGS; 2120 extern const GUID GUID_ACDC_POWER_SOURCE; 2121 extern const GUID GUID_BATTERY_PERCENTAGE_REMAINING; 2122 extern const GUID GUID_IDLE_BACKGROUND_TASK; 2123 extern const GUID GUID_SYSTEM_AWAYMODE; 2124 extern const GUID GUID_MONITOR_POWER_ON; 2125 #endif 2126 2127 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2128 WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE hRecipient,LPVOID NotificationFilter,DWORD Flags); 2129 WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationW(HANDLE hRecipient,LPVOID NotificationFilter,DWORD Flags); 2130 WINUSERAPI WINBOOL WINAPI UnregisterDeviceNotification(HDEVNOTIFY Handle); 2131 2132 typedef BOOLEAN (WINAPI *PREGISTERCLASSNAMEW)(LPCWSTR); 2133 2134 #define CreateWindowEx __MINGW_NAME_AW(CreateWindowEx) 2135 #define CreateWindow __MINGW_NAME_AW(CreateWindow) 2136 2137 WINUSERAPI HWND WINAPI CreateWindowExA(DWORD dwExStyle,LPCSTR lpClassName,LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam); 2138 WINUSERAPI HWND WINAPI CreateWindowExW(DWORD dwExStyle,LPCWSTR lpClassName,LPCWSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam); 2139 2140 #define CreateWindowA(lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam) CreateWindowExA((DWORD)0,lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam) 2141 #define CreateWindowW(lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam) CreateWindowExW((DWORD)0,lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam) 2142 2143 WINUSERAPI WINBOOL WINAPI IsWindow(HWND hWnd); 2144 WINUSERAPI WINBOOL WINAPI IsMenu(HMENU hMenu); 2145 WINUSERAPI WINBOOL WINAPI IsChild(HWND hWndParent,HWND hWnd); 2146 WINUSERAPI WINBOOL WINAPI DestroyWindow(HWND hWnd); 2147 WINUSERAPI WINBOOL WINAPI ShowWindow(HWND hWnd,int nCmdShow); 2148 WINUSERAPI WINBOOL WINAPI AnimateWindow(HWND hWnd,DWORD dwTime,DWORD dwFlags); 2149 #endif 2150 2151 #if defined (_WINGDI_) && !defined (NOGDI) 2152 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2153 WINUSERAPI WINBOOL WINAPI UpdateLayeredWindow (HWND hWnd, HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags); 2154 2155 typedef struct tagUPDATELAYEREDWINDOWINFO { 2156 DWORD cbSize; 2157 HDC hdcDst; 2158 const POINT *pptDst; 2159 const SIZE *psize; 2160 HDC hdcSrc; 2161 const POINT *pptSrc; 2162 COLORREF crKey; 2163 const BLENDFUNCTION *pblend; 2164 DWORD dwFlags; 2165 const RECT *prcDirty; 2166 } UPDATELAYEREDWINDOWINFO,*PUPDATELAYEREDWINDOWINFO; 2167 2168 #if _WIN32_WINNT < 0x0502 2169 typedef 2170 #endif 2171 WINUSERAPI WINBOOL WINAPI UpdateLayeredWindowIndirect (HWND hWnd, const UPDATELAYEREDWINDOWINFO *pULWInfo); 2172 #endif 2173 #endif 2174 2175 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2176 WINUSERAPI WINBOOL WINAPI GetLayeredWindowAttributes (HWND hwnd, COLORREF *pcrKey, BYTE *pbAlpha, DWORD *pdwFlags); 2177 2178 #define PW_CLIENTONLY 0x00000001 2179 2180 WINUSERAPI WINBOOL WINAPI PrintWindow (HWND hwnd, HDC hdcBlt, UINT nFlags); 2181 WINUSERAPI WINBOOL WINAPI SetLayeredWindowAttributes (HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags); 2182 #endif 2183 2184 #define LWA_COLORKEY 0x00000001 2185 #define LWA_ALPHA 0x00000002 2186 2187 #define ULW_COLORKEY 0x00000001 2188 #define ULW_ALPHA 0x00000002 2189 #define ULW_OPAQUE 0x00000004 2190 #define ULW_EX_NORESIZE 0x00000008 2191 2192 #define FLASHW_STOP 0 2193 #define FLASHW_CAPTION 0x00000001 2194 #define FLASHW_TRAY 0x00000002 2195 #define FLASHW_ALL (FLASHW_CAPTION | FLASHW_TRAY) 2196 #define FLASHW_TIMER 0x00000004 2197 #define FLASHW_TIMERNOFG 0x0000000c 2198 2199 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2200 typedef struct { 2201 UINT cbSize; 2202 HWND hwnd; 2203 DWORD dwFlags; 2204 UINT uCount; 2205 DWORD dwTimeout; 2206 } FLASHWINFO,*PFLASHWINFO; 2207 2208 WINUSERAPI WINBOOL WINAPI ShowWindowAsync (HWND hWnd, int nCmdShow); 2209 WINUSERAPI WINBOOL WINAPI FlashWindow (HWND hWnd, WINBOOL bInvert); 2210 WINUSERAPI WINBOOL WINAPI FlashWindowEx (PFLASHWINFO pfwi); 2211 WINUSERAPI WINBOOL WINAPI ShowOwnedPopups (HWND hWnd, WINBOOL fShow); 2212 WINUSERAPI WINBOOL WINAPI OpenIcon (HWND hWnd); 2213 WINUSERAPI WINBOOL WINAPI CloseWindow (HWND hWnd); 2214 WINUSERAPI WINBOOL WINAPI MoveWindow (HWND hWnd, int X, int Y, int nWidth, int nHeight, WINBOOL bRepaint); 2215 WINUSERAPI WINBOOL WINAPI SetWindowPos (HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags); 2216 WINUSERAPI WINBOOL WINAPI GetWindowPlacement (HWND hWnd, WINDOWPLACEMENT *lpwndpl); 2217 WINUSERAPI WINBOOL WINAPI SetWindowPlacement (HWND hWnd, CONST WINDOWPLACEMENT *lpwndpl); 2218 2219 #if _WIN32_WINNT >= 0x0601 2220 #define WDA_NONE 0x00000000 2221 #define WDA_MONITOR 0x00000001 2222 2223 WINUSERAPI WINBOOL WINAPI GetWindowDisplayAffinity (HWND hWnd, DWORD *pdwAffinity); 2224 WINUSERAPI WINBOOL WINAPI SetWindowDisplayAffinity (HWND hWnd, DWORD dwAffinity); 2225 #endif 2226 #endif 2227 2228 #ifndef NODEFERWINDOWPOS 2229 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2230 WINUSERAPI HDWP WINAPI BeginDeferWindowPos (int nNumWindows); 2231 WINUSERAPI HDWP WINAPI DeferWindowPos (HDWP hWinPosInfo, HWND hWnd, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags); 2232 WINUSERAPI WINBOOL WINAPI EndDeferWindowPos (HDWP hWinPosInfo); 2233 #endif 2234 #endif 2235 2236 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2237 WINUSERAPI WINBOOL WINAPI IsWindowVisible (HWND hWnd); 2238 WINUSERAPI WINBOOL WINAPI IsIconic (HWND hWnd); 2239 WINUSERAPI WINBOOL WINAPI AnyPopup (VOID); 2240 WINUSERAPI WINBOOL WINAPI BringWindowToTop (HWND hWnd); 2241 WINUSERAPI WINBOOL WINAPI IsZoomed (HWND hWnd); 2242 #endif 2243 2244 #define SWP_NOSIZE 0x0001 2245 #define SWP_NOMOVE 0x0002 2246 #define SWP_NOZORDER 0x0004 2247 #define SWP_NOREDRAW 0x0008 2248 #define SWP_NOACTIVATE 0x0010 2249 #define SWP_FRAMECHANGED 0x0020 2250 #define SWP_SHOWWINDOW 0x0040 2251 #define SWP_HIDEWINDOW 0x0080 2252 #define SWP_NOCOPYBITS 0x0100 2253 #define SWP_NOOWNERZORDER 0x0200 2254 #define SWP_NOSENDCHANGING 0x0400 2255 2256 #define SWP_DRAWFRAME SWP_FRAMECHANGED 2257 #define SWP_NOREPOSITION SWP_NOOWNERZORDER 2258 #define SWP_DEFERERASE 0x2000 2259 #define SWP_ASYNCWINDOWPOS 0x4000 2260 2261 #define HWND_TOP ((HWND)0) 2262 #define HWND_BOTTOM ((HWND)1) 2263 #define HWND_TOPMOST ((HWND)-1) 2264 #define HWND_NOTOPMOST ((HWND)-2) 2265 2266 #ifndef NOCTLMGR 2267 2268 #include <pshpack2.h> 2269 2270 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 2271 typedef struct { 2272 DWORD style; 2273 DWORD dwExtendedStyle; 2274 WORD cdit; 2275 short x; 2276 short y; 2277 short cx; 2278 short cy; 2279 } DLGTEMPLATE; 2280 #endif 2281 2282 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2283 typedef DLGTEMPLATE *LPDLGTEMPLATEA; 2284 typedef DLGTEMPLATE *LPDLGTEMPLATEW; 2285 2286 __MINGW_TYPEDEF_AW(LPDLGTEMPLATE) 2287 #endif 2288 2289 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 2290 typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA; 2291 typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW; 2292 2293 __MINGW_TYPEDEF_AW(LPCDLGTEMPLATE) 2294 #endif 2295 2296 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2297 typedef struct { 2298 DWORD style; 2299 DWORD dwExtendedStyle; 2300 short x; 2301 short y; 2302 short cx; 2303 short cy; 2304 WORD id; 2305 } DLGITEMTEMPLATE; 2306 2307 typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA; 2308 typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW; 2309 2310 __MINGW_TYPEDEF_AW(PDLGITEMTEMPLATE) 2311 2312 typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA; 2313 typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW; 2314 2315 __MINGW_TYPEDEF_AW(LPDLGITEMTEMPLATE) 2316 #endif 2317 2318 #include <poppack.h> 2319 2320 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2321 #define CreateDialogParam __MINGW_NAME_AW(CreateDialogParam) 2322 #define CreateDialogIndirectParam __MINGW_NAME_AW(CreateDialogIndirectParam) 2323 #define CreateDialog __MINGW_NAME_AW(CreateDialog) 2324 #define CreateDialogIndirect __MINGW_NAME_AW(CreateDialogIndirect) 2325 #define DialogBoxParam __MINGW_NAME_AW(DialogBoxParam) 2326 #define DialogBoxIndirectParam __MINGW_NAME_AW(DialogBoxIndirectParam) 2327 #define DialogBox __MINGW_NAME_AW(DialogBox) 2328 #define DialogBoxIndirect __MINGW_NAME_AW(DialogBoxIndirect) 2329 #define SetDlgItemText __MINGW_NAME_AW(SetDlgItemText) 2330 #define GetDlgItemText __MINGW_NAME_AW(GetDlgItemText) 2331 #define SendDlgItemMessage __MINGW_NAME_AW(SendDlgItemMessage) 2332 #define DefDlgProc __MINGW_NAME_AW(DefDlgProc) 2333 2334 WINUSERAPI HWND WINAPI CreateDialogParamA(HINSTANCE hInstance,LPCSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam); 2335 WINUSERAPI HWND WINAPI CreateDialogParamW(HINSTANCE hInstance,LPCWSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam); 2336 WINUSERAPI HWND WINAPI CreateDialogIndirectParamA(HINSTANCE hInstance,LPCDLGTEMPLATEA lpTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam); 2337 WINUSERAPI HWND WINAPI CreateDialogIndirectParamW(HINSTANCE hInstance,LPCDLGTEMPLATEW lpTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam); 2338 2339 #define CreateDialogA(hInstance,lpName,hWndParent,lpDialogFunc) CreateDialogParamA(hInstance,lpName,hWndParent,lpDialogFunc,(LPARAM)0) 2340 #define CreateDialogW(hInstance,lpName,hWndParent,lpDialogFunc) CreateDialogParamW(hInstance,lpName,hWndParent,lpDialogFunc,(LPARAM)0) 2341 #define CreateDialogIndirectA(hInstance,lpTemplate,hWndParent,lpDialogFunc) CreateDialogIndirectParamA(hInstance,lpTemplate,hWndParent,lpDialogFunc,(LPARAM)0) 2342 #define CreateDialogIndirectW(hInstance,lpTemplate,hWndParent,lpDialogFunc) CreateDialogIndirectParamW(hInstance,lpTemplate,hWndParent,lpDialogFunc,(LPARAM)0) 2343 2344 WINUSERAPI INT_PTR WINAPI DialogBoxParamA(HINSTANCE hInstance,LPCSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam); 2345 WINUSERAPI INT_PTR WINAPI DialogBoxParamW(HINSTANCE hInstance,LPCWSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam); 2346 WINUSERAPI INT_PTR WINAPI DialogBoxIndirectParamA(HINSTANCE hInstance,LPCDLGTEMPLATEA hDialogTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam); 2347 WINUSERAPI INT_PTR WINAPI DialogBoxIndirectParamW(HINSTANCE hInstance,LPCDLGTEMPLATEW hDialogTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam); 2348 #define DialogBoxA(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxParamA(hInstance,lpTemplate,hWndParent,lpDialogFunc,(LPARAM)0) 2349 #define DialogBoxW(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxParamW(hInstance,lpTemplate,hWndParent,lpDialogFunc,(LPARAM)0) 2350 #define DialogBoxIndirectA(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxIndirectParamA(hInstance,lpTemplate,hWndParent,lpDialogFunc,(LPARAM)0) 2351 #define DialogBoxIndirectW(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxIndirectParamW(hInstance,lpTemplate,hWndParent,lpDialogFunc,(LPARAM)0) 2352 WINUSERAPI WINBOOL WINAPI EndDialog(HWND hDlg,INT_PTR nResult); 2353 WINUSERAPI HWND WINAPI GetDlgItem(HWND hDlg,int nIDDlgItem); 2354 WINUSERAPI WINBOOL WINAPI SetDlgItemInt(HWND hDlg,int nIDDlgItem,UINT uValue,WINBOOL bSigned); 2355 WINUSERAPI UINT WINAPI GetDlgItemInt(HWND hDlg,int nIDDlgItem,WINBOOL *lpTranslated,WINBOOL bSigned); 2356 WINUSERAPI WINBOOL WINAPI SetDlgItemTextA(HWND hDlg,int nIDDlgItem,LPCSTR lpString); 2357 WINUSERAPI WINBOOL WINAPI SetDlgItemTextW(HWND hDlg,int nIDDlgItem,LPCWSTR lpString); 2358 WINUSERAPI UINT WINAPI GetDlgItemTextA(HWND hDlg,int nIDDlgItem,LPSTR lpString,int cchMax); 2359 WINUSERAPI UINT WINAPI GetDlgItemTextW(HWND hDlg,int nIDDlgItem,LPWSTR lpString,int cchMax); 2360 WINUSERAPI WINBOOL WINAPI CheckDlgButton(HWND hDlg,int nIDButton,UINT uCheck); 2361 WINUSERAPI WINBOOL WINAPI CheckRadioButton(HWND hDlg,int nIDFirstButton,int nIDLastButton,int nIDCheckButton); 2362 WINUSERAPI UINT WINAPI IsDlgButtonChecked(HWND hDlg,int nIDButton); 2363 WINUSERAPI LRESULT WINAPI SendDlgItemMessageA(HWND hDlg,int nIDDlgItem,UINT Msg,WPARAM wParam,LPARAM lParam); 2364 WINUSERAPI LRESULT WINAPI SendDlgItemMessageW(HWND hDlg,int nIDDlgItem,UINT Msg,WPARAM wParam,LPARAM lParam); 2365 WINUSERAPI HWND WINAPI GetNextDlgGroupItem(HWND hDlg,HWND hCtl,WINBOOL bPrevious); 2366 WINUSERAPI HWND WINAPI GetNextDlgTabItem(HWND hDlg,HWND hCtl,WINBOOL bPrevious); 2367 WINUSERAPI int WINAPI GetDlgCtrlID(HWND hWnd); 2368 WINUSERAPI __LONG32 WINAPI GetDialogBaseUnits(VOID); 2369 WINUSERAPI LRESULT WINAPI DefDlgProcA(HWND hDlg,UINT Msg,WPARAM wParam,LPARAM lParam); 2370 WINUSERAPI LRESULT WINAPI DefDlgProcW(HWND hDlg,UINT Msg,WPARAM wParam,LPARAM lParam); 2371 #endif 2372 2373 #define DLGWINDOWEXTRA 30 2374 #endif 2375 2376 #ifndef NOMSG 2377 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2378 #define CallMsgFilter __MINGW_NAME_AW(CallMsgFilter) 2379 2380 WINUSERAPI WINBOOL WINAPI CallMsgFilterA(LPMSG lpMsg,int nCode); 2381 WINUSERAPI WINBOOL WINAPI CallMsgFilterW(LPMSG lpMsg,int nCode); 2382 #endif 2383 #endif 2384 2385 #ifndef NOCLIPBOARD 2386 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2387 #define RegisterClipboardFormat __MINGW_NAME_AW(RegisterClipboardFormat) 2388 #define GetClipboardFormatName __MINGW_NAME_AW(GetClipboardFormatName) 2389 2390 WINUSERAPI WINBOOL WINAPI OpenClipboard(HWND hWndNewOwner); 2391 WINUSERAPI WINBOOL WINAPI CloseClipboard(VOID); 2392 WINUSERAPI DWORD WINAPI GetClipboardSequenceNumber(VOID); 2393 WINUSERAPI HWND WINAPI GetClipboardOwner(VOID); 2394 WINUSERAPI HWND WINAPI SetClipboardViewer(HWND hWndNewViewer); 2395 WINUSERAPI HWND WINAPI GetClipboardViewer(VOID); 2396 WINUSERAPI WINBOOL WINAPI ChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext); 2397 WINUSERAPI HANDLE WINAPI SetClipboardData(UINT uFormat, HANDLE hMem); 2398 WINUSERAPI HANDLE WINAPI GetClipboardData(UINT uFormat); 2399 WINUSERAPI UINT WINAPI RegisterClipboardFormatA(LPCSTR lpszFormat); 2400 WINUSERAPI UINT WINAPI RegisterClipboardFormatW(LPCWSTR lpszFormat); 2401 WINUSERAPI int WINAPI CountClipboardFormats(VOID); 2402 WINUSERAPI UINT WINAPI EnumClipboardFormats(UINT format); 2403 WINUSERAPI int WINAPI GetClipboardFormatNameA(UINT format, LPSTR lpszFormatName, int cchMaxCount); 2404 WINUSERAPI int WINAPI GetClipboardFormatNameW(UINT format, LPWSTR lpszFormatName, int cchMaxCount); 2405 WINUSERAPI WINBOOL WINAPI EmptyClipboard(VOID); 2406 WINUSERAPI WINBOOL WINAPI IsClipboardFormatAvailable(UINT format); 2407 WINUSERAPI int WINAPI GetPriorityClipboardFormat(UINT *paFormatPriorityList, int cFormats); 2408 WINUSERAPI HWND WINAPI GetOpenClipboardWindow(VOID); 2409 #if WINVER >= 0x0600 2410 WINUSERAPI WINBOOL WINAPI AddClipboardFormatListener (HWND hwnd); 2411 WINUSERAPI WINBOOL WINAPI RemoveClipboardFormatListener (HWND hwnd); 2412 WINUSERAPI WINBOOL WINAPI GetUpdatedClipboardFormats (PUINT lpuiFormats, UINT cFormats, PUINT pcFormatsOut); 2413 #endif 2414 #endif 2415 #endif 2416 2417 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2418 #define CharToOem __MINGW_NAME_AW(CharToOem) 2419 #define OemToChar __MINGW_NAME_AW(OemToChar) 2420 #define CharToOemBuff __MINGW_NAME_AW(CharToOemBuff) 2421 #define OemToCharBuff __MINGW_NAME_AW(OemToCharBuff) 2422 #define CharUpper __MINGW_NAME_AW(CharUpper) 2423 #define CharUpperBuff __MINGW_NAME_AW(CharUpperBuff) 2424 #define CharLower __MINGW_NAME_AW(CharLower) 2425 #define CharLowerBuff __MINGW_NAME_AW(CharLowerBuff) 2426 #define CharNext __MINGW_NAME_AW(CharNext) 2427 #define CharPrev __MINGW_NAME_AW(CharPrev) 2428 2429 WINUSERAPI WINBOOL WINAPI CharToOemA(LPCSTR lpszSrc,LPSTR lpszDst); 2430 WINUSERAPI WINBOOL WINAPI CharToOemW(LPCWSTR lpszSrc,LPSTR lpszDst); 2431 WINUSERAPI WINBOOL WINAPI OemToCharA(LPCSTR lpszSrc,LPSTR lpszDst); 2432 WINUSERAPI WINBOOL WINAPI OemToCharW(LPCSTR lpszSrc,LPWSTR lpszDst); 2433 WINUSERAPI WINBOOL WINAPI CharToOemBuffA(LPCSTR lpszSrc,LPSTR lpszDst,DWORD cchDstLength); 2434 WINUSERAPI WINBOOL WINAPI CharToOemBuffW(LPCWSTR lpszSrc,LPSTR lpszDst,DWORD cchDstLength); 2435 WINUSERAPI WINBOOL WINAPI OemToCharBuffA(LPCSTR lpszSrc,LPSTR lpszDst,DWORD cchDstLength); 2436 WINUSERAPI WINBOOL WINAPI OemToCharBuffW(LPCSTR lpszSrc,LPWSTR lpszDst,DWORD cchDstLength); 2437 WINUSERAPI LPSTR WINAPI CharUpperA(LPSTR lpsz); 2438 WINUSERAPI LPWSTR WINAPI CharUpperW(LPWSTR lpsz); 2439 WINUSERAPI DWORD WINAPI CharUpperBuffA(LPSTR lpsz,DWORD cchLength); 2440 WINUSERAPI DWORD WINAPI CharUpperBuffW(LPWSTR lpsz,DWORD cchLength); 2441 WINUSERAPI LPSTR WINAPI CharLowerA(LPSTR lpsz); 2442 WINUSERAPI LPWSTR WINAPI CharLowerW(LPWSTR lpsz); 2443 WINUSERAPI DWORD WINAPI CharLowerBuffA(LPSTR lpsz,DWORD cchLength); 2444 WINUSERAPI DWORD WINAPI CharLowerBuffW(LPWSTR lpsz,DWORD cchLength); 2445 WINUSERAPI LPSTR WINAPI CharNextA(LPCSTR lpsz); 2446 WINUSERAPI LPWSTR WINAPI CharNextW(LPCWSTR lpsz); 2447 WINUSERAPI LPSTR WINAPI CharPrevA(LPCSTR lpszStart,LPCSTR lpszCurrent); 2448 WINUSERAPI LPWSTR WINAPI CharPrevW(LPCWSTR lpszStart,LPCWSTR lpszCurrent); 2449 WINUSERAPI LPSTR WINAPI CharNextExA(WORD CodePage,LPCSTR lpCurrentChar,DWORD dwFlags); 2450 WINUSERAPI LPSTR WINAPI CharPrevExA(WORD CodePage,LPCSTR lpStart,LPCSTR lpCurrentChar,DWORD dwFlags); 2451 #endif 2452 2453 #define AnsiToOem CharToOemA 2454 #define OemToAnsi OemToCharA 2455 #define AnsiToOemBuff CharToOemBuffA 2456 #define OemToAnsiBuff OemToCharBuffA 2457 #define AnsiUpper CharUpperA 2458 #define AnsiUpperBuff CharUpperBuffA 2459 #define AnsiLower CharLowerA 2460 #define AnsiLowerBuff CharLowerBuffA 2461 #define AnsiNext CharNextA 2462 #define AnsiPrev CharPrevA 2463 2464 #ifndef NOLANGUAGE 2465 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2466 #define IsCharAlpha __MINGW_NAME_AW(IsCharAlpha) 2467 #define IsCharAlphaNumeric __MINGW_NAME_AW(IsCharAlphaNumeric) 2468 #define IsCharUpper __MINGW_NAME_AW(IsCharUpper) 2469 #define IsCharLower __MINGW_NAME_AW(IsCharLower) 2470 2471 WINUSERAPI WINBOOL WINAPI IsCharAlphaA(CHAR ch); 2472 WINUSERAPI WINBOOL WINAPI IsCharAlphaW(WCHAR ch); 2473 WINUSERAPI WINBOOL WINAPI IsCharAlphaNumericA(CHAR ch); 2474 WINUSERAPI WINBOOL WINAPI IsCharAlphaNumericW(WCHAR ch); 2475 WINUSERAPI WINBOOL WINAPI IsCharUpperA(CHAR ch); 2476 WINUSERAPI WINBOOL WINAPI IsCharUpperW(WCHAR ch); 2477 WINUSERAPI WINBOOL WINAPI IsCharLowerA(CHAR ch); 2478 WINUSERAPI WINBOOL WINAPI IsCharLowerW(WCHAR ch); 2479 #endif 2480 #endif 2481 2482 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2483 #define GetKeyNameText __MINGW_NAME_AW(GetKeyNameText) 2484 #define VkKeyScan __MINGW_NAME_AW(VkKeyScan) 2485 #define VkKeyScanEx __MINGW_NAME_AW(VkKeyScanEx) 2486 2487 WINUSERAPI HWND WINAPI SetFocus(HWND hWnd); 2488 WINUSERAPI HWND WINAPI GetActiveWindow(VOID); 2489 WINUSERAPI HWND WINAPI GetFocus(VOID); 2490 WINUSERAPI UINT WINAPI GetKBCodePage(VOID); 2491 WINUSERAPI SHORT WINAPI GetKeyState(int nVirtKey); 2492 WINUSERAPI SHORT WINAPI GetAsyncKeyState(int vKey); 2493 WINUSERAPI WINBOOL WINAPI GetKeyboardState(PBYTE lpKeyState); 2494 WINUSERAPI WINBOOL WINAPI SetKeyboardState(LPBYTE lpKeyState); 2495 WINUSERAPI int WINAPI GetKeyNameTextA(LONG lParam,LPSTR lpString,int cchSize); 2496 WINUSERAPI int WINAPI GetKeyNameTextW(LONG lParam,LPWSTR lpString,int cchSize); 2497 WINUSERAPI int WINAPI GetKeyboardType(int nTypeFlag); 2498 WINUSERAPI int WINAPI ToAscii(UINT uVirtKey,UINT uScanCode,CONST BYTE *lpKeyState,LPWORD lpChar,UINT uFlags); 2499 WINUSERAPI int WINAPI ToAsciiEx(UINT uVirtKey,UINT uScanCode,CONST BYTE *lpKeyState,LPWORD lpChar,UINT uFlags,HKL dwhkl); 2500 WINUSERAPI int WINAPI ToUnicode(UINT wVirtKey,UINT wScanCode,CONST BYTE *lpKeyState,LPWSTR pwszBuff,int cchBuff,UINT wFlags); 2501 WINUSERAPI DWORD WINAPI OemKeyScan(WORD wOemChar); 2502 WINUSERAPI SHORT WINAPI VkKeyScanA(CHAR ch); 2503 WINUSERAPI SHORT WINAPI VkKeyScanW(WCHAR ch); 2504 WINUSERAPI SHORT WINAPI VkKeyScanExA(CHAR ch,HKL dwhkl); 2505 WINUSERAPI SHORT WINAPI VkKeyScanExW(WCHAR ch,HKL dwhkl); 2506 WINUSERAPI VOID WINAPI keybd_event(BYTE bVk,BYTE bScan,DWORD dwFlags,ULONG_PTR dwExtraInfo); 2507 #endif 2508 2509 #define KEYEVENTF_EXTENDEDKEY 0x0001 2510 #define KEYEVENTF_KEYUP 0x0002 2511 #define KEYEVENTF_UNICODE 0x0004 2512 #define KEYEVENTF_SCANCODE 0x0008 2513 2514 #define MOUSEEVENTF_MOVE 0x0001 2515 #define MOUSEEVENTF_LEFTDOWN 0x0002 2516 #define MOUSEEVENTF_LEFTUP 0x0004 2517 #define MOUSEEVENTF_RIGHTDOWN 0x0008 2518 #define MOUSEEVENTF_RIGHTUP 0x0010 2519 #define MOUSEEVENTF_MIDDLEDOWN 0x0020 2520 #define MOUSEEVENTF_MIDDLEUP 0x0040 2521 #define MOUSEEVENTF_XDOWN 0x0080 2522 #define MOUSEEVENTF_XUP 0x0100 2523 #define MOUSEEVENTF_WHEEL 0x0800 2524 #if _WIN32_WINNT >= 0x0600 2525 #define MOUSEEVENTF_HWHEEL 0x01000 2526 #endif 2527 #if WINVER >= 0x0600 2528 #define MOUSEEVENTF_MOVE_NOCOALESCE 0x2000 2529 #endif 2530 #define MOUSEEVENTF_VIRTUALDESK 0x4000 2531 #define MOUSEEVENTF_ABSOLUTE 0x8000 2532 2533 #define INPUT_MOUSE 0 2534 #define INPUT_KEYBOARD 1 2535 #define INPUT_HARDWARE 2 2536 2537 #if WINVER >= 0x0601 2538 #define TOUCH_COORD_TO_PIXEL(l) ((l) / 100) 2539 2540 #define TOUCHEVENTF_MOVE 0x0001 2541 #define TOUCHEVENTF_DOWN 0x0002 2542 #define TOUCHEVENTF_UP 0x0004 2543 #define TOUCHEVENTF_INRANGE 0x0008 2544 #define TOUCHEVENTF_PRIMARY 0x0010 2545 #define TOUCHEVENTF_NOCOALESCE 0x0020 2546 #define TOUCHEVENTF_PEN 0x0040 2547 #define TOUCHEVENTF_PALM 0x0080 2548 2549 #define TOUCHINPUTMASKF_TIMEFROMSYSTEM 0x0001 2550 #define TOUCHINPUTMASKF_EXTRAINFO 0x0002 2551 #define TOUCHINPUTMASKF_CONTACTAREA 0x0004 2552 2553 #define TWF_FINETOUCH (0x00000001) 2554 #define TWF_WANTPALM (0x00000002) 2555 #endif 2556 2557 #if WINVER >= 0x0602 2558 #define POINTER_FLAG_NONE 0x00000000 2559 #define POINTER_FLAG_NEW 0x00000001 2560 #define POINTER_FLAG_INRANGE 0x00000002 2561 #define POINTER_FLAG_INCONTACT 0x00000004 2562 #define POINTER_FLAG_FIRSTBUTTON 0x00000010 2563 #define POINTER_FLAG_SECONDBUTTON 0x00000020 2564 #define POINTER_FLAG_THIRDBUTTON 0x00000040 2565 #define POINTER_FLAG_FOURTHBUTTON 0x00000080 2566 #define POINTER_FLAG_FIFTHBUTTON 0x00000100 2567 #define POINTER_FLAG_PRIMARY 0x00002000 2568 #define POINTER_FLAG_CONFIDENCE 0x00004000 2569 #define POINTER_FLAG_CANCELED 0x00008000 2570 #define POINTER_FLAG_DOWN 0x00010000 2571 #define POINTER_FLAG_UPDATE 0x00020000 2572 #define POINTER_FLAG_UP 0x00040000 2573 #define POINTER_FLAG_WHEEL 0x00080000 2574 #define POINTER_FLAG_HWHEEL 0x00100000 2575 #define POINTER_FLAG_CAPTURECHANGED 0x00200000 2576 2577 #define POINTER_MOD_SHIFT (0x0004) 2578 #define POINTER_MOD_CTRL (0x0008) 2579 2580 #define TOUCH_FLAG_NONE 0x00000000 2581 2582 #define TOUCH_MASK_NONE 0x00000000 2583 #define TOUCH_MASK_CONTACTAREA 0x00000001 2584 #define TOUCH_MASK_ORIENTATION 0x00000002 2585 #define TOUCH_MASK_PRESSURE 0x00000004 2586 2587 #define PEN_FLAG_NONE 0x00000000 2588 #define PEN_FLAG_BARREL 0x00000001 2589 #define PEN_FLAG_INVERTED 0x00000002 2590 #define PEN_FLAG_ERASER 0x00000004 2591 2592 #define PEN_MASK_NONE 0x00000000 2593 #define PEN_MASK_PRESSURE 0x00000001 2594 #define PEN_MASK_ROTATION 0x00000002 2595 #define PEN_MASK_TILT_X 0x00000004 2596 #define PEN_MASK_TILT_Y 0x00000008 2597 2598 #define POINTER_MESSAGE_FLAG_NEW 0x00000001 2599 #define POINTER_MESSAGE_FLAG_INRANGE 0x00000002 2600 #define POINTER_MESSAGE_FLAG_INCONTACT 0x00000004 2601 #define POINTER_MESSAGE_FLAG_FIRSTBUTTON 0x00000010 2602 #define POINTER_MESSAGE_FLAG_SECONDBUTTON 0x00000020 2603 #define POINTER_MESSAGE_FLAG_THIRDBUTTON 0x00000040 2604 #define POINTER_MESSAGE_FLAG_FOURTHBUTTON 0x00000080 2605 #define POINTER_MESSAGE_FLAG_FIFTHBUTTON 0x00000100 2606 #define POINTER_MESSAGE_FLAG_PRIMARY 0x00002000 2607 #define POINTER_MESSAGE_FLAG_CONFIDENCE 0x00004000 2608 #define POINTER_MESSAGE_FLAG_CANCELED 0x00008000 2609 2610 #define GET_POINTERID_WPARAM(wParam) (LOWORD (wParam)) 2611 #define IS_POINTER_FLAG_SET_WPARAM(wParam, flag) (((DWORD)HIWORD (wParam) &(flag)) == (flag)) 2612 #define IS_POINTER_NEW_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_NEW) 2613 #define IS_POINTER_INRANGE_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_INRANGE) 2614 #define IS_POINTER_INCONTACT_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_INCONTACT) 2615 #define IS_POINTER_FIRSTBUTTON_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_FIRSTBUTTON) 2616 #define IS_POINTER_SECONDBUTTON_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_SECONDBUTTON) 2617 #define IS_POINTER_THIRDBUTTON_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_THIRDBUTTON) 2618 #define IS_POINTER_FOURTHBUTTON_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_FOURTHBUTTON) 2619 #define IS_POINTER_FIFTHBUTTON_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_FIFTHBUTTON) 2620 #define IS_POINTER_PRIMARY_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_PRIMARY) 2621 #define HAS_POINTER_CONFIDENCE_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_CONFIDENCE) 2622 #define IS_POINTER_CANCELED_WPARAM(wParam) IS_POINTER_FLAG_SET_WPARAM (wParam, POINTER_MESSAGE_FLAG_CANCELED) 2623 2624 #define PA_ACTIVATE MA_ACTIVATE 2625 #define PA_NOACTIVATE MA_NOACTIVATE 2626 2627 #define MAX_TOUCH_COUNT 256 2628 2629 #define TOUCH_FEEDBACK_DEFAULT 0x1 2630 #define TOUCH_FEEDBACK_INDIRECT 0x2 2631 #define TOUCH_FEEDBACK_NONE 0x3 2632 2633 #define TOUCH_HIT_TESTING_DEFAULT 0x0 2634 #define TOUCH_HIT_TESTING_CLIENT 0x1 2635 #define TOUCH_HIT_TESTING_NONE 0x2 2636 2637 #define TOUCH_HIT_TESTING_PROXIMITY_CLOSEST 0x0 2638 #define TOUCH_HIT_TESTING_PROXIMITY_FARTHEST 0xfff 2639 2640 #define GWFS_INCLUDE_ANCESTORS 0x00000001 2641 #endif 2642 2643 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2644 WINUSERAPI VOID WINAPI mouse_event(DWORD dwFlags,DWORD dx,DWORD dy,DWORD dwData,ULONG_PTR dwExtraInfo); 2645 2646 typedef struct tagMOUSEINPUT { 2647 LONG dx; 2648 LONG dy; 2649 DWORD mouseData; 2650 DWORD dwFlags; 2651 DWORD time; 2652 ULONG_PTR dwExtraInfo; 2653 } MOUSEINPUT,*PMOUSEINPUT,*LPMOUSEINPUT; 2654 2655 typedef struct tagKEYBDINPUT { 2656 WORD wVk; 2657 WORD wScan; 2658 DWORD dwFlags; 2659 DWORD time; 2660 ULONG_PTR dwExtraInfo; 2661 } KEYBDINPUT,*PKEYBDINPUT,*LPKEYBDINPUT; 2662 2663 typedef struct tagHARDWAREINPUT { 2664 DWORD uMsg; 2665 WORD wParamL; 2666 WORD wParamH; 2667 } HARDWAREINPUT,*PHARDWAREINPUT,*LPHARDWAREINPUT; 2668 2669 typedef struct tagINPUT { 2670 DWORD type; 2671 __C89_NAMELESS union { 2672 MOUSEINPUT mi; 2673 KEYBDINPUT ki; 2674 HARDWAREINPUT hi; 2675 } DUMMYUNIONNAME; 2676 } INPUT,*PINPUT,*LPINPUT; 2677 2678 WINUSERAPI UINT WINAPI SendInput(UINT cInputs,LPINPUT pInputs,int cbSize); 2679 2680 #if WINVER >= 0x0601 2681 DECLARE_HANDLE (HTOUCHINPUT); 2682 2683 typedef struct tagTOUCHINPUT { 2684 LONG x; 2685 LONG y; 2686 HANDLE hSource; 2687 DWORD dwID; 2688 DWORD dwFlags; 2689 DWORD dwMask; 2690 DWORD dwTime; 2691 ULONG_PTR dwExtraInfo; 2692 DWORD cxContact; 2693 DWORD cyContact; 2694 } TOUCHINPUT,*PTOUCHINPUT; 2695 2696 typedef const TOUCHINPUT *PCTOUCHINPUT; 2697 2698 WINUSERAPI WINBOOL WINAPI GetTouchInputInfo (HTOUCHINPUT hTouchInput, UINT cInputs, PTOUCHINPUT pInputs, int cbSize); 2699 WINUSERAPI WINBOOL WINAPI CloseTouchInputHandle (HTOUCHINPUT hTouchInput); 2700 WINUSERAPI WINBOOL WINAPI RegisterTouchWindow (HWND hwnd, ULONG ulFlags); 2701 WINUSERAPI WINBOOL WINAPI UnregisterTouchWindow (HWND hwnd); 2702 WINUSERAPI WINBOOL WINAPI IsTouchWindow (HWND hwnd, PULONG pulFlags); 2703 #endif 2704 2705 #if WINVER >= 0x0602 2706 typedef DWORD POINTER_INPUT_TYPE; 2707 typedef UINT32 POINTER_FLAGS; 2708 typedef UINT32 TOUCH_FLAGS; 2709 typedef UINT32 TOUCH_MASK; 2710 typedef UINT32 PEN_FLAGS; 2711 typedef UINT32 PEN_MASK; 2712 2713 enum tagPOINTER_INPUT_TYPE { 2714 PT_POINTER = 0x00000001, 2715 PT_TOUCH = 0x00000002, 2716 PT_PEN = 0x00000003, 2717 PT_MOUSE = 0x00000004, 2718 }; 2719 2720 typedef enum tagFEEDBACK_TYPE { 2721 FEEDBACK_TOUCH_CONTACTVISUALIZATION = 1, 2722 FEEDBACK_PEN_BARRELVISUALIZATION = 2, 2723 FEEDBACK_PEN_TAP = 3, 2724 FEEDBACK_PEN_DOUBLETAP = 4, 2725 FEEDBACK_PEN_PRESSANDHOLD = 5, 2726 FEEDBACK_PEN_RIGHTTAP = 6, 2727 FEEDBACK_TOUCH_TAP = 7, 2728 FEEDBACK_TOUCH_DOUBLETAP = 8, 2729 FEEDBACK_TOUCH_PRESSANDHOLD = 9, 2730 FEEDBACK_TOUCH_RIGHTTAP = 10, 2731 FEEDBACK_GESTURE_PRESSANDTAP = 11, 2732 FEEDBACK_MAX = 0xffffffff 2733 } FEEDBACK_TYPE; 2734 2735 typedef enum tagPOINTER_BUTTON_CHANGE_TYPE { 2736 POINTER_CHANGE_NONE, 2737 POINTER_CHANGE_FIRSTBUTTON_DOWN, 2738 POINTER_CHANGE_FIRSTBUTTON_UP, 2739 POINTER_CHANGE_SECONDBUTTON_DOWN, 2740 POINTER_CHANGE_SECONDBUTTON_UP, 2741 POINTER_CHANGE_THIRDBUTTON_DOWN, 2742 POINTER_CHANGE_THIRDBUTTON_UP, 2743 POINTER_CHANGE_FOURTHBUTTON_DOWN, 2744 POINTER_CHANGE_FOURTHBUTTON_UP, 2745 POINTER_CHANGE_FIFTHBUTTON_DOWN, 2746 POINTER_CHANGE_FIFTHBUTTON_UP, 2747 } POINTER_BUTTON_CHANGE_TYPE; 2748 2749 typedef struct tagPOINTER_INFO { 2750 POINTER_INPUT_TYPE pointerType; 2751 UINT32 pointerId; 2752 UINT32 frameId; 2753 POINTER_FLAGS pointerFlags; 2754 HANDLE sourceDevice; 2755 HWND hwndTarget; 2756 POINT ptPixelLocation; 2757 POINT ptHimetricLocation; 2758 POINT ptPixelLocationRaw; 2759 POINT ptHimetricLocationRaw; 2760 DWORD dwTime; 2761 UINT32 historyCount; 2762 INT32 InputData; 2763 DWORD dwKeyStates; 2764 UINT64 PerformanceCount; 2765 POINTER_BUTTON_CHANGE_TYPE ButtonChangeType; 2766 } POINTER_INFO; 2767 2768 typedef struct tagPOINTER_TOUCH_INFO { 2769 POINTER_INFO pointerInfo; 2770 TOUCH_FLAGS touchFlags; 2771 TOUCH_MASK touchMask; 2772 RECT rcContact; 2773 RECT rcContactRaw; 2774 UINT32 orientation; 2775 UINT32 pressure; 2776 } POINTER_TOUCH_INFO; 2777 2778 typedef struct tagPOINTER_PEN_INFO { 2779 POINTER_INFO pointerInfo; 2780 PEN_FLAGS penFlags; 2781 PEN_MASK penMask; 2782 UINT32 pressure; 2783 UINT32 rotation; 2784 INT32 tiltX; 2785 INT32 tiltY; 2786 } POINTER_PEN_INFO; 2787 2788 typedef struct tagTOUCH_HIT_TESTING_PROXIMITY_EVALUATION { 2789 UINT16 score; 2790 POINT adjustedPoint; 2791 } TOUCH_HIT_TESTING_PROXIMITY_EVALUATION,*PTOUCH_HIT_TESTING_PROXIMITY_EVALUATION; 2792 2793 typedef struct tagTOUCH_HIT_TESTING_INPUT { 2794 UINT32 pointerId; 2795 POINT point; 2796 RECT boundingBox; 2797 RECT nonOccludedBoundingBox; 2798 UINT32 orientation; 2799 } TOUCH_HIT_TESTING_INPUT,*PTOUCH_HIT_TESTING_INPUT; 2800 2801 WINUSERAPI WINBOOL WINAPI InitializeTouchInjection (UINT32 maxCount, DWORD dwMode); 2802 WINUSERAPI WINBOOL WINAPI InjectTouchInput (UINT32 count, CONST POINTER_TOUCH_INFO *contacts); 2803 WINUSERAPI WINBOOL WINAPI GetPointerType (UINT32 pointerId, POINTER_INPUT_TYPE *pointerType); 2804 WINUSERAPI WINBOOL WINAPI GetPointerCursorId (UINT32 pointerId, UINT32 *cursorId); 2805 WINUSERAPI WINBOOL WINAPI GetPointerInfo (UINT32 pointerId, POINTER_INFO *pointerInfo); 2806 WINUSERAPI WINBOOL WINAPI GetPointerInfoHistory (UINT32 pointerId, UINT32 *entriesCount, POINTER_INFO *pointerInfo); 2807 WINUSERAPI WINBOOL WINAPI GetPointerFrameInfo (UINT32 pointerId, UINT32 *pointerCount, POINTER_INFO *pointerInfo); 2808 WINUSERAPI WINBOOL WINAPI GetPointerFrameInfoHistory (UINT32 pointerId, UINT32 *entriesCount, UINT32 *pointerCount, POINTER_INFO *pointerInfo); 2809 WINUSERAPI WINBOOL WINAPI GetPointerTouchInfo (UINT32 pointerId, POINTER_TOUCH_INFO *touchInfo); 2810 WINUSERAPI WINBOOL WINAPI GetPointerTouchInfoHistory (UINT32 pointerId, UINT32 *entriesCount, POINTER_TOUCH_INFO *touchInfo); 2811 WINUSERAPI WINBOOL WINAPI GetPointerFrameTouchInfo (UINT32 pointerId, UINT32 *pointerCount, POINTER_TOUCH_INFO *touchInfo); 2812 WINUSERAPI WINBOOL WINAPI GetPointerFrameTouchInfoHistory (UINT32 pointerId, UINT32 *entriesCount, UINT32 *pointerCount, POINTER_TOUCH_INFO *touchInfo); 2813 WINUSERAPI WINBOOL WINAPI GetPointerPenInfo (UINT32 pointerId, POINTER_PEN_INFO *penInfo); 2814 WINUSERAPI WINBOOL WINAPI GetPointerPenInfoHistory (UINT32 pointerId, UINT32 *entriesCount, POINTER_PEN_INFO *penInfo); 2815 WINUSERAPI WINBOOL WINAPI GetPointerFramePenInfo (UINT32 pointerId, UINT32 *pointerCount, POINTER_PEN_INFO *penInfo); 2816 WINUSERAPI WINBOOL WINAPI GetPointerFramePenInfoHistory (UINT32 pointerId, UINT32 *entriesCount, UINT32 *pointerCount, POINTER_PEN_INFO *penInfo); 2817 WINUSERAPI WINBOOL WINAPI SkipPointerFrameMessages (UINT32 pointerId); 2818 WINUSERAPI WINBOOL WINAPI RegisterPointerInputTarget (HWND hwnd, POINTER_INPUT_TYPE pointerType); 2819 WINUSERAPI WINBOOL WINAPI UnregisterPointerInputTarget (HWND hwnd, POINTER_INPUT_TYPE pointerType); 2820 WINUSERAPI WINBOOL WINAPI EnableMouseInPointer (WINBOOL fEnable); 2821 WINUSERAPI WINBOOL WINAPI IsMouseInPointerEnabled (VOID); 2822 WINUSERAPI WINBOOL WINAPI RegisterTouchHitTestingWindow (HWND hwnd, ULONG value); 2823 WINUSERAPI WINBOOL WINAPI EvaluateProximityToRect (const RECT *controlBoundingBox, const TOUCH_HIT_TESTING_INPUT *pHitTestingInput, TOUCH_HIT_TESTING_PROXIMITY_EVALUATION *pProximityEval); 2824 WINUSERAPI WINBOOL WINAPI EvaluateProximityToPolygon (UINT32 numVertices, const POINT *controlPolygon, const TOUCH_HIT_TESTING_INPUT *pHitTestingInput, TOUCH_HIT_TESTING_PROXIMITY_EVALUATION *pProximityEval); 2825 WINUSERAPI LRESULT WINAPI PackTouchHitTestingProximityEvaluation (const TOUCH_HIT_TESTING_INPUT *pHitTestingInput, const TOUCH_HIT_TESTING_PROXIMITY_EVALUATION *pProximityEval); 2826 WINUSERAPI WINBOOL WINAPI GetWindowFeedbackSetting (HWND hwnd, FEEDBACK_TYPE feedback, DWORD dwFlags, UINT32 *pSize, VOID *config); 2827 WINUSERAPI WINBOOL WINAPI SetWindowFeedbackSetting (HWND hwnd, FEEDBACK_TYPE feedback, DWORD dwFlags, UINT32 size, CONST VOID *configuration); 2828 #endif 2829 2830 typedef struct tagLASTINPUTINFO { 2831 UINT cbSize; 2832 DWORD dwTime; 2833 } LASTINPUTINFO,*PLASTINPUTINFO; 2834 2835 #define MapVirtualKey __MINGW_NAME_AW(MapVirtualKey) 2836 #define MapVirtualKeyEx __MINGW_NAME_AW(MapVirtualKeyEx) 2837 2838 WINUSERAPI WINBOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii); 2839 WINUSERAPI UINT WINAPI MapVirtualKeyA(UINT uCode,UINT uMapType); 2840 WINUSERAPI UINT WINAPI MapVirtualKeyW(UINT uCode,UINT uMapType); 2841 WINUSERAPI UINT WINAPI MapVirtualKeyExA(UINT uCode,UINT uMapType,HKL dwhkl); 2842 WINUSERAPI UINT WINAPI MapVirtualKeyExW(UINT uCode,UINT uMapType,HKL dwhkl); 2843 WINUSERAPI WINBOOL WINAPI GetInputState(VOID); 2844 WINUSERAPI DWORD WINAPI GetQueueStatus(UINT flags); 2845 WINUSERAPI HWND WINAPI GetCapture(VOID); 2846 WINUSERAPI HWND WINAPI SetCapture(HWND hWnd); 2847 WINUSERAPI WINBOOL WINAPI ReleaseCapture(VOID); 2848 WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjects(DWORD nCount,CONST HANDLE *pHandles,WINBOOL fWaitAll,DWORD dwMilliseconds,DWORD dwWakeMask); 2849 WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjectsEx(DWORD nCount,CONST HANDLE *pHandles,DWORD dwMilliseconds,DWORD dwWakeMask,DWORD dwFlags); 2850 #endif 2851 2852 #define MAPVK_VK_TO_VSC (0) 2853 #define MAPVK_VSC_TO_VK (1) 2854 #define MAPVK_VK_TO_CHAR (2) 2855 #define MAPVK_VSC_TO_VK_EX (3) 2856 #if WINVER >= 0x0600 2857 #define MAPVK_VK_TO_VSC_EX (4) 2858 #endif 2859 2860 #define MWMO_WAITALL 0x0001 2861 #define MWMO_ALERTABLE 0x0002 2862 #define MWMO_INPUTAVAILABLE 0x0004 2863 2864 #define QS_KEY 0x0001 2865 #define QS_MOUSEMOVE 0x0002 2866 #define QS_MOUSEBUTTON 0x0004 2867 #define QS_POSTMESSAGE 0x0008 2868 #define QS_TIMER 0x0010 2869 #define QS_PAINT 0x0020 2870 #define QS_SENDMESSAGE 0x0040 2871 #define QS_HOTKEY 0x0080 2872 #define QS_ALLPOSTMESSAGE 0x0100 2873 #define QS_RAWINPUT 0x0400 2874 #if _WIN32_WINNT >= 0x0602 2875 #define QS_TOUCH 0x0800 2876 #define QS_POINTER 0x1000 2877 #endif 2878 2879 #define QS_MOUSE (QS_MOUSEMOVE | QS_MOUSEBUTTON) 2880 #if _WIN32_WINNT >= 0x602 2881 #define QS_INPUT (QS_MOUSE | QS_KEY | QS_RAWINPUT | QS_TOUCH | QS_POINTER) 2882 #else 2883 #define QS_INPUT (QS_MOUSE | QS_KEY | QS_RAWINPUT) 2884 #endif 2885 #define QS_ALLEVENTS (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY) 2886 #define QS_ALLINPUT (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE) 2887 2888 #define USER_TIMER_MAXIMUM 0x7FFFFFFF 2889 #define USER_TIMER_MINIMUM 0x0000000A 2890 2891 #if WINVER >= 0x0601 2892 #define TIMERV_DEFAULT_COALESCING (0) 2893 #define TIMERV_NO_COALESCING (0xffffffff) 2894 2895 #define TIMERV_COALESCING_MIN (1) 2896 #define TIMERV_COALESCING_MAX (0x7ffffff5) 2897 #endif 2898 2899 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 2900 #define LoadAccelerators __MINGW_NAME_AW(LoadAccelerators) 2901 #define CreateAcceleratorTable __MINGW_NAME_AW(CreateAcceleratorTable) 2902 #define CopyAcceleratorTable __MINGW_NAME_AW(CopyAcceleratorTable) 2903 2904 WINUSERAPI UINT_PTR WINAPI SetTimer(HWND hWnd,UINT_PTR nIDEvent,UINT uElapse,TIMERPROC lpTimerFunc); 2905 WINUSERAPI WINBOOL WINAPI KillTimer(HWND hWnd,UINT_PTR uIDEvent); 2906 WINUSERAPI WINBOOL WINAPI IsWindowUnicode(HWND hWnd); 2907 WINUSERAPI WINBOOL WINAPI EnableWindow(HWND hWnd,WINBOOL bEnable); 2908 WINUSERAPI WINBOOL WINAPI IsWindowEnabled(HWND hWnd); 2909 WINUSERAPI HACCEL WINAPI LoadAcceleratorsA(HINSTANCE hInstance,LPCSTR lpTableName); 2910 WINUSERAPI HACCEL WINAPI LoadAcceleratorsW(HINSTANCE hInstance,LPCWSTR lpTableName); 2911 WINUSERAPI HACCEL WINAPI CreateAcceleratorTableA(LPACCEL paccel,int cAccel); 2912 WINUSERAPI HACCEL WINAPI CreateAcceleratorTableW(LPACCEL paccel,int cAccel); 2913 WINUSERAPI WINBOOL WINAPI DestroyAcceleratorTable(HACCEL hAccel); 2914 WINUSERAPI int WINAPI CopyAcceleratorTableA(HACCEL hAccelSrc,LPACCEL lpAccelDst,int cAccelEntries); 2915 WINUSERAPI int WINAPI CopyAcceleratorTableW(HACCEL hAccelSrc,LPACCEL lpAccelDst,int cAccelEntries); 2916 2917 #ifndef NOMSG 2918 #define TranslateAccelerator __MINGW_NAME_AW(TranslateAccelerator) 2919 2920 WINUSERAPI int WINAPI TranslateAcceleratorA(HWND hWnd,HACCEL hAccTable,LPMSG lpMsg); 2921 WINUSERAPI int WINAPI TranslateAcceleratorW(HWND hWnd,HACCEL hAccTable,LPMSG lpMsg); 2922 #endif 2923 2924 #if WINVER >= 0x0601 2925 WINUSERAPI UINT_PTR WINAPI SetCoalescableTimer (HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc, ULONG uToleranceDelay); 2926 #endif 2927 #endif 2928 2929 #ifndef NOSYSMETRICS 2930 2931 #define SM_CXSCREEN 0 2932 #define SM_CYSCREEN 1 2933 #define SM_CXVSCROLL 2 2934 #define SM_CYHSCROLL 3 2935 #define SM_CYCAPTION 4 2936 #define SM_CXBORDER 5 2937 #define SM_CYBORDER 6 2938 #define SM_CXDLGFRAME 7 2939 #define SM_CYDLGFRAME 8 2940 #define SM_CYVTHUMB 9 2941 #define SM_CXHTHUMB 10 2942 #define SM_CXICON 11 2943 #define SM_CYICON 12 2944 #define SM_CXCURSOR 13 2945 #define SM_CYCURSOR 14 2946 #define SM_CYMENU 15 2947 #define SM_CXFULLSCREEN 16 2948 #define SM_CYFULLSCREEN 17 2949 #define SM_CYKANJIWINDOW 18 2950 #define SM_MOUSEPRESENT 19 2951 #define SM_CYVSCROLL 20 2952 #define SM_CXHSCROLL 21 2953 #define SM_DEBUG 22 2954 #define SM_SWAPBUTTON 23 2955 #define SM_RESERVED1 24 2956 #define SM_RESERVED2 25 2957 #define SM_RESERVED3 26 2958 #define SM_RESERVED4 27 2959 #define SM_CXMIN 28 2960 #define SM_CYMIN 29 2961 #define SM_CXSIZE 30 2962 #define SM_CYSIZE 31 2963 #define SM_CXFRAME 32 2964 #define SM_CYFRAME 33 2965 #define SM_CXMINTRACK 34 2966 #define SM_CYMINTRACK 35 2967 #define SM_CXDOUBLECLK 36 2968 #define SM_CYDOUBLECLK 37 2969 #define SM_CXICONSPACING 38 2970 #define SM_CYICONSPACING 39 2971 #define SM_MENUDROPALIGNMENT 40 2972 #define SM_PENWINDOWS 41 2973 #define SM_DBCSENABLED 42 2974 #define SM_CMOUSEBUTTONS 43 2975 2976 #define SM_CXFIXEDFRAME SM_CXDLGFRAME 2977 #define SM_CYFIXEDFRAME SM_CYDLGFRAME 2978 #define SM_CXSIZEFRAME SM_CXFRAME 2979 #define SM_CYSIZEFRAME SM_CYFRAME 2980 2981 #define SM_SECURE 44 2982 #define SM_CXEDGE 45 2983 #define SM_CYEDGE 46 2984 #define SM_CXMINSPACING 47 2985 #define SM_CYMINSPACING 48 2986 #define SM_CXSMICON 49 2987 #define SM_CYSMICON 50 2988 #define SM_CYSMCAPTION 51 2989 #define SM_CXSMSIZE 52 2990 #define SM_CYSMSIZE 53 2991 #define SM_CXMENUSIZE 54 2992 #define SM_CYMENUSIZE 55 2993 #define SM_ARRANGE 56 2994 #define SM_CXMINIMIZED 57 2995 #define SM_CYMINIMIZED 58 2996 #define SM_CXMAXTRACK 59 2997 #define SM_CYMAXTRACK 60 2998 #define SM_CXMAXIMIZED 61 2999 #define SM_CYMAXIMIZED 62 3000 #define SM_NETWORK 63 3001 #define SM_CLEANBOOT 67 3002 #define SM_CXDRAG 68 3003 #define SM_CYDRAG 69 3004 #define SM_SHOWSOUNDS 70 3005 #define SM_CXMENUCHECK 71 3006 #define SM_CYMENUCHECK 72 3007 #define SM_SLOWMACHINE 73 3008 #define SM_MIDEASTENABLED 74 3009 #define SM_MOUSEWHEELPRESENT 75 3010 #define SM_XVIRTUALSCREEN 76 3011 #define SM_YVIRTUALSCREEN 77 3012 #define SM_CXVIRTUALSCREEN 78 3013 #define SM_CYVIRTUALSCREEN 79 3014 #define SM_CMONITORS 80 3015 #define SM_SAMEDISPLAYFORMAT 81 3016 #define SM_IMMENABLED 82 3017 #define SM_CXFOCUSBORDER 83 3018 #define SM_CYFOCUSBORDER 84 3019 #define SM_TABLETPC 86 3020 #define SM_MEDIACENTER 87 3021 #define SM_STARTER 88 3022 #define SM_SERVERR2 89 3023 #if _WIN32_WINNT >= 0x0600 3024 #define SM_MOUSEHORIZONTALWHEELPRESENT 91 3025 #define SM_CXPADDEDBORDER 92 3026 #endif 3027 #if WINVER >= 0x0601 3028 #define SM_DIGITIZER 94 3029 #define SM_MAXIMUMTOUCHES 95 3030 #endif 3031 3032 #if WINVER <= 0x501 3033 #define SM_CMETRICS 91 3034 #elif WINVER == 0x600 3035 #define SM_CMETRICS 93 3036 #else 3037 #define SM_CMETRICS 97 3038 #endif 3039 3040 #define SM_REMOTESESSION 0x1000 3041 #define SM_SHUTTINGDOWN 0x2000 3042 #define SM_REMOTECONTROL 0x2001 3043 #define SM_CARETBLINKINGENABLED 0x2002 3044 #if WINVER >= 0x0602 3045 #define SM_CONVERTIBLESLATEMODE 0x2003 3046 #define SM_SYSTEMDOCKED 0x2004 3047 #endif 3048 3049 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3050 WINUSERAPI int WINAPI GetSystemMetrics(int nIndex); 3051 #endif 3052 #endif 3053 3054 #ifndef NOMENUS 3055 3056 #define PMB_ACTIVE 0x00000001 3057 3058 #define MNC_IGNORE 0 3059 #define MNC_CLOSE 1 3060 #define MNC_EXECUTE 2 3061 #define MNC_SELECT 3 3062 3063 #define MNS_NOCHECK 0x80000000 3064 #define MNS_MODELESS 0x40000000 3065 #define MNS_DRAGDROP 0x20000000 3066 #define MNS_AUTODISMISS 0x10000000 3067 #define MNS_NOTIFYBYPOS 0x08000000 3068 #define MNS_CHECKORBMP 0x04000000 3069 3070 #define MIM_MAXHEIGHT 0x00000001 3071 #define MIM_BACKGROUND 0x00000002 3072 #define MIM_HELPID 0x00000004 3073 #define MIM_MENUDATA 0x00000008 3074 #define MIM_STYLE 0x00000010 3075 #define MIM_APPLYTOSUBMENUS 0x80000000 3076 3077 #define MND_CONTINUE 0 3078 #define MND_ENDMENU 1 3079 3080 #define MNGOF_TOPGAP 0x00000001 3081 #define MNGOF_BOTTOMGAP 0x00000002 3082 3083 #define MNGO_NOINTERFACE 0x00000000 3084 #define MNGO_NOERROR 0x00000001 3085 3086 #define MIIM_STATE 0x00000001 3087 #define MIIM_ID 0x00000002 3088 #define MIIM_SUBMENU 0x00000004 3089 #define MIIM_CHECKMARKS 0x00000008 3090 #define MIIM_TYPE 0x00000010 3091 #define MIIM_DATA 0x00000020 3092 #define MIIM_STRING 0x00000040 3093 #define MIIM_BITMAP 0x00000080 3094 #define MIIM_FTYPE 0x00000100 3095 3096 #define HBMMENU_CALLBACK ((HBITMAP) -1) 3097 #define HBMMENU_SYSTEM ((HBITMAP) 1) 3098 #define HBMMENU_MBAR_RESTORE ((HBITMAP) 2) 3099 #define HBMMENU_MBAR_MINIMIZE ((HBITMAP) 3) 3100 #define HBMMENU_MBAR_CLOSE ((HBITMAP) 5) 3101 #define HBMMENU_MBAR_CLOSE_D ((HBITMAP) 6) 3102 #define HBMMENU_MBAR_MINIMIZE_D ((HBITMAP) 7) 3103 #define HBMMENU_POPUP_CLOSE ((HBITMAP) 8) 3104 #define HBMMENU_POPUP_RESTORE ((HBITMAP) 9) 3105 #define HBMMENU_POPUP_MAXIMIZE ((HBITMAP) 10) 3106 #define HBMMENU_POPUP_MINIMIZE ((HBITMAP) 11) 3107 3108 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3109 #define LoadMenu __MINGW_NAME_AW(LoadMenu) 3110 #define LoadMenuIndirect __MINGW_NAME_AW(LoadMenuIndirect) 3111 #define ChangeMenu __MINGW_NAME_AW(ChangeMenu) 3112 #define GetMenuString __MINGW_NAME_AW(GetMenuString) 3113 #define InsertMenu __MINGW_NAME_AW(InsertMenu) 3114 #define AppendMenu __MINGW_NAME_AW(AppendMenu) 3115 #define ModifyMenu __MINGW_NAME_AW(ModifyMenu) 3116 3117 WINUSERAPI HMENU WINAPI LoadMenuA(HINSTANCE hInstance,LPCSTR lpMenuName); 3118 WINUSERAPI HMENU WINAPI LoadMenuW(HINSTANCE hInstance,LPCWSTR lpMenuName); 3119 WINUSERAPI HMENU WINAPI LoadMenuIndirectA(CONST MENUTEMPLATEA *lpMenuTemplate); 3120 WINUSERAPI HMENU WINAPI LoadMenuIndirectW(CONST MENUTEMPLATEW *lpMenuTemplate); 3121 WINUSERAPI HMENU WINAPI GetMenu(HWND hWnd); 3122 WINUSERAPI WINBOOL WINAPI SetMenu(HWND hWnd,HMENU hMenu); 3123 WINUSERAPI WINBOOL WINAPI ChangeMenuA(HMENU hMenu,UINT cmd,LPCSTR lpszNewItem,UINT cmdInsert,UINT flags); 3124 WINUSERAPI WINBOOL WINAPI ChangeMenuW(HMENU hMenu,UINT cmd,LPCWSTR lpszNewItem,UINT cmdInsert,UINT flags); 3125 WINUSERAPI WINBOOL WINAPI HiliteMenuItem(HWND hWnd,HMENU hMenu,UINT uIDHiliteItem,UINT uHilite); 3126 WINUSERAPI int WINAPI GetMenuStringA(HMENU hMenu,UINT uIDItem,LPSTR lpString,int cchMax,UINT flags); 3127 WINUSERAPI int WINAPI GetMenuStringW(HMENU hMenu,UINT uIDItem,LPWSTR lpString,int cchMax,UINT flags); 3128 WINUSERAPI UINT WINAPI GetMenuState(HMENU hMenu,UINT uId,UINT uFlags); 3129 WINUSERAPI WINBOOL WINAPI DrawMenuBar(HWND hWnd); 3130 3131 WINUSERAPI HMENU WINAPI GetSystemMenu(HWND hWnd,WINBOOL bRevert); 3132 WINUSERAPI HMENU WINAPI CreateMenu(VOID); 3133 WINUSERAPI HMENU WINAPI CreatePopupMenu(VOID); 3134 WINUSERAPI WINBOOL WINAPI DestroyMenu(HMENU hMenu); 3135 WINUSERAPI DWORD WINAPI CheckMenuItem(HMENU hMenu,UINT uIDCheckItem,UINT uCheck); 3136 WINUSERAPI WINBOOL WINAPI EnableMenuItem(HMENU hMenu,UINT uIDEnableItem,UINT uEnable); 3137 WINUSERAPI HMENU WINAPI GetSubMenu(HMENU hMenu,int nPos); 3138 WINUSERAPI UINT WINAPI GetMenuItemID(HMENU hMenu,int nPos); 3139 WINUSERAPI int WINAPI GetMenuItemCount(HMENU hMenu); 3140 WINUSERAPI WINBOOL WINAPI InsertMenuA(HMENU hMenu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCSTR lpNewItem); 3141 WINUSERAPI WINBOOL WINAPI InsertMenuW(HMENU hMenu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCWSTR lpNewItem); 3142 WINUSERAPI WINBOOL WINAPI AppendMenuA(HMENU hMenu,UINT uFlags,UINT_PTR uIDNewItem,LPCSTR lpNewItem); 3143 WINUSERAPI WINBOOL WINAPI AppendMenuW(HMENU hMenu,UINT uFlags,UINT_PTR uIDNewItem,LPCWSTR lpNewItem); 3144 WINUSERAPI WINBOOL WINAPI ModifyMenuA(HMENU hMnu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCSTR lpNewItem); 3145 WINUSERAPI WINBOOL WINAPI ModifyMenuW(HMENU hMnu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCWSTR lpNewItem); 3146 WINUSERAPI WINBOOL WINAPI RemoveMenu(HMENU hMenu,UINT uPosition,UINT uFlags); 3147 WINUSERAPI WINBOOL WINAPI DeleteMenu(HMENU hMenu,UINT uPosition,UINT uFlags); 3148 WINUSERAPI WINBOOL WINAPI SetMenuItemBitmaps(HMENU hMenu,UINT uPosition,UINT uFlags,HBITMAP hBitmapUnchecked,HBITMAP hBitmapChecked); 3149 WINUSERAPI LONG WINAPI GetMenuCheckMarkDimensions(VOID); 3150 WINUSERAPI WINBOOL WINAPI TrackPopupMenu(HMENU hMenu,UINT uFlags,int x,int y,int nReserved,HWND hWnd,CONST RECT *prcRect); 3151 3152 typedef struct tagTPMPARAMS { 3153 UINT cbSize; 3154 RECT rcExclude; 3155 } TPMPARAMS; 3156 3157 typedef struct tagMENUINFO { 3158 DWORD cbSize; 3159 DWORD fMask; 3160 DWORD dwStyle; 3161 UINT cyMax; 3162 HBRUSH hbrBack; 3163 DWORD dwContextHelpID; 3164 ULONG_PTR dwMenuData; 3165 } MENUINFO,*LPMENUINFO; 3166 3167 typedef TPMPARAMS *LPTPMPARAMS; 3168 typedef MENUINFO CONST *LPCMENUINFO; 3169 3170 WINUSERAPI WINBOOL WINAPI TrackPopupMenuEx(HMENU,UINT,int,int,HWND,LPTPMPARAMS); 3171 WINUSERAPI WINBOOL WINAPI GetMenuInfo(HMENU,LPMENUINFO); 3172 WINUSERAPI WINBOOL WINAPI SetMenuInfo(HMENU,LPCMENUINFO); 3173 WINUSERAPI WINBOOL WINAPI EndMenu(VOID); 3174 #if _WIN32_WINNT >= 0x0601 3175 WINUSERAPI WINBOOL WINAPI CalculatePopupWindowPosition (const POINT *anchorPoint, const SIZE *windowSize, UINT flags, RECT *excludeRect, RECT *popupWindowPosition); 3176 #endif 3177 3178 typedef struct tagMENUGETOBJECTINFO { 3179 DWORD dwFlags; 3180 UINT uPos; 3181 HMENU hmenu; 3182 PVOID riid; 3183 PVOID pvObj; 3184 } MENUGETOBJECTINFO,*PMENUGETOBJECTINFO; 3185 3186 typedef struct tagMENUITEMINFOA { 3187 UINT cbSize; 3188 UINT fMask; 3189 UINT fType; 3190 UINT fState; 3191 UINT wID; 3192 HMENU hSubMenu; 3193 HBITMAP hbmpChecked; 3194 HBITMAP hbmpUnchecked; 3195 ULONG_PTR dwItemData; 3196 LPSTR dwTypeData; 3197 UINT cch; 3198 HBITMAP hbmpItem; 3199 } MENUITEMINFOA,*LPMENUITEMINFOA; 3200 3201 typedef struct tagMENUITEMINFOW { 3202 UINT cbSize; 3203 UINT fMask; 3204 UINT fType; 3205 UINT fState; 3206 UINT wID; 3207 HMENU hSubMenu; 3208 HBITMAP hbmpChecked; 3209 HBITMAP hbmpUnchecked; 3210 ULONG_PTR dwItemData; 3211 LPWSTR dwTypeData; 3212 UINT cch; 3213 HBITMAP hbmpItem; 3214 } MENUITEMINFOW,*LPMENUITEMINFOW; 3215 3216 __MINGW_TYPEDEF_AW(MENUITEMINFO) 3217 __MINGW_TYPEDEF_AW(LPMENUITEMINFO) 3218 3219 typedef MENUITEMINFOA CONST *LPCMENUITEMINFOA; 3220 typedef MENUITEMINFOW CONST *LPCMENUITEMINFOW; 3221 3222 __MINGW_TYPEDEF_AW(LPCMENUITEMINFO) 3223 3224 #define InsertMenuItem __MINGW_NAME_AW(InsertMenuItem) 3225 #define GetMenuItemInfo __MINGW_NAME_AW(GetMenuItemInfo) 3226 #define SetMenuItemInfo __MINGW_NAME_AW(SetMenuItemInfo) 3227 3228 WINUSERAPI WINBOOL WINAPI InsertMenuItemA(HMENU hmenu,UINT item,WINBOOL fByPosition,LPCMENUITEMINFOA lpmi); 3229 WINUSERAPI WINBOOL WINAPI InsertMenuItemW(HMENU hmenu,UINT item,WINBOOL fByPosition,LPCMENUITEMINFOW lpmi); 3230 WINUSERAPI WINBOOL WINAPI GetMenuItemInfoA(HMENU hmenu,UINT item,WINBOOL fByPosition,LPMENUITEMINFOA lpmii); 3231 WINUSERAPI WINBOOL WINAPI GetMenuItemInfoW(HMENU hmenu,UINT item,WINBOOL fByPosition,LPMENUITEMINFOW lpmii); 3232 WINUSERAPI WINBOOL WINAPI SetMenuItemInfoA(HMENU hmenu,UINT item,WINBOOL fByPositon,LPCMENUITEMINFOA lpmii); 3233 WINUSERAPI WINBOOL WINAPI SetMenuItemInfoW(HMENU hmenu,UINT item,WINBOOL fByPositon,LPCMENUITEMINFOW lpmii); 3234 3235 #define GMDI_USEDISABLED __MSABI_LONG(0x0001) 3236 #define GMDI_GOINTOPOPUPS __MSABI_LONG(0x0002) 3237 3238 WINUSERAPI UINT WINAPI GetMenuDefaultItem(HMENU hMenu,UINT fByPos,UINT gmdiFlags); 3239 WINUSERAPI WINBOOL WINAPI SetMenuDefaultItem(HMENU hMenu,UINT uItem,UINT fByPos); 3240 WINUSERAPI WINBOOL WINAPI GetMenuItemRect(HWND hWnd,HMENU hMenu,UINT uItem,LPRECT lprcItem); 3241 WINUSERAPI int WINAPI MenuItemFromPoint(HWND hWnd,HMENU hMenu,POINT ptScreen); 3242 3243 #define TPM_LEFTBUTTON __MSABI_LONG(0x0000) 3244 #define TPM_RIGHTBUTTON __MSABI_LONG(0x0002) 3245 #define TPM_LEFTALIGN __MSABI_LONG(0x0000) 3246 #define TPM_CENTERALIGN __MSABI_LONG(0x0004) 3247 #define TPM_RIGHTALIGN __MSABI_LONG(0x0008) 3248 #define TPM_TOPALIGN __MSABI_LONG(0x0000) 3249 #define TPM_VCENTERALIGN __MSABI_LONG(0x0010) 3250 #define TPM_BOTTOMALIGN __MSABI_LONG(0x0020) 3251 3252 #define TPM_HORIZONTAL __MSABI_LONG(0x0000) 3253 #define TPM_VERTICAL __MSABI_LONG(0x0040) 3254 #define TPM_NONOTIFY __MSABI_LONG(0x0080) 3255 #define TPM_RETURNCMD __MSABI_LONG(0x0100) 3256 #define TPM_RECURSE __MSABI_LONG(0x0001) 3257 #define TPM_HORPOSANIMATION __MSABI_LONG(0x0400) 3258 #define TPM_HORNEGANIMATION __MSABI_LONG(0x0800) 3259 #define TPM_VERPOSANIMATION __MSABI_LONG(0x1000) 3260 #define TPM_VERNEGANIMATION __MSABI_LONG(0x2000) 3261 #define TPM_NOANIMATION __MSABI_LONG(0x4000) 3262 #define TPM_LAYOUTRTL __MSABI_LONG(0x8000) 3263 #if _WIN32_WINNT >= 0x0601 3264 #define TPM_WORKAREA __MSABI_LONG(0x10000) 3265 #endif 3266 #endif 3267 #endif 3268 3269 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3270 typedef struct tagDROPSTRUCT { 3271 HWND hwndSource; 3272 HWND hwndSink; 3273 DWORD wFmt; 3274 ULONG_PTR dwData; 3275 POINT ptDrop; 3276 DWORD dwControlData; 3277 } DROPSTRUCT,*PDROPSTRUCT,*LPDROPSTRUCT; 3278 #endif 3279 3280 #define DOF_EXECUTABLE 0x8001 3281 #define DOF_DOCUMENT 0x8002 3282 #define DOF_DIRECTORY 0x8003 3283 #define DOF_MULTIPLE 0x8004 3284 #define DOF_PROGMAN 0x0001 3285 #define DOF_SHELLDATA 0x0002 3286 3287 #define DO_DROPFILE __MSABI_LONG(0x454C4946) 3288 #define DO_PRINTFILE __MSABI_LONG(0x544E5250) 3289 3290 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3291 WINUSERAPI DWORD WINAPI DragObject(HWND hwndParent,HWND hwndFrom,UINT fmt,ULONG_PTR data,HCURSOR hcur); 3292 WINUSERAPI WINBOOL WINAPI DragDetect(HWND hwnd,POINT pt); 3293 WINUSERAPI WINBOOL WINAPI DrawIcon(HDC hDC,int X,int Y,HICON hIcon); 3294 #endif 3295 3296 #ifndef NODRAWTEXT 3297 3298 #define DT_TOP 0x00000000 3299 #define DT_LEFT 0x00000000 3300 #define DT_CENTER 0x00000001 3301 #define DT_RIGHT 0x00000002 3302 #define DT_VCENTER 0x00000004 3303 #define DT_BOTTOM 0x00000008 3304 #define DT_WORDBREAK 0x00000010 3305 #define DT_SINGLELINE 0x00000020 3306 #define DT_EXPANDTABS 0x00000040 3307 #define DT_TABSTOP 0x00000080 3308 #define DT_NOCLIP 0x00000100 3309 #define DT_EXTERNALLEADING 0x00000200 3310 #define DT_CALCRECT 0x00000400 3311 #define DT_NOPREFIX 0x00000800 3312 #define DT_INTERNAL 0x00001000 3313 #define DT_EDITCONTROL 0x00002000 3314 #define DT_PATH_ELLIPSIS 0x00004000 3315 #define DT_END_ELLIPSIS 0x00008000 3316 #define DT_MODIFYSTRING 0x00010000 3317 #define DT_RTLREADING 0x00020000 3318 #define DT_WORD_ELLIPSIS 0x00040000 3319 #define DT_NOFULLWIDTHCHARBREAK 0x00080000 3320 #define DT_HIDEPREFIX 0x00100000 3321 #define DT_PREFIXONLY 0x00200000 3322 3323 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3324 typedef struct tagDRAWTEXTPARAMS { 3325 UINT cbSize; 3326 int iTabLength; 3327 int iLeftMargin; 3328 int iRightMargin; 3329 UINT uiLengthDrawn; 3330 } DRAWTEXTPARAMS,*LPDRAWTEXTPARAMS; 3331 3332 #define DrawText __MINGW_NAME_AW(DrawText) 3333 #define DrawTextEx __MINGW_NAME_AW(DrawTextEx) 3334 3335 WINUSERAPI int WINAPI DrawTextA(HDC hdc,LPCSTR lpchText,int cchText,LPRECT lprc,UINT format); 3336 WINUSERAPI int WINAPI DrawTextW(HDC hdc,LPCWSTR lpchText,int cchText,LPRECT lprc,UINT format); 3337 WINUSERAPI int WINAPI DrawTextExA(HDC hdc,LPSTR lpchText,int cchText,LPRECT lprc,UINT format,LPDRAWTEXTPARAMS lpdtp); 3338 WINUSERAPI int WINAPI DrawTextExW(HDC hdc,LPWSTR lpchText,int cchText,LPRECT lprc,UINT format,LPDRAWTEXTPARAMS lpdtp); 3339 #endif 3340 #endif 3341 3342 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3343 #define GrayString __MINGW_NAME_AW(GrayString) 3344 #define DrawState __MINGW_NAME_AW(DrawState) 3345 #define TabbedTextOut __MINGW_NAME_AW(TabbedTextOut) 3346 #define GetTabbedTextExtent __MINGW_NAME_AW(GetTabbedTextExtent) 3347 3348 WINUSERAPI WINBOOL WINAPI GrayStringA(HDC hDC,HBRUSH hBrush,GRAYSTRINGPROC lpOutputFunc,LPARAM lpData,int nCount,int X,int Y,int nWidth,int nHeight); 3349 WINUSERAPI WINBOOL WINAPI GrayStringW(HDC hDC,HBRUSH hBrush,GRAYSTRINGPROC lpOutputFunc,LPARAM lpData,int nCount,int X,int Y,int nWidth,int nHeight); 3350 WINUSERAPI WINBOOL WINAPI DrawStateA(HDC hdc,HBRUSH hbrFore,DRAWSTATEPROC qfnCallBack,LPARAM lData,WPARAM wData,int x,int y,int cx,int cy,UINT uFlags); 3351 WINUSERAPI WINBOOL WINAPI DrawStateW(HDC hdc,HBRUSH hbrFore,DRAWSTATEPROC qfnCallBack,LPARAM lData,WPARAM wData,int x,int y,int cx,int cy,UINT uFlags); 3352 WINUSERAPI LONG WINAPI TabbedTextOutA(HDC hdc,int x,int y,LPCSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions,int nTabOrigin); 3353 WINUSERAPI LONG WINAPI TabbedTextOutW(HDC hdc,int x,int y,LPCWSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions,int nTabOrigin); 3354 WINUSERAPI DWORD WINAPI GetTabbedTextExtentA(HDC hdc,LPCSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions); 3355 WINUSERAPI DWORD WINAPI GetTabbedTextExtentW(HDC hdc,LPCWSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions); 3356 WINUSERAPI WINBOOL WINAPI UpdateWindow(HWND hWnd); 3357 WINUSERAPI HWND WINAPI SetActiveWindow(HWND hWnd); 3358 WINUSERAPI HWND WINAPI GetForegroundWindow(VOID); 3359 WINUSERAPI WINBOOL WINAPI PaintDesktop(HDC hdc); 3360 WINUSERAPI VOID WINAPI SwitchToThisWindow(HWND hwnd,WINBOOL fUnknown); 3361 WINUSERAPI WINBOOL WINAPI SetForegroundWindow(HWND hWnd); 3362 WINUSERAPI WINBOOL WINAPI AllowSetForegroundWindow(DWORD dwProcessId); 3363 WINUSERAPI WINBOOL WINAPI LockSetForegroundWindow(UINT uLockCode); 3364 WINUSERAPI HWND WINAPI WindowFromDC(HDC hDC); 3365 WINUSERAPI HDC WINAPI GetDC(HWND hWnd); 3366 WINUSERAPI HDC WINAPI GetDCEx(HWND hWnd,HRGN hrgnClip,DWORD flags); 3367 #endif 3368 3369 #define DST_COMPLEX 0x0000 3370 #define DST_TEXT 0x0001 3371 #define DST_PREFIXTEXT 0x0002 3372 #define DST_ICON 0x0003 3373 #define DST_BITMAP 0x0004 3374 3375 #define DSS_NORMAL 0x0000 3376 #define DSS_UNION 0x0010 3377 #define DSS_DISABLED 0x0020 3378 #define DSS_MONO 0x0080 3379 #define DSS_HIDEPREFIX 0x0200 3380 #define DSS_PREFIXONLY 0x0400 3381 #define DSS_RIGHT 0x8000 3382 3383 #define ASFW_ANY ((DWORD)-1) 3384 3385 #define LSFW_LOCK 1 3386 #define LSFW_UNLOCK 2 3387 3388 #define DCX_WINDOW __MSABI_LONG(0x00000001) 3389 #define DCX_CACHE __MSABI_LONG(0x00000002) 3390 #define DCX_NORESETATTRS __MSABI_LONG(0x00000004) 3391 #define DCX_CLIPCHILDREN __MSABI_LONG(0x00000008) 3392 #define DCX_CLIPSIBLINGS __MSABI_LONG(0x00000010) 3393 #define DCX_PARENTCLIP __MSABI_LONG(0x00000020) 3394 #define DCX_EXCLUDERGN __MSABI_LONG(0x00000040) 3395 #define DCX_INTERSECTRGN __MSABI_LONG(0x00000080) 3396 #define DCX_EXCLUDEUPDATE __MSABI_LONG(0x00000100) 3397 #define DCX_INTERSECTUPDATE __MSABI_LONG(0x00000200) 3398 #define DCX_LOCKWINDOWUPDATE __MSABI_LONG(0x00000400) 3399 3400 #define DCX_VALIDATE __MSABI_LONG(0x00200000) 3401 3402 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3403 WINUSERAPI HDC WINAPI GetWindowDC(HWND hWnd); 3404 WINUSERAPI int WINAPI ReleaseDC(HWND hWnd,HDC hDC); 3405 WINUSERAPI HDC WINAPI BeginPaint(HWND hWnd,LPPAINTSTRUCT lpPaint); 3406 WINUSERAPI WINBOOL WINAPI EndPaint(HWND hWnd,CONST PAINTSTRUCT *lpPaint); 3407 WINUSERAPI WINBOOL WINAPI GetUpdateRect(HWND hWnd,LPRECT lpRect,WINBOOL bErase); 3408 WINUSERAPI int WINAPI GetUpdateRgn(HWND hWnd,HRGN hRgn,WINBOOL bErase); 3409 WINUSERAPI int WINAPI SetWindowRgn(HWND hWnd,HRGN hRgn,WINBOOL bRedraw); 3410 WINUSERAPI int WINAPI GetWindowRgn(HWND hWnd,HRGN hRgn); 3411 WINUSERAPI int WINAPI GetWindowRgnBox(HWND hWnd,LPRECT lprc); 3412 WINUSERAPI int WINAPI ExcludeUpdateRgn(HDC hDC,HWND hWnd); 3413 WINUSERAPI WINBOOL WINAPI InvalidateRect(HWND hWnd,CONST RECT *lpRect,WINBOOL bErase); 3414 WINUSERAPI WINBOOL WINAPI ValidateRect(HWND hWnd,CONST RECT *lpRect); 3415 WINUSERAPI WINBOOL WINAPI InvalidateRgn(HWND hWnd,HRGN hRgn,WINBOOL bErase); 3416 WINUSERAPI WINBOOL WINAPI ValidateRgn(HWND hWnd,HRGN hRgn); 3417 WINUSERAPI WINBOOL WINAPI RedrawWindow(HWND hWnd,CONST RECT *lprcUpdate,HRGN hrgnUpdate,UINT flags); 3418 #endif 3419 3420 #define RDW_INVALIDATE 0x0001 3421 #define RDW_INTERNALPAINT 0x0002 3422 #define RDW_ERASE 0x0004 3423 3424 #define RDW_VALIDATE 0x0008 3425 #define RDW_NOINTERNALPAINT 0x0010 3426 #define RDW_NOERASE 0x0020 3427 3428 #define RDW_NOCHILDREN 0x0040 3429 #define RDW_ALLCHILDREN 0x0080 3430 3431 #define RDW_UPDATENOW 0x0100 3432 #define RDW_ERASENOW 0x0200 3433 3434 #define RDW_FRAME 0x0400 3435 #define RDW_NOFRAME 0x0800 3436 3437 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3438 WINUSERAPI WINBOOL WINAPI LockWindowUpdate(HWND hWndLock); 3439 WINUSERAPI WINBOOL WINAPI ScrollWindow(HWND hWnd,int XAmount,int YAmount,CONST RECT *lpRect,CONST RECT *lpClipRect); 3440 WINUSERAPI WINBOOL WINAPI ScrollDC(HDC hDC,int dx,int dy,CONST RECT *lprcScroll,CONST RECT *lprcClip,HRGN hrgnUpdate,LPRECT lprcUpdate); 3441 WINUSERAPI int WINAPI ScrollWindowEx(HWND hWnd,int dx,int dy,CONST RECT *prcScroll,CONST RECT *prcClip,HRGN hrgnUpdate,LPRECT prcUpdate,UINT flags); 3442 #endif 3443 3444 #define SW_SCROLLCHILDREN 0x0001 3445 #define SW_INVALIDATE 0x0002 3446 #define SW_ERASE 0x0004 3447 #define SW_SMOOTHSCROLL 0x0010 3448 3449 #ifndef NOSCROLL 3450 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3451 WINUSERAPI int WINAPI SetScrollPos(HWND hWnd,int nBar,int nPos,WINBOOL bRedraw); 3452 WINUSERAPI int WINAPI GetScrollPos(HWND hWnd,int nBar); 3453 WINUSERAPI WINBOOL WINAPI SetScrollRange(HWND hWnd,int nBar,int nMinPos,int nMaxPos,WINBOOL bRedraw); 3454 WINUSERAPI WINBOOL WINAPI GetScrollRange(HWND hWnd,int nBar,LPINT lpMinPos,LPINT lpMaxPos); 3455 WINUSERAPI WINBOOL WINAPI ShowScrollBar(HWND hWnd,int wBar,WINBOOL bShow); 3456 WINUSERAPI WINBOOL WINAPI EnableScrollBar(HWND hWnd,UINT wSBflags,UINT wArrows); 3457 #endif 3458 3459 #define ESB_ENABLE_BOTH 0x0000 3460 #define ESB_DISABLE_BOTH 0x0003 3461 #define ESB_DISABLE_LEFT 0x0001 3462 #define ESB_DISABLE_RIGHT 0x0002 3463 3464 #define ESB_DISABLE_UP 0x0001 3465 #define ESB_DISABLE_DOWN 0x0002 3466 3467 #define ESB_DISABLE_LTUP ESB_DISABLE_LEFT 3468 #define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT 3469 #endif 3470 3471 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3472 #define SetProp __MINGW_NAME_AW(SetProp) 3473 #define GetProp __MINGW_NAME_AW(GetProp) 3474 #define RemoveProp __MINGW_NAME_AW(RemoveProp) 3475 #define EnumPropsEx __MINGW_NAME_AW(EnumPropsEx) 3476 #define EnumProps __MINGW_NAME_AW(EnumProps) 3477 #define SetWindowText __MINGW_NAME_AW(SetWindowText) 3478 #define GetWindowText __MINGW_NAME_AW(GetWindowText) 3479 #define GetWindowTextLength __MINGW_NAME_AW(GetWindowTextLength) 3480 3481 WINUSERAPI WINBOOL WINAPI SetPropA(HWND hWnd,LPCSTR lpString,HANDLE hData); 3482 WINUSERAPI WINBOOL WINAPI SetPropW(HWND hWnd,LPCWSTR lpString,HANDLE hData); 3483 WINUSERAPI HANDLE WINAPI GetPropA(HWND hWnd,LPCSTR lpString); 3484 WINUSERAPI HANDLE WINAPI GetPropW(HWND hWnd,LPCWSTR lpString); 3485 WINUSERAPI HANDLE WINAPI RemovePropA(HWND hWnd,LPCSTR lpString); 3486 WINUSERAPI HANDLE WINAPI RemovePropW(HWND hWnd,LPCWSTR lpString); 3487 WINUSERAPI int WINAPI EnumPropsExA(HWND hWnd,PROPENUMPROCEXA lpEnumFunc,LPARAM lParam); 3488 WINUSERAPI int WINAPI EnumPropsExW(HWND hWnd,PROPENUMPROCEXW lpEnumFunc,LPARAM lParam); 3489 WINUSERAPI int WINAPI EnumPropsA(HWND hWnd,PROPENUMPROCA lpEnumFunc); 3490 WINUSERAPI int WINAPI EnumPropsW(HWND hWnd,PROPENUMPROCW lpEnumFunc); 3491 WINUSERAPI WINBOOL WINAPI SetWindowTextA(HWND hWnd,LPCSTR lpString); 3492 WINUSERAPI WINBOOL WINAPI SetWindowTextW(HWND hWnd,LPCWSTR lpString); 3493 WINUSERAPI int WINAPI GetWindowTextA(HWND hWnd,LPSTR lpString,int nMaxCount); 3494 WINUSERAPI int WINAPI GetWindowTextW(HWND hWnd,LPWSTR lpString,int nMaxCount); 3495 WINUSERAPI int WINAPI GetWindowTextLengthA(HWND hWnd); 3496 WINUSERAPI int WINAPI GetWindowTextLengthW(HWND hWnd); 3497 WINUSERAPI WINBOOL WINAPI GetClientRect(HWND hWnd,LPRECT lpRect); 3498 WINUSERAPI WINBOOL WINAPI GetWindowRect(HWND hWnd,LPRECT lpRect); 3499 WINUSERAPI WINBOOL WINAPI AdjustWindowRect(LPRECT lpRect,DWORD dwStyle,WINBOOL bMenu); 3500 WINUSERAPI WINBOOL WINAPI AdjustWindowRectEx(LPRECT lpRect,DWORD dwStyle,WINBOOL bMenu,DWORD dwExStyle); 3501 #endif 3502 3503 #define HELPINFO_WINDOW 0x0001 3504 #define HELPINFO_MENUITEM 0x0002 3505 3506 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3507 typedef struct tagHELPINFO { 3508 UINT cbSize; 3509 int iContextType; 3510 int iCtrlId; 3511 HANDLE hItemHandle; 3512 DWORD_PTR dwContextId; 3513 POINT MousePos; 3514 } HELPINFO,*LPHELPINFO; 3515 3516 WINUSERAPI WINBOOL WINAPI SetWindowContextHelpId(HWND,DWORD); 3517 WINUSERAPI DWORD WINAPI GetWindowContextHelpId(HWND); 3518 WINUSERAPI WINBOOL WINAPI SetMenuContextHelpId(HMENU,DWORD); 3519 WINUSERAPI DWORD WINAPI GetMenuContextHelpId(HMENU); 3520 #endif 3521 3522 #ifndef NOMB 3523 3524 #define MB_OK __MSABI_LONG(0x00000000) 3525 #define MB_OKCANCEL __MSABI_LONG(0x00000001) 3526 #define MB_ABORTRETRYIGNORE __MSABI_LONG(0x00000002) 3527 #define MB_YESNOCANCEL __MSABI_LONG(0x00000003) 3528 #define MB_YESNO __MSABI_LONG(0x00000004) 3529 #define MB_RETRYCANCEL __MSABI_LONG(0x00000005) 3530 #define MB_CANCELTRYCONTINUE __MSABI_LONG(0x00000006) 3531 #define MB_ICONHAND __MSABI_LONG(0x00000010) 3532 #define MB_ICONQUESTION __MSABI_LONG(0x00000020) 3533 #define MB_ICONEXCLAMATION __MSABI_LONG(0x00000030) 3534 #define MB_ICONASTERISK __MSABI_LONG(0x00000040) 3535 #define MB_USERICON __MSABI_LONG(0x00000080) 3536 #define MB_ICONWARNING MB_ICONEXCLAMATION 3537 #define MB_ICONERROR MB_ICONHAND 3538 #define MB_ICONINFORMATION MB_ICONASTERISK 3539 #define MB_ICONSTOP MB_ICONHAND 3540 #define MB_DEFBUTTON1 __MSABI_LONG(0x00000000) 3541 #define MB_DEFBUTTON2 __MSABI_LONG(0x00000100) 3542 #define MB_DEFBUTTON3 __MSABI_LONG(0x00000200) 3543 #define MB_DEFBUTTON4 __MSABI_LONG(0x00000300) 3544 #define MB_APPLMODAL __MSABI_LONG(0x00000000) 3545 #define MB_SYSTEMMODAL __MSABI_LONG(0x00001000) 3546 #define MB_TASKMODAL __MSABI_LONG(0x00002000) 3547 #define MB_HELP __MSABI_LONG(0x00004000) 3548 #define MB_NOFOCUS __MSABI_LONG(0x00008000) 3549 #define MB_SETFOREGROUND __MSABI_LONG(0x00010000) 3550 #define MB_DEFAULT_DESKTOP_ONLY __MSABI_LONG(0x00020000) 3551 #define MB_TOPMOST __MSABI_LONG(0x00040000) 3552 #define MB_RIGHT __MSABI_LONG(0x00080000) 3553 #define MB_RTLREADING __MSABI_LONG(0x00100000) 3554 #define MB_SERVICE_NOTIFICATION __MSABI_LONG(0x00200000) 3555 #define MB_SERVICE_NOTIFICATION_NT3X __MSABI_LONG(0x00040000) 3556 #define MB_TYPEMASK __MSABI_LONG(0x0000000F) 3557 #define MB_ICONMASK __MSABI_LONG(0x000000F0) 3558 #define MB_DEFMASK __MSABI_LONG(0x00000F00) 3559 #define MB_MODEMASK __MSABI_LONG(0x00003000) 3560 #define MB_MISCMASK __MSABI_LONG(0x0000C000) 3561 3562 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3563 #define MessageBox __MINGW_NAME_AW(MessageBox) 3564 #define MessageBoxEx __MINGW_NAME_AW(MessageBoxEx) 3565 3566 WINUSERAPI int WINAPI MessageBoxA(HWND hWnd,LPCSTR lpText,LPCSTR lpCaption,UINT uType); 3567 WINUSERAPI int WINAPI MessageBoxW(HWND hWnd,LPCWSTR lpText,LPCWSTR lpCaption,UINT uType); 3568 WINUSERAPI int WINAPI MessageBoxExA(HWND hWnd,LPCSTR lpText,LPCSTR lpCaption,UINT uType,WORD wLanguageId); 3569 WINUSERAPI int WINAPI MessageBoxExW(HWND hWnd,LPCWSTR lpText,LPCWSTR lpCaption,UINT uType,WORD wLanguageId); 3570 3571 typedef VOID (CALLBACK *MSGBOXCALLBACK)(LPHELPINFO lpHelpInfo); 3572 3573 typedef struct tagMSGBOXPARAMSA { 3574 UINT cbSize; 3575 HWND hwndOwner; 3576 HINSTANCE hInstance; 3577 LPCSTR lpszText; 3578 LPCSTR lpszCaption; 3579 DWORD dwStyle; 3580 LPCSTR lpszIcon; 3581 DWORD_PTR dwContextHelpId; 3582 MSGBOXCALLBACK lpfnMsgBoxCallback; 3583 DWORD dwLanguageId; 3584 } MSGBOXPARAMSA,*PMSGBOXPARAMSA,*LPMSGBOXPARAMSA; 3585 3586 typedef struct tagMSGBOXPARAMSW { 3587 UINT cbSize; 3588 HWND hwndOwner; 3589 HINSTANCE hInstance; 3590 LPCWSTR lpszText; 3591 LPCWSTR lpszCaption; 3592 DWORD dwStyle; 3593 LPCWSTR lpszIcon; 3594 DWORD_PTR dwContextHelpId; 3595 MSGBOXCALLBACK lpfnMsgBoxCallback; 3596 DWORD dwLanguageId; 3597 } MSGBOXPARAMSW,*PMSGBOXPARAMSW,*LPMSGBOXPARAMSW; 3598 3599 __MINGW_TYPEDEF_AW(MSGBOXPARAMS) 3600 __MINGW_TYPEDEF_AW(PMSGBOXPARAMS) 3601 __MINGW_TYPEDEF_AW(LPMSGBOXPARAMS) 3602 3603 #define MessageBoxIndirect __MINGW_NAME_AW(MessageBoxIndirect) 3604 3605 WINUSERAPI int WINAPI MessageBoxIndirectA(CONST MSGBOXPARAMSA *lpmbp); 3606 WINUSERAPI int WINAPI MessageBoxIndirectW(CONST MSGBOXPARAMSW *lpmbp); 3607 WINUSERAPI WINBOOL WINAPI MessageBeep(UINT uType); 3608 #endif 3609 #endif 3610 3611 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3612 WINUSERAPI int WINAPI ShowCursor(WINBOOL bShow); 3613 WINUSERAPI WINBOOL WINAPI SetCursorPos(int X,int Y); 3614 WINUSERAPI HCURSOR WINAPI SetCursor(HCURSOR hCursor); 3615 WINUSERAPI WINBOOL WINAPI GetCursorPos(LPPOINT lpPoint); 3616 WINUSERAPI WINBOOL WINAPI ClipCursor(CONST RECT *lpRect); 3617 WINUSERAPI WINBOOL WINAPI GetClipCursor(LPRECT lpRect); 3618 WINUSERAPI HCURSOR WINAPI GetCursor(VOID); 3619 WINUSERAPI WINBOOL WINAPI CreateCaret(HWND hWnd,HBITMAP hBitmap,int nWidth,int nHeight); 3620 WINUSERAPI UINT WINAPI GetCaretBlinkTime(VOID); 3621 WINUSERAPI WINBOOL WINAPI SetCaretBlinkTime(UINT uMSeconds); 3622 WINUSERAPI WINBOOL WINAPI DestroyCaret(VOID); 3623 WINUSERAPI WINBOOL WINAPI HideCaret(HWND hWnd); 3624 WINUSERAPI WINBOOL WINAPI ShowCaret(HWND hWnd); 3625 WINUSERAPI WINBOOL WINAPI SetCaretPos(int X,int Y); 3626 WINUSERAPI WINBOOL WINAPI GetCaretPos(LPPOINT lpPoint); 3627 WINUSERAPI WINBOOL WINAPI ClientToScreen(HWND hWnd,LPPOINT lpPoint); 3628 WINUSERAPI WINBOOL WINAPI ScreenToClient(HWND hWnd,LPPOINT lpPoint); 3629 WINUSERAPI int WINAPI MapWindowPoints(HWND hWndFrom,HWND hWndTo,LPPOINT lpPoints,UINT cPoints); 3630 WINUSERAPI HWND WINAPI WindowFromPoint(POINT Point); 3631 WINUSERAPI HWND WINAPI ChildWindowFromPoint(HWND hWndParent,POINT Point); 3632 WINUSERAPI HWND WINAPI ChildWindowFromPointEx(HWND hwnd,POINT pt,UINT flags); 3633 #if WINVER >= 0x0600 3634 WINUSERAPI WINBOOL WINAPI SetPhysicalCursorPos (int X, int Y); 3635 WINUSERAPI WINBOOL WINAPI GetPhysicalCursorPos (LPPOINT lpPoint); 3636 WINUSERAPI WINBOOL WINAPI LogicalToPhysicalPoint (HWND hWnd, LPPOINT lpPoint); 3637 WINUSERAPI WINBOOL WINAPI PhysicalToLogicalPoint (HWND hWnd, LPPOINT lpPoint); 3638 WINUSERAPI HWND WINAPI WindowFromPhysicalPoint (POINT Point); 3639 #endif 3640 #if WINVER >= 0x0603 3641 WINUSERAPI WINBOOL WINAPI LogicalToPhysicalPointForPerMonitorDPI (HWND hwnd, LPPOINT lpPoint); 3642 WINUSERAPI WINBOOL WINAPI PhysicalToLogicalPointForPerMonitorDPI (HWND hwnd, LPPOINT lpPoint); 3643 #endif 3644 #endif 3645 3646 #define CWP_ALL 0x0000 3647 #define CWP_SKIPINVISIBLE 0x0001 3648 #define CWP_SKIPDISABLED 0x0002 3649 #define CWP_SKIPTRANSPARENT 0x0004 3650 3651 #ifndef NOCOLOR 3652 3653 #define CTLCOLOR_MSGBOX 0 3654 #define CTLCOLOR_EDIT 1 3655 #define CTLCOLOR_LISTBOX 2 3656 #define CTLCOLOR_BTN 3 3657 #define CTLCOLOR_DLG 4 3658 #define CTLCOLOR_SCROLLBAR 5 3659 #define CTLCOLOR_STATIC 6 3660 #define CTLCOLOR_MAX 7 3661 3662 #define COLOR_SCROLLBAR 0 3663 #define COLOR_BACKGROUND 1 3664 #define COLOR_ACTIVECAPTION 2 3665 #define COLOR_INACTIVECAPTION 3 3666 #define COLOR_MENU 4 3667 #define COLOR_WINDOW 5 3668 #define COLOR_WINDOWFRAME 6 3669 #define COLOR_MENUTEXT 7 3670 #define COLOR_WINDOWTEXT 8 3671 #define COLOR_CAPTIONTEXT 9 3672 #define COLOR_ACTIVEBORDER 10 3673 #define COLOR_INACTIVEBORDER 11 3674 #define COLOR_APPWORKSPACE 12 3675 #define COLOR_HIGHLIGHT 13 3676 #define COLOR_HIGHLIGHTTEXT 14 3677 #define COLOR_BTNFACE 15 3678 #define COLOR_BTNSHADOW 16 3679 #define COLOR_GRAYTEXT 17 3680 #define COLOR_BTNTEXT 18 3681 #define COLOR_INACTIVECAPTIONTEXT 19 3682 #define COLOR_BTNHIGHLIGHT 20 3683 3684 #define COLOR_3DDKSHADOW 21 3685 #define COLOR_3DLIGHT 22 3686 #define COLOR_INFOTEXT 23 3687 #define COLOR_INFOBK 24 3688 #define COLOR_HOTLIGHT 26 3689 #define COLOR_GRADIENTACTIVECAPTION 27 3690 #define COLOR_GRADIENTINACTIVECAPTION 28 3691 #define COLOR_MENUHILIGHT 29 3692 #define COLOR_MENUBAR 30 3693 3694 #define COLOR_DESKTOP COLOR_BACKGROUND 3695 #define COLOR_3DFACE COLOR_BTNFACE 3696 #define COLOR_3DSHADOW COLOR_BTNSHADOW 3697 #define COLOR_3DHIGHLIGHT COLOR_BTNHIGHLIGHT 3698 #define COLOR_3DHILIGHT COLOR_BTNHIGHLIGHT 3699 #define COLOR_BTNHILIGHT COLOR_BTNHIGHLIGHT 3700 3701 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3702 WINUSERAPI DWORD WINAPI GetSysColor(int nIndex); 3703 WINUSERAPI HBRUSH WINAPI GetSysColorBrush(int nIndex); 3704 WINUSERAPI WINBOOL WINAPI SetSysColors(int cElements,CONST INT *lpaElements,CONST COLORREF *lpaRgbValues); 3705 #endif 3706 #endif 3707 3708 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3709 WINUSERAPI WINBOOL WINAPI DrawFocusRect(HDC hDC,CONST RECT *lprc); 3710 WINUSERAPI int WINAPI FillRect(HDC hDC,CONST RECT *lprc,HBRUSH hbr); 3711 WINUSERAPI int WINAPI FrameRect(HDC hDC,CONST RECT *lprc,HBRUSH hbr); 3712 WINUSERAPI WINBOOL WINAPI InvertRect(HDC hDC,CONST RECT *lprc); 3713 WINUSERAPI WINBOOL WINAPI SetRect(LPRECT lprc,int xLeft,int yTop,int xRight,int yBottom); 3714 WINUSERAPI WINBOOL WINAPI SetRectEmpty(LPRECT lprc); 3715 WINUSERAPI WINBOOL WINAPI CopyRect(LPRECT lprcDst,CONST RECT *lprcSrc); 3716 WINUSERAPI WINBOOL WINAPI InflateRect(LPRECT lprc,int dx,int dy); 3717 WINUSERAPI WINBOOL WINAPI IntersectRect(LPRECT lprcDst,CONST RECT *lprcSrc1,CONST RECT *lprcSrc2); 3718 WINUSERAPI WINBOOL WINAPI UnionRect(LPRECT lprcDst,CONST RECT *lprcSrc1,CONST RECT *lprcSrc2); 3719 WINUSERAPI WINBOOL WINAPI SubtractRect(LPRECT lprcDst,CONST RECT *lprcSrc1,CONST RECT *lprcSrc2); 3720 WINUSERAPI WINBOOL WINAPI OffsetRect(LPRECT lprc,int dx,int dy); 3721 WINUSERAPI WINBOOL WINAPI IsRectEmpty(CONST RECT *lprc); 3722 WINUSERAPI WINBOOL WINAPI EqualRect(CONST RECT *lprc1,CONST RECT *lprc2); 3723 WINUSERAPI WINBOOL WINAPI PtInRect(CONST RECT *lprc,POINT pt); 3724 3725 #ifndef NOWINOFFSETS 3726 3727 #define GetWindowLong __MINGW_NAME_AW(GetWindowLong) 3728 #define SetWindowLong __MINGW_NAME_AW(SetWindowLong) 3729 #define GetClassLong __MINGW_NAME_AW(GetClassLong) 3730 #define SetClassLong __MINGW_NAME_AW(SetClassLong) 3731 3732 WINUSERAPI WORD WINAPI GetWindowWord(HWND hWnd,int nIndex); 3733 WINUSERAPI WORD WINAPI SetWindowWord(HWND hWnd,int nIndex,WORD wNewWord); 3734 WINUSERAPI LONG WINAPI GetWindowLongA(HWND hWnd,int nIndex); 3735 WINUSERAPI LONG WINAPI GetWindowLongW(HWND hWnd,int nIndex); 3736 WINUSERAPI LONG WINAPI SetWindowLongA(HWND hWnd,int nIndex,LONG dwNewLong); 3737 WINUSERAPI LONG WINAPI SetWindowLongW(HWND hWnd,int nIndex,LONG dwNewLong); 3738 3739 #ifdef _WIN64 3740 #define GetWindowLongPtr __MINGW_NAME_AW(GetWindowLongPtr) 3741 #define SetWindowLongPtr __MINGW_NAME_AW(SetWindowLongPtr) 3742 3743 WINUSERAPI LONG_PTR WINAPI GetWindowLongPtrA(HWND hWnd,int nIndex); 3744 WINUSERAPI LONG_PTR WINAPI GetWindowLongPtrW(HWND hWnd,int nIndex); 3745 WINUSERAPI LONG_PTR WINAPI SetWindowLongPtrA(HWND hWnd,int nIndex,LONG_PTR dwNewLong); 3746 WINUSERAPI LONG_PTR WINAPI SetWindowLongPtrW(HWND hWnd,int nIndex,LONG_PTR dwNewLong); 3747 #else 3748 #define GetWindowLongPtr __MINGW_NAME_AW(GetWindowLongPtr) 3749 #define SetWindowLongPtr __MINGW_NAME_AW(SetWindowLongPtr) 3750 3751 #define GetWindowLongPtrA GetWindowLongA 3752 #define GetWindowLongPtrW GetWindowLongW 3753 #define SetWindowLongPtrA SetWindowLongA 3754 #define SetWindowLongPtrW SetWindowLongW 3755 #endif 3756 3757 WINUSERAPI WORD WINAPI GetClassWord(HWND hWnd,int nIndex); 3758 WINUSERAPI WORD WINAPI SetClassWord(HWND hWnd,int nIndex,WORD wNewWord); 3759 WINUSERAPI DWORD WINAPI GetClassLongA(HWND hWnd,int nIndex); 3760 WINUSERAPI DWORD WINAPI GetClassLongW(HWND hWnd,int nIndex); 3761 WINUSERAPI DWORD WINAPI SetClassLongA(HWND hWnd,int nIndex,LONG dwNewLong); 3762 WINUSERAPI DWORD WINAPI SetClassLongW(HWND hWnd,int nIndex,LONG dwNewLong); 3763 3764 #ifdef _WIN64 3765 #define GetClassLongPtr __MINGW_NAME_AW(GetClassLongPtr) 3766 #define SetClassLongPtr __MINGW_NAME_AW(SetClassLongPtr) 3767 3768 WINUSERAPI ULONG_PTR WINAPI GetClassLongPtrA(HWND hWnd,int nIndex); 3769 WINUSERAPI ULONG_PTR WINAPI GetClassLongPtrW(HWND hWnd,int nIndex); 3770 WINUSERAPI ULONG_PTR WINAPI SetClassLongPtrA(HWND hWnd,int nIndex,LONG_PTR dwNewLong); 3771 WINUSERAPI ULONG_PTR WINAPI SetClassLongPtrW(HWND hWnd,int nIndex,LONG_PTR dwNewLong); 3772 #else 3773 #define GetClassLongPtr __MINGW_NAME_AW(GetClassLongPtr) 3774 #define SetClassLongPtr __MINGW_NAME_AW(SetClassLongPtr) 3775 3776 #define GetClassLongPtrA GetClassLongA 3777 #define GetClassLongPtrW GetClassLongW 3778 #define SetClassLongPtrA SetClassLongA 3779 #define SetClassLongPtrW SetClassLongW 3780 #endif 3781 #endif 3782 3783 #define FindWindow __MINGW_NAME_AW(FindWindow) 3784 #define FindWindowEx __MINGW_NAME_AW(FindWindowEx) 3785 #define GetClassName __MINGW_NAME_AW(GetClassName) 3786 3787 WINUSERAPI WINBOOL WINAPI GetProcessDefaultLayout(DWORD *pdwDefaultLayout); 3788 WINUSERAPI WINBOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout); 3789 WINUSERAPI HWND WINAPI GetDesktopWindow(VOID); 3790 WINUSERAPI HWND WINAPI GetParent(HWND hWnd); 3791 WINUSERAPI HWND WINAPI SetParent(HWND hWndChild,HWND hWndNewParent); 3792 WINUSERAPI WINBOOL WINAPI EnumChildWindows(HWND hWndParent,WNDENUMPROC lpEnumFunc,LPARAM lParam); 3793 WINUSERAPI HWND WINAPI FindWindowA(LPCSTR lpClassName,LPCSTR lpWindowName); 3794 WINUSERAPI HWND WINAPI FindWindowW(LPCWSTR lpClassName,LPCWSTR lpWindowName); 3795 WINUSERAPI HWND WINAPI FindWindowExA(HWND hWndParent,HWND hWndChildAfter,LPCSTR lpszClass,LPCSTR lpszWindow); 3796 WINUSERAPI HWND WINAPI FindWindowExW(HWND hWndParent,HWND hWndChildAfter,LPCWSTR lpszClass,LPCWSTR lpszWindow); 3797 WINUSERAPI HWND WINAPI GetShellWindow(VOID); 3798 WINUSERAPI WINBOOL WINAPI RegisterShellHookWindow(HWND hwnd); 3799 WINUSERAPI WINBOOL WINAPI DeregisterShellHookWindow(HWND hwnd); 3800 WINUSERAPI WINBOOL WINAPI EnumWindows(WNDENUMPROC lpEnumFunc,LPARAM lParam); 3801 WINUSERAPI WINBOOL WINAPI EnumThreadWindows(DWORD dwThreadId,WNDENUMPROC lpfn,LPARAM lParam); 3802 3803 #define EnumTaskWindows(hTask,lpfn,lParam) EnumThreadWindows(HandleToUlong(hTask),lpfn,lParam) 3804 3805 WINUSERAPI int WINAPI GetClassNameA(HWND hWnd,LPSTR lpClassName,int nMaxCount); 3806 WINUSERAPI int WINAPI GetClassNameW(HWND hWnd,LPWSTR lpClassName,int nMaxCount); 3807 WINUSERAPI HWND WINAPI GetTopWindow(HWND hWnd); 3808 3809 #define GetNextWindow(hWnd,wCmd) GetWindow(hWnd,wCmd) 3810 #define GetSysModalWindow() (NULL) 3811 #define SetSysModalWindow(hWnd) (NULL) 3812 3813 WINUSERAPI DWORD WINAPI GetWindowThreadProcessId(HWND hWnd,LPDWORD lpdwProcessId); 3814 WINUSERAPI WINBOOL WINAPI IsGUIThread(WINBOOL bConvert); 3815 3816 #define GetWindowTask(hWnd) ((HANDLE)(DWORD_PTR)GetWindowThreadProcessId(hWnd,NULL)) 3817 3818 WINUSERAPI HWND WINAPI GetLastActivePopup(HWND hWnd); 3819 3820 #define GW_HWNDFIRST 0 3821 #define GW_HWNDLAST 1 3822 #define GW_HWNDNEXT 2 3823 #define GW_HWNDPREV 3 3824 #define GW_OWNER 4 3825 #define GW_CHILD 5 3826 #define GW_ENABLEDPOPUP 6 3827 #define GW_MAX 6 3828 3829 WINUSERAPI HWND WINAPI GetWindow(HWND hWnd,UINT uCmd); 3830 3831 #ifndef NOWH 3832 #define SetWindowsHook __MINGW_NAME_AW(SetWindowsHook) 3833 #define SetWindowsHookEx __MINGW_NAME_AW(SetWindowsHookEx) 3834 3835 #ifdef STRICT 3836 WINUSERAPI HHOOK WINAPI SetWindowsHookA (int nFilterType, HOOKPROC pfnFilterProc); 3837 WINUSERAPI HHOOK WINAPI SetWindowsHookW (int nFilterType, HOOKPROC pfnFilterProc); 3838 3839 #define DefHookProc(nCode, wParam, lParam, phhk) CallNextHookEx (*phhk, nCode, wParam, lParam) 3840 #else 3841 WINUSERAPI HOOKPROC WINAPI SetWindowsHookA (int nFilterType, HOOKPROC pfnFilterProc); 3842 WINUSERAPI HOOKPROC WINAPI SetWindowsHookW (int nFilterType, HOOKPROC pfnFilterProc); 3843 3844 #define DefHookProc(nCode, wParam, lParam, phhk) CallNextHookEx ((HHOOK) *phhk, nCode, wParam, lParam) 3845 #endif 3846 WINUSERAPI WINBOOL WINAPI UnhookWindowsHook (int nCode, HOOKPROC pfnFilterProc); 3847 WINUSERAPI HHOOK WINAPI SetWindowsHookExA (int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId); 3848 WINUSERAPI HHOOK WINAPI SetWindowsHookExW (int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId); 3849 WINUSERAPI WINBOOL WINAPI UnhookWindowsHookEx (HHOOK hhk); 3850 WINUSERAPI LRESULT WINAPI CallNextHookEx (HHOOK hhk, int nCode, WPARAM wParam, LPARAM lParam); 3851 #endif 3852 #endif 3853 3854 #ifndef NOMENUS 3855 3856 #define MF_INSERT __MSABI_LONG(0x00000000) 3857 #define MF_CHANGE __MSABI_LONG(0x00000080) 3858 #define MF_APPEND __MSABI_LONG(0x00000100) 3859 #define MF_DELETE __MSABI_LONG(0x00000200) 3860 #define MF_REMOVE __MSABI_LONG(0x00001000) 3861 #define MF_BYCOMMAND __MSABI_LONG(0x00000000) 3862 #define MF_BYPOSITION __MSABI_LONG(0x00000400) 3863 #define MF_SEPARATOR __MSABI_LONG(0x00000800) 3864 #define MF_ENABLED __MSABI_LONG(0x00000000) 3865 #define MF_GRAYED __MSABI_LONG(0x00000001) 3866 #define MF_DISABLED __MSABI_LONG(0x00000002) 3867 #define MF_UNCHECKED __MSABI_LONG(0x00000000) 3868 #define MF_CHECKED __MSABI_LONG(0x00000008) 3869 #define MF_USECHECKBITMAPS __MSABI_LONG(0x00000200) 3870 #define MF_STRING __MSABI_LONG(0x00000000) 3871 #define MF_BITMAP __MSABI_LONG(0x00000004) 3872 #define MF_OWNERDRAW __MSABI_LONG(0x00000100) 3873 #define MF_POPUP __MSABI_LONG(0x00000010) 3874 #define MF_MENUBARBREAK __MSABI_LONG(0x00000020) 3875 #define MF_MENUBREAK __MSABI_LONG(0x00000040) 3876 #define MF_UNHILITE __MSABI_LONG(0x00000000) 3877 #define MF_HILITE __MSABI_LONG(0x00000080) 3878 #define MF_DEFAULT __MSABI_LONG(0x00001000) 3879 #define MF_SYSMENU __MSABI_LONG(0x00002000) 3880 #define MF_HELP __MSABI_LONG(0x00004000) 3881 #define MF_RIGHTJUSTIFY __MSABI_LONG(0x00004000) 3882 #define MF_MOUSESELECT __MSABI_LONG(0x00008000) 3883 #define MF_END __MSABI_LONG(0x00000080) 3884 3885 #define MFT_STRING MF_STRING 3886 #define MFT_BITMAP MF_BITMAP 3887 #define MFT_MENUBARBREAK MF_MENUBARBREAK 3888 #define MFT_MENUBREAK MF_MENUBREAK 3889 #define MFT_OWNERDRAW MF_OWNERDRAW 3890 #define MFT_RADIOCHECK __MSABI_LONG(0x00000200) 3891 #define MFT_SEPARATOR MF_SEPARATOR 3892 #define MFT_RIGHTORDER __MSABI_LONG(0x00002000) 3893 #define MFT_RIGHTJUSTIFY MF_RIGHTJUSTIFY 3894 3895 #define MFS_GRAYED __MSABI_LONG(0x00000003) 3896 #define MFS_DISABLED MFS_GRAYED 3897 #define MFS_CHECKED MF_CHECKED 3898 #define MFS_HILITE MF_HILITE 3899 #define MFS_ENABLED MF_ENABLED 3900 #define MFS_UNCHECKED MF_UNCHECKED 3901 #define MFS_UNHILITE MF_UNHILITE 3902 #define MFS_DEFAULT MF_DEFAULT 3903 3904 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3905 WINUSERAPI WINBOOL WINAPI CheckMenuRadioItem(HMENU hmenu,UINT first,UINT last,UINT check,UINT flags); 3906 3907 typedef struct { 3908 WORD versionNumber; 3909 WORD offset; 3910 } MENUITEMTEMPLATEHEADER,*PMENUITEMTEMPLATEHEADER; 3911 3912 typedef struct { 3913 WORD mtOption; 3914 WORD mtID; 3915 WCHAR mtString[1]; 3916 } MENUITEMTEMPLATE,*PMENUITEMTEMPLATE; 3917 #define MF_END __MSABI_LONG(0x00000080) 3918 #endif 3919 #endif 3920 3921 #ifndef NOSYSCOMMANDS 3922 3923 #define SC_SIZE 0xF000 3924 #define SC_MOVE 0xF010 3925 #define SC_MINIMIZE 0xF020 3926 #define SC_MAXIMIZE 0xF030 3927 #define SC_NEXTWINDOW 0xF040 3928 #define SC_PREVWINDOW 0xF050 3929 #define SC_CLOSE 0xF060 3930 #define SC_VSCROLL 0xF070 3931 #define SC_HSCROLL 0xF080 3932 #define SC_MOUSEMENU 0xF090 3933 #define SC_KEYMENU 0xF100 3934 #define SC_ARRANGE 0xF110 3935 #define SC_RESTORE 0xF120 3936 #define SC_TASKLIST 0xF130 3937 #define SC_SCREENSAVE 0xF140 3938 #define SC_HOTKEY 0xF150 3939 #define SC_DEFAULT 0xF160 3940 #define SC_MONITORPOWER 0xF170 3941 #define SC_CONTEXTHELP 0xF180 3942 #define SC_SEPARATOR 0xF00F 3943 3944 #if WINVER >= 0x0600 3945 #define SCF_ISSECURE 0x00000001 3946 #endif 3947 3948 #define GET_SC_WPARAM(wParam) ((int)wParam &0xfff0) 3949 3950 #define SC_ICON SC_MINIMIZE 3951 #define SC_ZOOM SC_MAXIMIZE 3952 #endif 3953 3954 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3955 #define LoadBitmap __MINGW_NAME_AW(LoadBitmap) 3956 #define LoadCursor __MINGW_NAME_AW(LoadCursor) 3957 #define LoadCursorFromFile __MINGW_NAME_AW(LoadCursorFromFile) 3958 3959 WINUSERAPI HBITMAP WINAPI LoadBitmapA(HINSTANCE hInstance,LPCSTR lpBitmapName); 3960 WINUSERAPI HBITMAP WINAPI LoadBitmapW(HINSTANCE hInstance,LPCWSTR lpBitmapName); 3961 WINUSERAPI HCURSOR WINAPI LoadCursorA(HINSTANCE hInstance,LPCSTR lpCursorName); 3962 WINUSERAPI HCURSOR WINAPI LoadCursorW(HINSTANCE hInstance,LPCWSTR lpCursorName); 3963 WINUSERAPI HCURSOR WINAPI LoadCursorFromFileA(LPCSTR lpFileName); 3964 WINUSERAPI HCURSOR WINAPI LoadCursorFromFileW(LPCWSTR lpFileName); 3965 WINUSERAPI HCURSOR WINAPI CreateCursor(HINSTANCE hInst,int xHotSpot,int yHotSpot,int nWidth,int nHeight,CONST VOID *pvANDPlane,CONST VOID *pvXORPlane); 3966 WINUSERAPI WINBOOL WINAPI DestroyCursor(HCURSOR hCursor); 3967 3968 #define CopyCursor(pcur) ((HCURSOR)CopyIcon((HICON)(pcur))) 3969 #endif 3970 3971 #define IDC_ARROW MAKEINTRESOURCE(32512) 3972 #define IDC_IBEAM MAKEINTRESOURCE(32513) 3973 #define IDC_WAIT MAKEINTRESOURCE(32514) 3974 #define IDC_CROSS MAKEINTRESOURCE(32515) 3975 #define IDC_UPARROW MAKEINTRESOURCE(32516) 3976 #define IDC_SIZE MAKEINTRESOURCE(32640) 3977 #define IDC_ICON MAKEINTRESOURCE(32641) 3978 #define IDC_SIZENWSE MAKEINTRESOURCE(32642) 3979 #define IDC_SIZENESW MAKEINTRESOURCE(32643) 3980 #define IDC_SIZEWE MAKEINTRESOURCE(32644) 3981 #define IDC_SIZENS MAKEINTRESOURCE(32645) 3982 #define IDC_SIZEALL MAKEINTRESOURCE(32646) 3983 #define IDC_NO MAKEINTRESOURCE(32648) 3984 #define IDC_HAND MAKEINTRESOURCE(32649) 3985 #define IDC_APPSTARTING MAKEINTRESOURCE(32650) 3986 #define IDC_HELP MAKEINTRESOURCE(32651) 3987 3988 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 3989 typedef struct _ICONINFO { 3990 WINBOOL fIcon; 3991 DWORD xHotspot; 3992 DWORD yHotspot; 3993 HBITMAP hbmMask; 3994 HBITMAP hbmColor; 3995 } ICONINFO; 3996 typedef ICONINFO *PICONINFO; 3997 3998 #define LoadIcon __MINGW_NAME_AW(LoadIcon) 3999 #define PrivateExtractIcons __MINGW_NAME_AW(PrivateExtractIcons) 4000 4001 WINUSERAPI WINBOOL WINAPI SetSystemCursor(HCURSOR hcur,DWORD id); 4002 WINUSERAPI HICON WINAPI LoadIconA(HINSTANCE hInstance,LPCSTR lpIconName); 4003 WINUSERAPI HICON WINAPI LoadIconW(HINSTANCE hInstance,LPCWSTR lpIconName); 4004 WINUSERAPI UINT WINAPI PrivateExtractIconsA(LPCSTR szFileName,int nIconIndex,int cxIcon,int cyIcon,HICON *phicon,UINT *piconid,UINT nIcons,UINT flags); 4005 WINUSERAPI UINT WINAPI PrivateExtractIconsW(LPCWSTR szFileName,int nIconIndex,int cxIcon,int cyIcon,HICON *phicon,UINT *piconid,UINT nIcons,UINT flags); 4006 WINUSERAPI HICON WINAPI CreateIcon(HINSTANCE hInstance,int nWidth,int nHeight,BYTE cPlanes,BYTE cBitsPixel,CONST BYTE *lpbANDbits,CONST BYTE *lpbXORbits); 4007 WINUSERAPI WINBOOL WINAPI DestroyIcon(HICON hIcon); 4008 WINUSERAPI int WINAPI LookupIconIdFromDirectory(PBYTE presbits,WINBOOL fIcon); 4009 WINUSERAPI int WINAPI LookupIconIdFromDirectoryEx(PBYTE presbits,WINBOOL fIcon,int cxDesired,int cyDesired,UINT Flags); 4010 WINUSERAPI HICON WINAPI CreateIconFromResource(PBYTE presbits,DWORD dwResSize,WINBOOL fIcon,DWORD dwVer); 4011 WINUSERAPI HICON WINAPI CreateIconFromResourceEx(PBYTE presbits,DWORD dwResSize,WINBOOL fIcon,DWORD dwVer,int cxDesired,int cyDesired,UINT Flags); 4012 4013 typedef struct tagCURSORSHAPE { 4014 int xHotSpot; 4015 int yHotSpot; 4016 int cx; 4017 int cy; 4018 int cbWidth; 4019 BYTE Planes; 4020 BYTE BitsPixel; 4021 } CURSORSHAPE,*LPCURSORSHAPE; 4022 #endif 4023 4024 #define IMAGE_BITMAP 0 4025 #define IMAGE_ICON 1 4026 #define IMAGE_CURSOR 2 4027 #define IMAGE_ENHMETAFILE 3 4028 4029 #define LR_DEFAULTCOLOR 0x0000 4030 #define LR_MONOCHROME 0x0001 4031 #define LR_COLOR 0x0002 4032 #define LR_COPYRETURNORG 0x0004 4033 #define LR_COPYDELETEORG 0x0008 4034 #define LR_LOADFROMFILE 0x0010 4035 #define LR_LOADTRANSPARENT 0x0020 4036 #define LR_DEFAULTSIZE 0x0040 4037 #define LR_VGACOLOR 0x0080 4038 #define LR_LOADMAP3DCOLORS 0x1000 4039 #define LR_CREATEDIBSECTION 0x2000 4040 #define LR_COPYFROMRESOURCE 0x4000 4041 #define LR_SHARED 0x8000 4042 4043 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 4044 #define LoadImage __MINGW_NAME_AW(LoadImage) 4045 4046 WINUSERAPI HANDLE WINAPI LoadImageA(HINSTANCE hInst,LPCSTR name,UINT type,int cx,int cy,UINT fuLoad); 4047 WINUSERAPI HANDLE WINAPI LoadImageW(HINSTANCE hInst,LPCWSTR name,UINT type,int cx,int cy,UINT fuLoad); 4048 WINUSERAPI HANDLE WINAPI CopyImage(HANDLE h,UINT type,int cx,int cy,UINT flags); 4049 WINUSERAPI WINBOOL WINAPI DrawIconEx(HDC hdc,int xLeft,int yTop,HICON hIcon,int cxWidth,int cyWidth,UINT istepIfAniCur,HBRUSH hbrFlickerFreeDraw,UINT diFlags); 4050 WINUSERAPI HICON WINAPI CreateIconIndirect(PICONINFO piconinfo); 4051 WINUSERAPI HICON WINAPI CopyIcon(HICON hIcon); 4052 WINUSERAPI WINBOOL WINAPI GetIconInfo(HICON hIcon,PICONINFO piconinfo); 4053 4054 #if _WIN32_WINNT >= 0x0600 4055 typedef struct _ICONINFOEXA { 4056 DWORD cbSize; 4057 WINBOOL fIcon; 4058 DWORD xHotspot; 4059 DWORD yHotspot; 4060 HBITMAP hbmMask; 4061 HBITMAP hbmColor; 4062 WORD wResID; 4063 CHAR szModName[MAX_PATH]; 4064 CHAR szResName[MAX_PATH]; 4065 } ICONINFOEXA,*PICONINFOEXA; 4066 4067 typedef struct _ICONINFOEXW { 4068 DWORD cbSize; 4069 WINBOOL fIcon; 4070 DWORD xHotspot; 4071 DWORD yHotspot; 4072 HBITMAP hbmMask; 4073 HBITMAP hbmColor; 4074 WORD wResID; 4075 WCHAR szModName[MAX_PATH]; 4076 WCHAR szResName[MAX_PATH]; 4077 } ICONINFOEXW,*PICONINFOEXW; 4078 4079 __MINGW_TYPEDEF_AW (ICONINFOEX); 4080 __MINGW_TYPEDEF_AW (PICONINFOEX); 4081 4082 #define GetIconInfoEx __MINGW_NAME_AW(GetIconInfoEx) 4083 4084 WINUSERAPI WINBOOL WINAPI GetIconInfoExA (HICON hicon, PICONINFOEXA piconinfo); 4085 WINUSERAPI WINBOOL WINAPI GetIconInfoExW (HICON hicon, PICONINFOEXW piconinfo); 4086 #endif 4087 #endif 4088 4089 #define DI_MASK 0x0001 4090 #define DI_IMAGE 0x0002 4091 #define DI_NORMAL 0x0003 4092 #define DI_COMPAT 0x0004 4093 #define DI_DEFAULTSIZE 0x0008 4094 #define DI_NOMIRROR 0x0010 4095 4096 #define RES_ICON 1 4097 #define RES_CURSOR 2 4098 4099 #ifdef OEMRESOURCE 4100 4101 #define OBM_CLOSE 32754 4102 #define OBM_UPARROW 32753 4103 #define OBM_DNARROW 32752 4104 #define OBM_RGARROW 32751 4105 #define OBM_LFARROW 32750 4106 #define OBM_REDUCE 32749 4107 #define OBM_ZOOM 32748 4108 #define OBM_RESTORE 32747 4109 #define OBM_REDUCED 32746 4110 #define OBM_ZOOMD 32745 4111 #define OBM_RESTORED 32744 4112 #define OBM_UPARROWD 32743 4113 #define OBM_DNARROWD 32742 4114 #define OBM_RGARROWD 32741 4115 #define OBM_LFARROWD 32740 4116 #define OBM_MNARROW 32739 4117 #define OBM_COMBO 32738 4118 #define OBM_UPARROWI 32737 4119 #define OBM_DNARROWI 32736 4120 #define OBM_RGARROWI 32735 4121 #define OBM_LFARROWI 32734 4122 4123 #define OBM_OLD_CLOSE 32767 4124 #define OBM_SIZE 32766 4125 #define OBM_OLD_UPARROW 32765 4126 #define OBM_OLD_DNARROW 32764 4127 #define OBM_OLD_RGARROW 32763 4128 #define OBM_OLD_LFARROW 32762 4129 #define OBM_BTSIZE 32761 4130 #define OBM_CHECK 32760 4131 #define OBM_CHECKBOXES 32759 4132 #define OBM_BTNCORNERS 32758 4133 #define OBM_OLD_REDUCE 32757 4134 #define OBM_OLD_ZOOM 32756 4135 #define OBM_OLD_RESTORE 32755 4136 4137 #define OCR_NORMAL 32512 4138 #define OCR_IBEAM 32513 4139 #define OCR_WAIT 32514 4140 #define OCR_CROSS 32515 4141 #define OCR_UP 32516 4142 #define OCR_SIZE 32640 4143 #define OCR_ICON 32641 4144 #define OCR_SIZENWSE 32642 4145 #define OCR_SIZENESW 32643 4146 #define OCR_SIZEWE 32644 4147 #define OCR_SIZENS 32645 4148 #define OCR_SIZEALL 32646 4149 #define OCR_ICOCUR 32647 4150 #define OCR_NO 32648 4151 #define OCR_HAND 32649 4152 #define OCR_APPSTARTING 32650 4153 4154 #define OIC_SAMPLE 32512 4155 #define OIC_HAND 32513 4156 #define OIC_QUES 32514 4157 #define OIC_BANG 32515 4158 #define OIC_NOTE 32516 4159 #define OIC_WINLOGO 32517 4160 #define OIC_WARNING OIC_BANG 4161 #define OIC_ERROR OIC_HAND 4162 #define OIC_INFORMATION OIC_NOTE 4163 #if WINVER >= 0x0600 4164 #define OIC_SHIELD 32518 4165 #endif 4166 #endif 4167 4168 #define ORD_LANGDRIVER 1 4169 4170 #ifndef NOICONS 4171 4172 #ifdef RC_INVOKED 4173 #define IDI_APPLICATION 32512 4174 #define IDI_HAND 32513 4175 #define IDI_QUESTION 32514 4176 #define IDI_EXCLAMATION 32515 4177 #define IDI_ASTERISK 32516 4178 #define IDI_WINLOGO 32517 4179 #if WINVER >= 0x0600 4180 #define IDI_SHIELD 32518 4181 #endif 4182 #else 4183 #define IDI_APPLICATION MAKEINTRESOURCE(32512) 4184 #define IDI_HAND MAKEINTRESOURCE(32513) 4185 #define IDI_QUESTION MAKEINTRESOURCE(32514) 4186 #define IDI_EXCLAMATION MAKEINTRESOURCE(32515) 4187 #define IDI_ASTERISK MAKEINTRESOURCE(32516) 4188 #define IDI_WINLOGO MAKEINTRESOURCE(32517) 4189 #if WINVER >= 0x0600 4190 #define IDI_SHIELD MAKEINTRESOURCE (32518) 4191 #endif 4192 #endif 4193 4194 #define IDI_WARNING IDI_EXCLAMATION 4195 #define IDI_ERROR IDI_HAND 4196 #define IDI_INFORMATION IDI_ASTERISK 4197 #endif 4198 4199 #ifdef NOAPISET 4200 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 4201 #define LoadString __MINGW_NAME_AW(LoadString) 4202 4203 WINUSERAPI int WINAPI LoadStringA (HINSTANCE hInstance, UINT uID, LPSTR lpBuffer, int cchBufferMax); 4204 WINUSERAPI int WINAPI LoadStringW (HINSTANCE hInstance, UINT uID, LPWSTR lpBuffer, int cchBufferMax); 4205 #endif 4206 #endif 4207 4208 #define IDOK 1 4209 #define IDCANCEL 2 4210 #define IDABORT 3 4211 #define IDRETRY 4 4212 #define IDIGNORE 5 4213 #define IDYES 6 4214 #define IDNO 7 4215 #define IDCLOSE 8 4216 #define IDHELP 9 4217 #define IDTRYAGAIN 10 4218 #define IDCONTINUE 11 4219 4220 #ifndef IDTIMEOUT 4221 #define IDTIMEOUT 32000 4222 #endif 4223 4224 #ifndef NOCTLMGR 4225 4226 #ifndef NOWINSTYLES 4227 #define ES_LEFT __MSABI_LONG(0x0000) 4228 #define ES_CENTER __MSABI_LONG(0x0001) 4229 #define ES_RIGHT __MSABI_LONG(0x0002) 4230 #define ES_MULTILINE __MSABI_LONG(0x0004) 4231 #define ES_UPPERCASE __MSABI_LONG(0x0008) 4232 #define ES_LOWERCASE __MSABI_LONG(0x0010) 4233 #define ES_PASSWORD __MSABI_LONG(0x0020) 4234 #define ES_AUTOVSCROLL __MSABI_LONG(0x0040) 4235 #define ES_AUTOHSCROLL __MSABI_LONG(0x0080) 4236 #define ES_NOHIDESEL __MSABI_LONG(0x0100) 4237 #define ES_OEMCONVERT __MSABI_LONG(0x0400) 4238 #define ES_READONLY __MSABI_LONG(0x0800) 4239 #define ES_WANTRETURN __MSABI_LONG(0x1000) 4240 #define ES_NUMBER __MSABI_LONG(0x2000) 4241 #endif 4242 4243 #define EN_SETFOCUS 0x0100 4244 #define EN_KILLFOCUS 0x0200 4245 #define EN_CHANGE 0x0300 4246 #define EN_UPDATE 0x0400 4247 #define EN_ERRSPACE 0x0500 4248 #define EN_MAXTEXT 0x0501 4249 #define EN_HSCROLL 0x0601 4250 #define EN_VSCROLL 0x0602 4251 #define EN_ALIGN_LTR_EC 0x0700 4252 #define EN_ALIGN_RTL_EC 0x0701 4253 4254 #define EC_LEFTMARGIN 0x0001 4255 #define EC_RIGHTMARGIN 0x0002 4256 #define EC_USEFONTINFO 0xffff 4257 4258 #define EMSIS_COMPOSITIONSTRING 0x0001 4259 4260 #define EIMES_GETCOMPSTRATONCE 0x0001 4261 #define EIMES_CANCELCOMPSTRINFOCUS 0x0002 4262 #define EIMES_COMPLETECOMPSTRKILLFOCUS 0x0004 4263 4264 #ifndef NOWINMESSAGES 4265 4266 #define EM_GETSEL 0x00B0 4267 #define EM_SETSEL 0x00B1 4268 #define EM_GETRECT 0x00B2 4269 #define EM_SETRECT 0x00B3 4270 #define EM_SETRECTNP 0x00B4 4271 #define EM_SCROLL 0x00B5 4272 #define EM_LINESCROLL 0x00B6 4273 #define EM_SCROLLCARET 0x00B7 4274 #define EM_GETMODIFY 0x00B8 4275 #define EM_SETMODIFY 0x00B9 4276 #define EM_GETLINECOUNT 0x00BA 4277 #define EM_LINEINDEX 0x00BB 4278 #define EM_SETHANDLE 0x00BC 4279 #define EM_GETHANDLE 0x00BD 4280 #define EM_GETTHUMB 0x00BE 4281 #define EM_LINELENGTH 0x00C1 4282 #define EM_REPLACESEL 0x00C2 4283 #define EM_GETLINE 0x00C4 4284 #define EM_LIMITTEXT 0x00C5 4285 #define EM_CANUNDO 0x00C6 4286 #define EM_UNDO 0x00C7 4287 #define EM_FMTLINES 0x00C8 4288 #define EM_LINEFROMCHAR 0x00C9 4289 #define EM_SETTABSTOPS 0x00CB 4290 #define EM_SETPASSWORDCHAR 0x00CC 4291 #define EM_EMPTYUNDOBUFFER 0x00CD 4292 #define EM_GETFIRSTVISIBLELINE 0x00CE 4293 #define EM_SETREADONLY 0x00CF 4294 #define EM_SETWORDBREAKPROC 0x00D0 4295 #define EM_GETWORDBREAKPROC 0x00D1 4296 #define EM_GETPASSWORDCHAR 0x00D2 4297 #define EM_SETMARGINS 0x00D3 4298 #define EM_GETMARGINS 0x00D4 4299 #define EM_SETLIMITTEXT EM_LIMITTEXT 4300 #define EM_GETLIMITTEXT 0x00D5 4301 #define EM_POSFROMCHAR 0x00D6 4302 #define EM_CHARFROMPOS 0x00D7 4303 #define EM_SETIMESTATUS 0x00D8 4304 #define EM_GETIMESTATUS 0x00D9 4305 #endif 4306 4307 #define WB_LEFT 0 4308 #define WB_RIGHT 1 4309 #define WB_ISDELIMITER 2 4310 4311 #define BS_PUSHBUTTON __MSABI_LONG(0x00000000) 4312 #define BS_DEFPUSHBUTTON __MSABI_LONG(0x00000001) 4313 #define BS_CHECKBOX __MSABI_LONG(0x00000002) 4314 #define BS_AUTOCHECKBOX __MSABI_LONG(0x00000003) 4315 #define BS_RADIOBUTTON __MSABI_LONG(0x00000004) 4316 #define BS_3STATE __MSABI_LONG(0x00000005) 4317 #define BS_AUTO3STATE __MSABI_LONG(0x00000006) 4318 #define BS_GROUPBOX __MSABI_LONG(0x00000007) 4319 #define BS_USERBUTTON __MSABI_LONG(0x00000008) 4320 #define BS_AUTORADIOBUTTON __MSABI_LONG(0x00000009) 4321 #define BS_PUSHBOX __MSABI_LONG(0x0000000A) 4322 #define BS_OWNERDRAW __MSABI_LONG(0x0000000B) 4323 #define BS_TYPEMASK __MSABI_LONG(0x0000000F) 4324 #define BS_LEFTTEXT __MSABI_LONG(0x00000020) 4325 #define BS_TEXT __MSABI_LONG(0x00000000) 4326 #define BS_ICON __MSABI_LONG(0x00000040) 4327 #define BS_BITMAP __MSABI_LONG(0x00000080) 4328 #define BS_LEFT __MSABI_LONG(0x00000100) 4329 #define BS_RIGHT __MSABI_LONG(0x00000200) 4330 #define BS_CENTER __MSABI_LONG(0x00000300) 4331 #define BS_TOP __MSABI_LONG(0x00000400) 4332 #define BS_BOTTOM __MSABI_LONG(0x00000800) 4333 #define BS_VCENTER __MSABI_LONG(0x00000C00) 4334 #define BS_PUSHLIKE __MSABI_LONG(0x00001000) 4335 #define BS_MULTILINE __MSABI_LONG(0x00002000) 4336 #define BS_NOTIFY __MSABI_LONG(0x00004000) 4337 #define BS_FLAT __MSABI_LONG(0x00008000) 4338 #define BS_RIGHTBUTTON BS_LEFTTEXT 4339 4340 #define BN_CLICKED 0 4341 #define BN_PAINT 1 4342 #define BN_HILITE 2 4343 #define BN_UNHILITE 3 4344 #define BN_DISABLE 4 4345 #define BN_DOUBLECLICKED 5 4346 #define BN_PUSHED BN_HILITE 4347 #define BN_UNPUSHED BN_UNHILITE 4348 #define BN_DBLCLK BN_DOUBLECLICKED 4349 #define BN_SETFOCUS 6 4350 #define BN_KILLFOCUS 7 4351 4352 #define BM_GETCHECK 0x00F0 4353 #define BM_SETCHECK 0x00F1 4354 #define BM_GETSTATE 0x00F2 4355 #define BM_SETSTATE 0x00F3 4356 #define BM_SETSTYLE 0x00F4 4357 #define BM_CLICK 0x00F5 4358 #define BM_GETIMAGE 0x00F6 4359 #define BM_SETIMAGE 0x00F7 4360 #if WINVER >= 0x0600 4361 #define BM_SETDONTCLICK 0x00f8 4362 #endif 4363 4364 #define BST_UNCHECKED 0x0000 4365 #define BST_CHECKED 0x0001 4366 #define BST_INDETERMINATE 0x0002 4367 #define BST_PUSHED 0x0004 4368 #define BST_FOCUS 0x0008 4369 4370 #define SS_LEFT __MSABI_LONG(0x00000000) 4371 #define SS_CENTER __MSABI_LONG(0x00000001) 4372 #define SS_RIGHT __MSABI_LONG(0x00000002) 4373 #define SS_ICON __MSABI_LONG(0x00000003) 4374 #define SS_BLACKRECT __MSABI_LONG(0x00000004) 4375 #define SS_GRAYRECT __MSABI_LONG(0x00000005) 4376 #define SS_WHITERECT __MSABI_LONG(0x00000006) 4377 #define SS_BLACKFRAME __MSABI_LONG(0x00000007) 4378 #define SS_GRAYFRAME __MSABI_LONG(0x00000008) 4379 #define SS_WHITEFRAME __MSABI_LONG(0x00000009) 4380 #define SS_USERITEM __MSABI_LONG(0x0000000A) 4381 #define SS_SIMPLE __MSABI_LONG(0x0000000B) 4382 #define SS_LEFTNOWORDWRAP __MSABI_LONG(0x0000000C) 4383 #define SS_OWNERDRAW __MSABI_LONG(0x0000000D) 4384 #define SS_BITMAP __MSABI_LONG(0x0000000E) 4385 #define SS_ENHMETAFILE __MSABI_LONG(0x0000000F) 4386 #define SS_ETCHEDHORZ __MSABI_LONG(0x00000010) 4387 #define SS_ETCHEDVERT __MSABI_LONG(0x00000011) 4388 #define SS_ETCHEDFRAME __MSABI_LONG(0x00000012) 4389 #define SS_TYPEMASK __MSABI_LONG(0x0000001F) 4390 #define SS_REALSIZECONTROL __MSABI_LONG(0x00000040) 4391 #define SS_NOPREFIX __MSABI_LONG(0x00000080) 4392 #define SS_NOTIFY __MSABI_LONG(0x00000100) 4393 #define SS_CENTERIMAGE __MSABI_LONG(0x00000200) 4394 #define SS_RIGHTJUST __MSABI_LONG(0x00000400) 4395 #define SS_REALSIZEIMAGE __MSABI_LONG(0x00000800) 4396 #define SS_SUNKEN __MSABI_LONG(0x00001000) 4397 #define SS_EDITCONTROL __MSABI_LONG(0x00002000) 4398 #define SS_ENDELLIPSIS __MSABI_LONG(0x00004000) 4399 #define SS_PATHELLIPSIS __MSABI_LONG(0x00008000) 4400 #define SS_WORDELLIPSIS __MSABI_LONG(0x0000C000) 4401 #define SS_ELLIPSISMASK __MSABI_LONG(0x0000C000) 4402 4403 #ifndef NOWINMESSAGES 4404 4405 #define STM_SETICON 0x0170 4406 #define STM_GETICON 0x0171 4407 #define STM_SETIMAGE 0x0172 4408 #define STM_GETIMAGE 0x0173 4409 #define STN_CLICKED 0 4410 #define STN_DBLCLK 1 4411 #define STN_ENABLE 2 4412 #define STN_DISABLE 3 4413 4414 #define STM_MSGMAX 0x0174 4415 #endif 4416 4417 #define WC_DIALOG (MAKEINTATOM(0x8002)) 4418 4419 #define DWL_MSGRESULT 0 4420 #define DWL_DLGPROC 4 4421 #define DWL_USER 8 4422 4423 #ifdef _WIN64 4424 4425 #undef DWL_MSGRESULT 4426 #undef DWL_DLGPROC 4427 #undef DWL_USER 4428 #endif 4429 4430 #define DWLP_MSGRESULT 0 4431 #define DWLP_DLGPROC DWLP_MSGRESULT + sizeof(LRESULT) 4432 #define DWLP_USER DWLP_DLGPROC + sizeof(DLGPROC) 4433 4434 #define DDL_READWRITE 0x0000 4435 #define DDL_READONLY 0x0001 4436 #define DDL_HIDDEN 0x0002 4437 #define DDL_SYSTEM 0x0004 4438 #define DDL_DIRECTORY 0x0010 4439 #define DDL_ARCHIVE 0x0020 4440 4441 #define DDL_POSTMSGS 0x2000 4442 #define DDL_DRIVES 0x4000 4443 #define DDL_EXCLUSIVE 0x8000 4444 4445 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 4446 #ifndef NOMSG 4447 #define IsDialogMessage __MINGW_NAME_AW(IsDialogMessage) 4448 4449 WINUSERAPI WINBOOL WINAPI IsDialogMessageA(HWND hDlg,LPMSG lpMsg); 4450 WINUSERAPI WINBOOL WINAPI IsDialogMessageW(HWND hDlg,LPMSG lpMsg); 4451 #endif 4452 4453 #define DlgDirList __MINGW_NAME_AW(DlgDirList) 4454 #define DlgDirSelectEx __MINGW_NAME_AW(DlgDirSelectEx) 4455 #define DlgDirListComboBox __MINGW_NAME_AW(DlgDirListComboBox) 4456 #define DlgDirSelectComboBoxEx __MINGW_NAME_AW(DlgDirSelectComboBoxEx) 4457 4458 WINUSERAPI WINBOOL WINAPI MapDialogRect(HWND hDlg,LPRECT lpRect); 4459 WINUSERAPI int WINAPI DlgDirListA(HWND hDlg,LPSTR lpPathSpec,int nIDListBox,int nIDStaticPath,UINT uFileType); 4460 WINUSERAPI int WINAPI DlgDirListW(HWND hDlg,LPWSTR lpPathSpec,int nIDListBox,int nIDStaticPath,UINT uFileType); 4461 WINUSERAPI WINBOOL WINAPI DlgDirSelectExA(HWND hwndDlg,LPSTR lpString,int chCount,int idListBox); 4462 WINUSERAPI WINBOOL WINAPI DlgDirSelectExW(HWND hwndDlg,LPWSTR lpString,int chCount,int idListBox); 4463 WINUSERAPI int WINAPI DlgDirListComboBoxA(HWND hDlg,LPSTR lpPathSpec,int nIDComboBox,int nIDStaticPath,UINT uFiletype); 4464 WINUSERAPI int WINAPI DlgDirListComboBoxW(HWND hDlg,LPWSTR lpPathSpec,int nIDComboBox,int nIDStaticPath,UINT uFiletype); 4465 WINUSERAPI WINBOOL WINAPI DlgDirSelectComboBoxExA(HWND hwndDlg,LPSTR lpString,int cchOut,int idComboBox); 4466 WINUSERAPI WINBOOL WINAPI DlgDirSelectComboBoxExW(HWND hwndDlg,LPWSTR lpString,int cchOut,int idComboBox); 4467 #endif 4468 4469 #define DS_ABSALIGN __MSABI_LONG(0x01) 4470 #define DS_SYSMODAL __MSABI_LONG(0x02) 4471 #define DS_LOCALEDIT __MSABI_LONG(0x20) 4472 #define DS_SETFONT __MSABI_LONG(0x40) 4473 #define DS_MODALFRAME __MSABI_LONG(0x80) 4474 #define DS_NOIDLEMSG __MSABI_LONG(0x100) 4475 #define DS_SETFOREGROUND __MSABI_LONG(0x200) 4476 4477 #define DS_3DLOOK __MSABI_LONG(0x0004) 4478 #define DS_FIXEDSYS __MSABI_LONG(0x0008) 4479 #define DS_NOFAILCREATE __MSABI_LONG(0x0010) 4480 #define DS_CONTROL __MSABI_LONG(0x0400) 4481 #define DS_CENTER __MSABI_LONG(0x0800) 4482 #define DS_CENTERMOUSE __MSABI_LONG(0x1000) 4483 #define DS_CONTEXTHELP __MSABI_LONG(0x2000) 4484 4485 #define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS) 4486 4487 #if defined (_WIN32_WCE) && (_WIN32_WCE >= 0x0500) 4488 #define DS_USEPIXELS __MSABI_LONG(0x8000) 4489 #endif 4490 4491 #define DM_GETDEFID (WM_USER+0) 4492 #define DM_SETDEFID (WM_USER+1) 4493 #define DM_REPOSITION (WM_USER+2) 4494 4495 #define DC_HASDEFID 0x534B 4496 4497 #define DLGC_WANTARROWS 0x0001 4498 #define DLGC_WANTTAB 0x0002 4499 #define DLGC_WANTALLKEYS 0x0004 4500 #define DLGC_WANTMESSAGE 0x0004 4501 #define DLGC_HASSETSEL 0x0008 4502 #define DLGC_DEFPUSHBUTTON 0x0010 4503 #define DLGC_UNDEFPUSHBUTTON 0x0020 4504 #define DLGC_RADIOBUTTON 0x0040 4505 #define DLGC_WANTCHARS 0x0080 4506 #define DLGC_STATIC 0x0100 4507 #define DLGC_BUTTON 0x2000 4508 4509 #define LB_CTLCODE __MSABI_LONG(0) 4510 4511 #define LB_OKAY 0 4512 #define LB_ERR (-1) 4513 #define LB_ERRSPACE (-2) 4514 4515 #define LBN_ERRSPACE (-2) 4516 #define LBN_SELCHANGE 1 4517 #define LBN_DBLCLK 2 4518 #define LBN_SELCANCEL 3 4519 #define LBN_SETFOCUS 4 4520 #define LBN_KILLFOCUS 5 4521 4522 #ifndef NOWINMESSAGES 4523 4524 #define LB_ADDSTRING 0x0180 4525 #define LB_INSERTSTRING 0x0181 4526 #define LB_DELETESTRING 0x0182 4527 #define LB_SELITEMRANGEEX 0x0183 4528 #define LB_RESETCONTENT 0x0184 4529 #define LB_SETSEL 0x0185 4530 #define LB_SETCURSEL 0x0186 4531 #define LB_GETSEL 0x0187 4532 #define LB_GETCURSEL 0x0188 4533 #define LB_GETTEXT 0x0189 4534 #define LB_GETTEXTLEN 0x018A 4535 #define LB_GETCOUNT 0x018B 4536 #define LB_SELECTSTRING 0x018C 4537 #define LB_DIR 0x018D 4538 #define LB_GETTOPINDEX 0x018E 4539 #define LB_FINDSTRING 0x018F 4540 #define LB_GETSELCOUNT 0x0190 4541 #define LB_GETSELITEMS 0x0191 4542 #define LB_SETTABSTOPS 0x0192 4543 #define LB_GETHORIZONTALEXTENT 0x0193 4544 #define LB_SETHORIZONTALEXTENT 0x0194 4545 #define LB_SETCOLUMNWIDTH 0x0195 4546 #define LB_ADDFILE 0x0196 4547 #define LB_SETTOPINDEX 0x0197 4548 #define LB_GETITEMRECT 0x0198 4549 #define LB_GETITEMDATA 0x0199 4550 #define LB_SETITEMDATA 0x019A 4551 #define LB_SELITEMRANGE 0x019B 4552 #define LB_SETANCHORINDEX 0x019C 4553 #define LB_GETANCHORINDEX 0x019D 4554 #define LB_SETCARETINDEX 0x019E 4555 #define LB_GETCARETINDEX 0x019F 4556 #define LB_SETITEMHEIGHT 0x01A0 4557 #define LB_GETITEMHEIGHT 0x01A1 4558 #define LB_FINDSTRINGEXACT 0x01A2 4559 #define LB_SETLOCALE 0x01A5 4560 #define LB_GETLOCALE 0x01A6 4561 #define LB_SETCOUNT 0x01A7 4562 #define LB_INITSTORAGE 0x01A8 4563 #define LB_ITEMFROMPOINT 0x01A9 4564 #if defined (_WIN32_WCE) && (_WIN32_WCE >= 0x0400) 4565 #define LB_MULTIPLEADDSTRING 0x01B1 4566 #endif 4567 #define LB_GETLISTBOXINFO 0x01B2 4568 #define LB_MSGMAX 0x01B3 4569 #endif 4570 4571 #ifndef NOWINSTYLES 4572 4573 #define LBS_NOTIFY __MSABI_LONG(0x0001) 4574 #define LBS_SORT __MSABI_LONG(0x0002) 4575 #define LBS_NOREDRAW __MSABI_LONG(0x0004) 4576 #define LBS_MULTIPLESEL __MSABI_LONG(0x0008) 4577 #define LBS_OWNERDRAWFIXED __MSABI_LONG(0x0010) 4578 #define LBS_OWNERDRAWVARIABLE __MSABI_LONG(0x0020) 4579 #define LBS_HASSTRINGS __MSABI_LONG(0x0040) 4580 #define LBS_USETABSTOPS __MSABI_LONG(0x0080) 4581 #define LBS_NOINTEGRALHEIGHT __MSABI_LONG(0x0100) 4582 #define LBS_MULTICOLUMN __MSABI_LONG(0x0200) 4583 #define LBS_WANTKEYBOARDINPUT __MSABI_LONG(0x0400) 4584 #define LBS_EXTENDEDSEL __MSABI_LONG(0x0800) 4585 #define LBS_DISABLENOSCROLL __MSABI_LONG(0x1000) 4586 #define LBS_NODATA __MSABI_LONG(0x2000) 4587 #define LBS_NOSEL __MSABI_LONG(0x4000) 4588 #define LBS_COMBOBOX __MSABI_LONG(0x8000) 4589 4590 #define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER) 4591 #endif 4592 4593 #define CB_OKAY 0 4594 #define CB_ERR (-1) 4595 #define CB_ERRSPACE (-2) 4596 4597 #define CBN_ERRSPACE (-1) 4598 #define CBN_SELCHANGE 1 4599 #define CBN_DBLCLK 2 4600 #define CBN_SETFOCUS 3 4601 #define CBN_KILLFOCUS 4 4602 #define CBN_EDITCHANGE 5 4603 #define CBN_EDITUPDATE 6 4604 #define CBN_DROPDOWN 7 4605 #define CBN_CLOSEUP 8 4606 #define CBN_SELENDOK 9 4607 #define CBN_SELENDCANCEL 10 4608 4609 #ifndef NOWINSTYLES 4610 4611 #define CBS_SIMPLE __MSABI_LONG(0x0001) 4612 #define CBS_DROPDOWN __MSABI_LONG(0x0002) 4613 #define CBS_DROPDOWNLIST __MSABI_LONG(0x0003) 4614 #define CBS_OWNERDRAWFIXED __MSABI_LONG(0x0010) 4615 #define CBS_OWNERDRAWVARIABLE __MSABI_LONG(0x0020) 4616 #define CBS_AUTOHSCROLL __MSABI_LONG(0x0040) 4617 #define CBS_OEMCONVERT __MSABI_LONG(0x0080) 4618 #define CBS_SORT __MSABI_LONG(0x0100) 4619 #define CBS_HASSTRINGS __MSABI_LONG(0x0200) 4620 #define CBS_NOINTEGRALHEIGHT __MSABI_LONG(0x0400) 4621 #define CBS_DISABLENOSCROLL __MSABI_LONG(0x0800) 4622 #define CBS_UPPERCASE __MSABI_LONG(0x2000) 4623 #define CBS_LOWERCASE __MSABI_LONG(0x4000) 4624 #endif 4625 4626 #ifndef NOWINMESSAGES 4627 #define CB_GETEDITSEL 0x0140 4628 #define CB_LIMITTEXT 0x0141 4629 #define CB_SETEDITSEL 0x0142 4630 #define CB_ADDSTRING 0x0143 4631 #define CB_DELETESTRING 0x0144 4632 #define CB_DIR 0x0145 4633 #define CB_GETCOUNT 0x0146 4634 #define CB_GETCURSEL 0x0147 4635 #define CB_GETLBTEXT 0x0148 4636 #define CB_GETLBTEXTLEN 0x0149 4637 #define CB_INSERTSTRING 0x014A 4638 #define CB_RESETCONTENT 0x014B 4639 #define CB_FINDSTRING 0x014C 4640 #define CB_SELECTSTRING 0x014D 4641 #define CB_SETCURSEL 0x014E 4642 #define CB_SHOWDROPDOWN 0x014F 4643 #define CB_GETITEMDATA 0x0150 4644 #define CB_SETITEMDATA 0x0151 4645 #define CB_GETDROPPEDCONTROLRECT 0x0152 4646 #define CB_SETITEMHEIGHT 0x0153 4647 #define CB_GETITEMHEIGHT 0x0154 4648 #define CB_SETEXTENDEDUI 0x0155 4649 #define CB_GETEXTENDEDUI 0x0156 4650 #define CB_GETDROPPEDSTATE 0x0157 4651 #define CB_FINDSTRINGEXACT 0x0158 4652 #define CB_SETLOCALE 0x0159 4653 #define CB_GETLOCALE 0x015A 4654 #define CB_GETTOPINDEX 0x015b 4655 #define CB_SETTOPINDEX 0x015c 4656 #define CB_GETHORIZONTALEXTENT 0x015d 4657 #define CB_SETHORIZONTALEXTENT 0x015e 4658 #define CB_GETDROPPEDWIDTH 0x015f 4659 #define CB_SETDROPPEDWIDTH 0x0160 4660 #define CB_INITSTORAGE 0x0161 4661 #if defined (_WIN32_WCE) && (_WIN32_WCE >= 0x0400) 4662 #define CB_MULTIPLEADDSTRING 0x0163 4663 #endif 4664 #define CB_GETCOMBOBOXINFO 0x0164 4665 #define CB_MSGMAX 0x0165 4666 #endif 4667 4668 #ifndef NOWINSTYLES 4669 4670 #define SBS_HORZ __MSABI_LONG(0x0000) 4671 #define SBS_VERT __MSABI_LONG(0x0001) 4672 #define SBS_TOPALIGN __MSABI_LONG(0x0002) 4673 #define SBS_LEFTALIGN __MSABI_LONG(0x0002) 4674 #define SBS_BOTTOMALIGN __MSABI_LONG(0x0004) 4675 #define SBS_RIGHTALIGN __MSABI_LONG(0x0004) 4676 #define SBS_SIZEBOXTOPLEFTALIGN __MSABI_LONG(0x0002) 4677 #define SBS_SIZEBOXBOTTOMRIGHTALIGN __MSABI_LONG(0x0004) 4678 #define SBS_SIZEBOX __MSABI_LONG(0x0008) 4679 #define SBS_SIZEGRIP __MSABI_LONG(0x0010) 4680 #endif 4681 4682 #ifndef NOWINMESSAGES 4683 #define SBM_SETPOS 0x00E0 4684 #define SBM_GETPOS 0x00E1 4685 #define SBM_SETRANGE 0x00E2 4686 #define SBM_SETRANGEREDRAW 0x00E6 4687 #define SBM_GETRANGE 0x00E3 4688 #define SBM_ENABLE_ARROWS 0x00E4 4689 #define SBM_SETSCROLLINFO 0x00E9 4690 #define SBM_GETSCROLLINFO 0x00EA 4691 #define SBM_GETSCROLLBARINFO 0x00EB 4692 4693 #define SIF_RANGE 0x0001 4694 #define SIF_PAGE 0x0002 4695 #define SIF_POS 0x0004 4696 #define SIF_DISABLENOSCROLL 0x0008 4697 #define SIF_TRACKPOS 0x0010 4698 #define SIF_ALL (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS) 4699 4700 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 4701 typedef struct tagSCROLLINFO { 4702 UINT cbSize; 4703 UINT fMask; 4704 int nMin; 4705 int nMax; 4706 UINT nPage; 4707 int nPos; 4708 int nTrackPos; 4709 } SCROLLINFO,*LPSCROLLINFO; 4710 typedef SCROLLINFO CONST *LPCSCROLLINFO; 4711 4712 WINUSERAPI int WINAPI SetScrollInfo(HWND hwnd,int nBar,LPCSCROLLINFO lpsi,WINBOOL redraw); 4713 WINUSERAPI WINBOOL WINAPI GetScrollInfo(HWND hwnd,int nBar,LPSCROLLINFO lpsi); 4714 #endif 4715 #endif 4716 #endif 4717 4718 #ifndef NOMDI 4719 4720 #define MDIS_ALLCHILDSTYLES 0x0001 4721 4722 #define MDITILE_VERTICAL 0x0000 4723 #define MDITILE_HORIZONTAL 0x0001 4724 #define MDITILE_SKIPDISABLED 0x0002 4725 #define MDITILE_ZORDER 0x0004 4726 4727 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 4728 typedef struct tagMDICREATESTRUCTA { 4729 LPCSTR szClass; 4730 LPCSTR szTitle; 4731 HANDLE hOwner; 4732 int x; 4733 int y; 4734 int cx; 4735 int cy; 4736 DWORD style; 4737 LPARAM lParam; 4738 } MDICREATESTRUCTA,*LPMDICREATESTRUCTA; 4739 4740 typedef struct tagMDICREATESTRUCTW { 4741 LPCWSTR szClass; 4742 LPCWSTR szTitle; 4743 HANDLE hOwner; 4744 int x; 4745 int y; 4746 int cx; 4747 int cy; 4748 DWORD style; 4749 LPARAM lParam; 4750 } MDICREATESTRUCTW,*LPMDICREATESTRUCTW; 4751 4752 __MINGW_TYPEDEF_AW(MDICREATESTRUCT) 4753 __MINGW_TYPEDEF_AW(LPMDICREATESTRUCT) 4754 4755 typedef struct tagCLIENTCREATESTRUCT { 4756 HANDLE hWindowMenu; 4757 UINT idFirstChild; 4758 } CLIENTCREATESTRUCT,*LPCLIENTCREATESTRUCT; 4759 4760 #define DefFrameProc __MINGW_NAME_AW(DefFrameProc) 4761 #define DefMDIChildProc __MINGW_NAME_AW(DefMDIChildProc) 4762 #define CreateMDIWindow __MINGW_NAME_AW(CreateMDIWindow) 4763 4764 WINUSERAPI LRESULT WINAPI DefFrameProcA(HWND hWnd,HWND hWndMDIClient,UINT uMsg,WPARAM wParam,LPARAM lParam); 4765 WINUSERAPI LRESULT WINAPI DefFrameProcW(HWND hWnd,HWND hWndMDIClient,UINT uMsg,WPARAM wParam,LPARAM lParam); 4766 WINUSERAPI LRESULT WINAPI DefMDIChildProcA(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam); 4767 WINUSERAPI LRESULT WINAPI DefMDIChildProcW(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam); 4768 4769 #ifndef NOMSG 4770 WINUSERAPI WINBOOL WINAPI TranslateMDISysAccel(HWND hWndClient,LPMSG lpMsg); 4771 #endif 4772 4773 WINUSERAPI UINT WINAPI ArrangeIconicWindows(HWND hWnd); 4774 WINUSERAPI HWND WINAPI CreateMDIWindowA(LPCSTR lpClassName,LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HINSTANCE hInstance,LPARAM lParam); 4775 WINUSERAPI HWND WINAPI CreateMDIWindowW(LPCWSTR lpClassName,LPCWSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HINSTANCE hInstance,LPARAM lParam); 4776 WINUSERAPI WORD WINAPI TileWindows(HWND hwndParent,UINT wHow,CONST RECT *lpRect,UINT cKids,const HWND *lpKids); 4777 WINUSERAPI WORD WINAPI CascadeWindows(HWND hwndParent,UINT wHow,CONST RECT *lpRect,UINT cKids,const HWND *lpKids); 4778 #endif 4779 #endif 4780 #endif 4781 4782 #ifndef NOHELP 4783 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 4784 typedef DWORD HELPPOLY; 4785 4786 typedef struct tagMULTIKEYHELPA { 4787 DWORD mkSize; 4788 CHAR mkKeylist; 4789 CHAR szKeyphrase[1]; 4790 } MULTIKEYHELPA,*PMULTIKEYHELPA,*LPMULTIKEYHELPA; 4791 4792 typedef struct tagMULTIKEYHELPW { 4793 DWORD mkSize; 4794 WCHAR mkKeylist; 4795 WCHAR szKeyphrase[1]; 4796 } MULTIKEYHELPW,*PMULTIKEYHELPW,*LPMULTIKEYHELPW; 4797 4798 __MINGW_TYPEDEF_AW(MULTIKEYHELP) 4799 __MINGW_TYPEDEF_AW(PMULTIKEYHELP) 4800 __MINGW_TYPEDEF_AW(LPMULTIKEYHELP) 4801 4802 typedef struct tagHELPWININFOA { 4803 int wStructSize; 4804 int x; 4805 int y; 4806 int dx; 4807 int dy; 4808 int wMax; 4809 CHAR rgchMember[2]; 4810 } HELPWININFOA,*PHELPWININFOA,*LPHELPWININFOA; 4811 4812 typedef struct tagHELPWININFOW { 4813 int wStructSize; 4814 int x; 4815 int y; 4816 int dx; 4817 int dy; 4818 int wMax; 4819 WCHAR rgchMember[2]; 4820 } HELPWININFOW,*PHELPWININFOW,*LPHELPWININFOW; 4821 4822 __MINGW_TYPEDEF_AW(HELPWININFO) 4823 __MINGW_TYPEDEF_AW(PHELPWININFO) 4824 __MINGW_TYPEDEF_AW(LPHELPWININFO) 4825 4826 #define WinHelp __MINGW_NAME_AW(WinHelp) 4827 4828 WINUSERAPI WINBOOL WINAPI WinHelpA(HWND hWndMain,LPCSTR lpszHelp,UINT uCommand,ULONG_PTR dwData); 4829 WINUSERAPI WINBOOL WINAPI WinHelpW(HWND hWndMain,LPCWSTR lpszHelp,UINT uCommand,ULONG_PTR dwData); 4830 4831 #define HELP_CONTEXT 0x0001 4832 #define HELP_QUIT 0x0002 4833 #define HELP_INDEX 0x0003 4834 #define HELP_CONTENTS 0x0003 4835 #define HELP_HELPONHELP 0x0004 4836 #define HELP_SETINDEX 0x0005 4837 #define HELP_SETCONTENTS 0x0005 4838 #define HELP_CONTEXTPOPUP 0x0008 4839 #define HELP_FORCEFILE 0x0009 4840 #define HELP_KEY 0x0101 4841 #define HELP_COMMAND 0x0102 4842 #define HELP_PARTIALKEY 0x0105 4843 #define HELP_MULTIKEY 0x0201 4844 #define HELP_SETWINPOS 0x0203 4845 #define HELP_CONTEXTMENU 0x000a 4846 #define HELP_FINDER 0x000b 4847 #define HELP_WM_HELP 0x000c 4848 #define HELP_SETPOPUP_POS 0x000d 4849 4850 #define HELP_TCARD 0x8000 4851 #define HELP_TCARD_DATA 0x0010 4852 #define HELP_TCARD_OTHER_CALLER 0x0011 4853 4854 #define IDH_NO_HELP 28440 4855 #define IDH_MISSING_CONTEXT 28441 4856 #define IDH_GENERIC_HELP_BUTTON 28442 4857 #define IDH_OK 28443 4858 #define IDH_CANCEL 28444 4859 #define IDH_HELP 28445 4860 #endif 4861 #endif 4862 4863 #define GR_GDIOBJECTS 0 4864 #define GR_USEROBJECTS 1 4865 #if WINVER >= 0x0601 4866 #define GR_GDIOBJECTS_PEAK 2 4867 #define GR_USEROBJECTS_PEAK 4 4868 4869 #define GR_GLOBAL ((HANDLE)-2) 4870 #endif 4871 4872 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 4873 WINUSERAPI DWORD WINAPI GetGuiResources(HANDLE hProcess,DWORD uiFlags); 4874 #endif 4875 4876 #ifndef NOSYSPARAMSINFO 4877 4878 #define SPI_GETBEEP 0x0001 4879 #define SPI_SETBEEP 0x0002 4880 #define SPI_GETMOUSE 0x0003 4881 #define SPI_SETMOUSE 0x0004 4882 #define SPI_GETBORDER 0x0005 4883 #define SPI_SETBORDER 0x0006 4884 #define SPI_GETKEYBOARDSPEED 0x000A 4885 #define SPI_SETKEYBOARDSPEED 0x000B 4886 #define SPI_LANGDRIVER 0x000C 4887 #define SPI_ICONHORIZONTALSPACING 0x000D 4888 #define SPI_GETSCREENSAVETIMEOUT 0x000E 4889 #define SPI_SETSCREENSAVETIMEOUT 0x000F 4890 #define SPI_GETSCREENSAVEACTIVE 0x0010 4891 #define SPI_SETSCREENSAVEACTIVE 0x0011 4892 #define SPI_GETGRIDGRANULARITY 0x0012 4893 #define SPI_SETGRIDGRANULARITY 0x0013 4894 #define SPI_SETDESKWALLPAPER 0x0014 4895 #define SPI_SETDESKPATTERN 0x0015 4896 #define SPI_GETKEYBOARDDELAY 0x0016 4897 #define SPI_SETKEYBOARDDELAY 0x0017 4898 #define SPI_ICONVERTICALSPACING 0x0018 4899 #define SPI_GETICONTITLEWRAP 0x0019 4900 #define SPI_SETICONTITLEWRAP 0x001A 4901 #define SPI_GETMENUDROPALIGNMENT 0x001B 4902 #define SPI_SETMENUDROPALIGNMENT 0x001C 4903 #define SPI_SETDOUBLECLKWIDTH 0x001D 4904 #define SPI_SETDOUBLECLKHEIGHT 0x001E 4905 #define SPI_GETICONTITLELOGFONT 0x001F 4906 #define SPI_SETDOUBLECLICKTIME 0x0020 4907 #define SPI_SETMOUSEBUTTONSWAP 0x0021 4908 #define SPI_SETICONTITLELOGFONT 0x0022 4909 #define SPI_GETFASTTASKSWITCH 0x0023 4910 #define SPI_SETFASTTASKSWITCH 0x0024 4911 #define SPI_SETDRAGFULLWINDOWS 0x0025 4912 #define SPI_GETDRAGFULLWINDOWS 0x0026 4913 #define SPI_GETNONCLIENTMETRICS 0x0029 4914 #define SPI_SETNONCLIENTMETRICS 0x002A 4915 #define SPI_GETMINIMIZEDMETRICS 0x002B 4916 #define SPI_SETMINIMIZEDMETRICS 0x002C 4917 #define SPI_GETICONMETRICS 0x002D 4918 #define SPI_SETICONMETRICS 0x002E 4919 #define SPI_SETWORKAREA 0x002F 4920 #define SPI_GETWORKAREA 0x0030 4921 #define SPI_SETPENWINDOWS 0x0031 4922 4923 #define SPI_GETHIGHCONTRAST 0x0042 4924 #define SPI_SETHIGHCONTRAST 0x0043 4925 #define SPI_GETKEYBOARDPREF 0x0044 4926 #define SPI_SETKEYBOARDPREF 0x0045 4927 #define SPI_GETSCREENREADER 0x0046 4928 #define SPI_SETSCREENREADER 0x0047 4929 #define SPI_GETANIMATION 0x0048 4930 #define SPI_SETANIMATION 0x0049 4931 #define SPI_GETFONTSMOOTHING 0x004A 4932 #define SPI_SETFONTSMOOTHING 0x004B 4933 #define SPI_SETDRAGWIDTH 0x004C 4934 #define SPI_SETDRAGHEIGHT 0x004D 4935 #define SPI_SETHANDHELD 0x004E 4936 #define SPI_GETLOWPOWERTIMEOUT 0x004F 4937 #define SPI_GETPOWEROFFTIMEOUT 0x0050 4938 #define SPI_SETLOWPOWERTIMEOUT 0x0051 4939 #define SPI_SETPOWEROFFTIMEOUT 0x0052 4940 #define SPI_GETLOWPOWERACTIVE 0x0053 4941 #define SPI_GETPOWEROFFACTIVE 0x0054 4942 #define SPI_SETLOWPOWERACTIVE 0x0055 4943 #define SPI_SETPOWEROFFACTIVE 0x0056 4944 #define SPI_SETCURSORS 0x0057 4945 #define SPI_SETICONS 0x0058 4946 #define SPI_GETDEFAULTINPUTLANG 0x0059 4947 #define SPI_SETDEFAULTINPUTLANG 0x005A 4948 #define SPI_SETLANGTOGGLE 0x005B 4949 #define SPI_GETWINDOWSEXTENSION 0x005C 4950 #define SPI_SETMOUSETRAILS 0x005D 4951 #define SPI_GETMOUSETRAILS 0x005E 4952 #define SPI_SETSCREENSAVERRUNNING 0x0061 4953 #define SPI_SCREENSAVERRUNNING SPI_SETSCREENSAVERRUNNING 4954 #define SPI_GETFILTERKEYS 0x0032 4955 #define SPI_SETFILTERKEYS 0x0033 4956 #define SPI_GETTOGGLEKEYS 0x0034 4957 #define SPI_SETTOGGLEKEYS 0x0035 4958 #define SPI_GETMOUSEKEYS 0x0036 4959 #define SPI_SETMOUSEKEYS 0x0037 4960 #define SPI_GETSHOWSOUNDS 0x0038 4961 #define SPI_SETSHOWSOUNDS 0x0039 4962 #define SPI_GETSTICKYKEYS 0x003A 4963 #define SPI_SETSTICKYKEYS 0x003B 4964 #define SPI_GETACCESSTIMEOUT 0x003C 4965 #define SPI_SETACCESSTIMEOUT 0x003D 4966 #define SPI_GETSERIALKEYS 0x003E 4967 #define SPI_SETSERIALKEYS 0x003F 4968 #define SPI_GETSOUNDSENTRY 0x0040 4969 #define SPI_SETSOUNDSENTRY 0x0041 4970 #define SPI_GETSNAPTODEFBUTTON 0x005F 4971 #define SPI_SETSNAPTODEFBUTTON 0x0060 4972 #define SPI_GETMOUSEHOVERWIDTH 0x0062 4973 #define SPI_SETMOUSEHOVERWIDTH 0x0063 4974 #define SPI_GETMOUSEHOVERHEIGHT 0x0064 4975 #define SPI_SETMOUSEHOVERHEIGHT 0x0065 4976 #define SPI_GETMOUSEHOVERTIME 0x0066 4977 #define SPI_SETMOUSEHOVERTIME 0x0067 4978 #define SPI_GETWHEELSCROLLLINES 0x0068 4979 #define SPI_SETWHEELSCROLLLINES 0x0069 4980 #define SPI_GETMENUSHOWDELAY 0x006A 4981 #define SPI_SETMENUSHOWDELAY 0x006B 4982 #if _WIN32_WINNT >= 0x0600 4983 #define SPI_GETWHEELSCROLLCHARS 0x006C 4984 #define SPI_SETWHEELSCROLLCHARS 0x006D 4985 #endif 4986 #define SPI_GETSHOWIMEUI 0x006E 4987 #define SPI_SETSHOWIMEUI 0x006F 4988 #define SPI_GETMOUSESPEED 0x0070 4989 #define SPI_SETMOUSESPEED 0x0071 4990 #define SPI_GETSCREENSAVERRUNNING 0x0072 4991 #define SPI_GETDESKWALLPAPER 0x0073 4992 #if WINVER >= 0x0600 4993 #define SPI_GETAUDIODESCRIPTION 0x0074 4994 #define SPI_SETAUDIODESCRIPTION 0x0075 4995 #define SPI_GETSCREENSAVESECURE 0x0076 4996 #define SPI_SETSCREENSAVESECURE 0x0077 4997 #endif 4998 #if _WIN32_WINNT >= 0x0601 4999 #define SPI_GETHUNGAPPTIMEOUT 0x0078 5000 #define SPI_SETHUNGAPPTIMEOUT 0x0079 5001 #define SPI_GETWAITTOKILLTIMEOUT 0x007a 5002 #define SPI_SETWAITTOKILLTIMEOUT 0x007b 5003 #define SPI_GETWAITTOKILLSERVICETIMEOUT 0x007c 5004 #define SPI_SETWAITTOKILLSERVICETIMEOUT 0x007d 5005 #define SPI_GETMOUSEDOCKTHRESHOLD 0x007e 5006 #define SPI_SETMOUSEDOCKTHRESHOLD 0x007f 5007 #define SPI_GETPENDOCKTHRESHOLD 0x0080 5008 #define SPI_SETPENDOCKTHRESHOLD 0x0081 5009 #define SPI_GETWINARRANGING 0x0082 5010 #define SPI_SETWINARRANGING 0x0083 5011 #define SPI_GETMOUSEDRAGOUTTHRESHOLD 0x0084 5012 #define SPI_SETMOUSEDRAGOUTTHRESHOLD 0x0085 5013 #define SPI_GETPENDRAGOUTTHRESHOLD 0x0086 5014 #define SPI_SETPENDRAGOUTTHRESHOLD 0x0087 5015 #define SPI_GETMOUSESIDEMOVETHRESHOLD 0x0088 5016 #define SPI_SETMOUSESIDEMOVETHRESHOLD 0x0089 5017 #define SPI_GETPENSIDEMOVETHRESHOLD 0x008a 5018 #define SPI_SETPENSIDEMOVETHRESHOLD 0x008b 5019 #define SPI_GETDRAGFROMMAXIMIZE 0x008c 5020 #define SPI_SETDRAGFROMMAXIMIZE 0x008d 5021 #define SPI_GETSNAPSIZING 0x008e 5022 #define SPI_SETSNAPSIZING 0x008f 5023 #define SPI_GETDOCKMOVING 0x0090 5024 #define SPI_SETDOCKMOVING 0x0091 5025 #endif 5026 #if WINVER >= 0x0602 5027 #define SPI_GETTOUCHPREDICTIONPARAMETERS 0x009c 5028 #define SPI_SETTOUCHPREDICTIONPARAMETERS 0x009d 5029 #define SPI_GETLOGICALDPIOVERRIDE 0x009e 5030 #define SPI_SETLOGICALDPIOVERRIDE 0x009f 5031 #define SPI_GETMOUSECORNERCLIPLENGTH 0x00a0 5032 #define SPI_SETMOUSECORNERCLIPLENGTH 0x00a1 5033 #define SPI_GETMENURECT 0x00a2 5034 #define SPI_SETMENURECT 0x00a3 5035 #endif 5036 5037 #define SPI_GETACTIVEWINDOWTRACKING 0x1000 5038 #define SPI_SETACTIVEWINDOWTRACKING 0x1001 5039 #define SPI_GETMENUANIMATION 0x1002 5040 #define SPI_SETMENUANIMATION 0x1003 5041 #define SPI_GETCOMBOBOXANIMATION 0x1004 5042 #define SPI_SETCOMBOBOXANIMATION 0x1005 5043 #define SPI_GETLISTBOXSMOOTHSCROLLING 0x1006 5044 #define SPI_SETLISTBOXSMOOTHSCROLLING 0x1007 5045 #define SPI_GETGRADIENTCAPTIONS 0x1008 5046 #define SPI_SETGRADIENTCAPTIONS 0x1009 5047 #define SPI_GETKEYBOARDCUES 0x100A 5048 #define SPI_SETKEYBOARDCUES 0x100B 5049 #define SPI_GETMENUUNDERLINES SPI_GETKEYBOARDCUES 5050 #define SPI_SETMENUUNDERLINES SPI_SETKEYBOARDCUES 5051 #define SPI_GETACTIVEWNDTRKZORDER 0x100C 5052 #define SPI_SETACTIVEWNDTRKZORDER 0x100D 5053 #define SPI_GETHOTTRACKING 0x100E 5054 #define SPI_SETHOTTRACKING 0x100F 5055 #define SPI_GETMENUFADE 0x1012 5056 #define SPI_SETMENUFADE 0x1013 5057 #define SPI_GETSELECTIONFADE 0x1014 5058 #define SPI_SETSELECTIONFADE 0x1015 5059 #define SPI_GETTOOLTIPANIMATION 0x1016 5060 #define SPI_SETTOOLTIPANIMATION 0x1017 5061 #define SPI_GETTOOLTIPFADE 0x1018 5062 #define SPI_SETTOOLTIPFADE 0x1019 5063 #define SPI_GETCURSORSHADOW 0x101A 5064 #define SPI_SETCURSORSHADOW 0x101B 5065 #define SPI_GETMOUSESONAR 0x101C 5066 #define SPI_SETMOUSESONAR 0x101D 5067 #define SPI_GETMOUSECLICKLOCK 0x101E 5068 #define SPI_SETMOUSECLICKLOCK 0x101F 5069 #define SPI_GETMOUSEVANISH 0x1020 5070 #define SPI_SETMOUSEVANISH 0x1021 5071 #define SPI_GETFLATMENU 0x1022 5072 #define SPI_SETFLATMENU 0x1023 5073 #define SPI_GETDROPSHADOW 0x1024 5074 #define SPI_SETDROPSHADOW 0x1025 5075 #define SPI_GETBLOCKSENDINPUTRESETS 0x1026 5076 #define SPI_SETBLOCKSENDINPUTRESETS 0x1027 5077 #define SPI_GETUIEFFECTS 0x103E 5078 #define SPI_SETUIEFFECTS 0x103F 5079 #if _WIN32_WINNT >= 0x0600 5080 #define SPI_GETDISABLEOVERLAPPEDCONTENT 0x1040 5081 #define SPI_SETDISABLEOVERLAPPEDCONTENT 0x1041 5082 #define SPI_GETCLIENTAREAANIMATION 0x1042 5083 #define SPI_SETCLIENTAREAANIMATION 0x1043 5084 #define SPI_GETCLEARTYPE 0x1048 5085 #define SPI_SETCLEARTYPE 0x1049 5086 #define SPI_GETSPEECHRECOGNITION 0x104a 5087 #define SPI_SETSPEECHRECOGNITION 0x104b 5088 #endif 5089 #if WINVER >= 0x0601 5090 #define SPI_GETCARETBROWSING 0x104c 5091 #define SPI_SETCARETBROWSING 0x104d 5092 #define SPI_GETTHREADLOCALINPUTSETTINGS 0x104e 5093 #define SPI_SETTHREADLOCALINPUTSETTINGS 0x104f 5094 #define SPI_GETSYSTEMLANGUAGEBAR 0x1050 5095 #define SPI_SETSYSTEMLANGUAGEBAR 0x1051 5096 #endif 5097 #define SPI_GETFOREGROUNDLOCKTIMEOUT 0x2000 5098 #define SPI_SETFOREGROUNDLOCKTIMEOUT 0x2001 5099 #define SPI_GETACTIVEWNDTRKTIMEOUT 0x2002 5100 #define SPI_SETACTIVEWNDTRKTIMEOUT 0x2003 5101 #define SPI_GETFOREGROUNDFLASHCOUNT 0x2004 5102 #define SPI_SETFOREGROUNDFLASHCOUNT 0x2005 5103 #define SPI_GETCARETWIDTH 0x2006 5104 #define SPI_SETCARETWIDTH 0x2007 5105 #define SPI_GETMOUSECLICKLOCKTIME 0x2008 5106 #define SPI_SETMOUSECLICKLOCKTIME 0x2009 5107 #define SPI_GETFONTSMOOTHINGTYPE 0x200A 5108 #define SPI_SETFONTSMOOTHINGTYPE 0x200B 5109 5110 #define FE_FONTSMOOTHINGSTANDARD 0x0001 5111 #define FE_FONTSMOOTHINGCLEARTYPE 0x0002 5112 #define FE_FONTSMOOTHINGDOCKING 0x8000 5113 5114 #define SPI_GETFONTSMOOTHINGCONTRAST 0x200C 5115 #define SPI_SETFONTSMOOTHINGCONTRAST 0x200D 5116 #define SPI_GETFOCUSBORDERWIDTH 0x200E 5117 #define SPI_SETFOCUSBORDERWIDTH 0x200F 5118 #define SPI_GETFOCUSBORDERHEIGHT 0x2010 5119 #define SPI_SETFOCUSBORDERHEIGHT 0x2011 5120 #define SPI_GETFONTSMOOTHINGORIENTATION 0x2012 5121 #define SPI_SETFONTSMOOTHINGORIENTATION 0x2013 5122 #if _WIN32_WINNT >= 0x0600 5123 #define SPI_GETMINIMUMHITRADIUS 0x2014 5124 #define SPI_SETMINIMUMHITRADIUS 0x2015 5125 #define SPI_GETMESSAGEDURATION 0x2016 5126 #define SPI_SETMESSAGEDURATION 0x2017 5127 #endif 5128 #if WINVER >= 0x0602 5129 #define SPI_GETCONTACTVISUALIZATION 0x2018 5130 #define SPI_SETCONTACTVISUALIZATION 0x2019 5131 #define SPI_GETGESTUREVISUALIZATION 0x201a 5132 #define SPI_SETGESTUREVISUALIZATION 0x201b 5133 #endif 5134 5135 #if WINVER >= 0x0602 5136 #define CONTACTVISUALIZATION_OFF 0x0000 5137 #define CONTACTVISUALIZATION_ON 0x0001 5138 #define CONTACTVISUALIZATION_PRESENTATIONMODE 0x0002 5139 5140 #define GESTUREVISUALIZATION_OFF 0x0000 5141 #define GESTUREVISUALIZATION_ON 0x001f 5142 #define GESTUREVISUALIZATION_TAP 0x0001 5143 #define GESTUREVISUALIZATION_DOUBLETAP 0x0002 5144 #define GESTUREVISUALIZATION_PRESSANDTAP 0x0004 5145 #define GESTUREVISUALIZATION_PRESSANDHOLD 0x0008 5146 #define GESTUREVISUALIZATION_RIGHTTAP 0x0010 5147 5148 #define MAX_TOUCH_PREDICTION_FILTER_TAPS 3 5149 5150 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5151 typedef struct tagTouchPredictionParameters { 5152 UINT cbSize; 5153 UINT dwLatency; 5154 UINT dwSampleTime; 5155 UINT bUseHWTimeStamp; 5156 } TOUCHPREDICTIONPARAMETERS,*PTOUCHPREDICTIONPARAMETERS; 5157 #endif 5158 5159 #define TOUCHPREDICTIONPARAMETERS_DEFAULT_LATENCY 8 5160 #define TOUCHPREDICTIONPARAMETERS_DEFAULT_SAMPLETIME 8 5161 #define TOUCHPREDICTIONPARAMETERS_DEFAULT_USE_HW_TIMESTAMP 1 5162 #define TOUCHPREDICTIONPARAMETERS_DEFAULT_RLS_DELTA 0.001f 5163 #define TOUCHPREDICTIONPARAMETERS_DEFAULT_RLS_LAMBDA_MIN 0.9f 5164 #define TOUCHPREDICTIONPARAMETERS_DEFAULT_RLS_LAMBDA_MAX 0.999f 5165 #define TOUCHPREDICTIONPARAMETERS_DEFAULT_RLS_LAMBDA_LEARNING_RATE 0.001f 5166 #define TOUCHPREDICTIONPARAMETERS_DEFAULT_RLS_EXPO_SMOOTH_ALPHA 0.99f 5167 5168 #define MAX_LOGICALDPIOVERRIDE 2 5169 #define MIN_LOGICALDPIOVERRIDE -2 5170 #endif 5171 5172 #define FE_FONTSMOOTHINGORIENTATIONBGR 0x0000 5173 #define FE_FONTSMOOTHINGORIENTATIONRGB 0x0001 5174 5175 #define SPIF_UPDATEINIFILE 0x0001 5176 #define SPIF_SENDWININICHANGE 0x0002 5177 #define SPIF_SENDCHANGE SPIF_SENDWININICHANGE 5178 5179 #define METRICS_USEDEFAULT -1 5180 #ifdef _WINGDI_ 5181 #ifndef NOGDI 5182 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5183 typedef struct tagNONCLIENTMETRICSA { 5184 UINT cbSize; 5185 int iBorderWidth; 5186 int iScrollWidth; 5187 int iScrollHeight; 5188 int iCaptionWidth; 5189 int iCaptionHeight; 5190 LOGFONTA lfCaptionFont; 5191 int iSmCaptionWidth; 5192 int iSmCaptionHeight; 5193 LOGFONTA lfSmCaptionFont; 5194 int iMenuWidth; 5195 int iMenuHeight; 5196 LOGFONTA lfMenuFont; 5197 LOGFONTA lfStatusFont; 5198 LOGFONTA lfMessageFont; 5199 #if WINVER >= 0x0600 5200 int iPaddedBorderWidth; 5201 #endif 5202 } NONCLIENTMETRICSA,*PNONCLIENTMETRICSA,*LPNONCLIENTMETRICSA; 5203 5204 typedef struct tagNONCLIENTMETRICSW { 5205 UINT cbSize; 5206 int iBorderWidth; 5207 int iScrollWidth; 5208 int iScrollHeight; 5209 int iCaptionWidth; 5210 int iCaptionHeight; 5211 LOGFONTW lfCaptionFont; 5212 int iSmCaptionWidth; 5213 int iSmCaptionHeight; 5214 LOGFONTW lfSmCaptionFont; 5215 int iMenuWidth; 5216 int iMenuHeight; 5217 LOGFONTW lfMenuFont; 5218 LOGFONTW lfStatusFont; 5219 LOGFONTW lfMessageFont; 5220 #if WINVER >= 0x0600 5221 int iPaddedBorderWidth; 5222 #endif 5223 } NONCLIENTMETRICSW,*PNONCLIENTMETRICSW,*LPNONCLIENTMETRICSW; 5224 5225 __MINGW_TYPEDEF_AW(NONCLIENTMETRICS) 5226 __MINGW_TYPEDEF_AW(PNONCLIENTMETRICS) 5227 __MINGW_TYPEDEF_AW(LPNONCLIENTMETRICS) 5228 #endif 5229 #endif 5230 #endif 5231 5232 #define ARW_BOTTOMLEFT __MSABI_LONG(0x0000) 5233 #define ARW_BOTTOMRIGHT __MSABI_LONG(0x0001) 5234 #define ARW_TOPLEFT __MSABI_LONG(0x0002) 5235 #define ARW_TOPRIGHT __MSABI_LONG(0x0003) 5236 #define ARW_STARTMASK __MSABI_LONG(0x0003) 5237 #define ARW_STARTRIGHT __MSABI_LONG(0x0001) 5238 #define ARW_STARTTOP __MSABI_LONG(0x0002) 5239 5240 #define ARW_LEFT __MSABI_LONG(0x0000) 5241 #define ARW_RIGHT __MSABI_LONG(0x0000) 5242 #define ARW_UP __MSABI_LONG(0x0004) 5243 #define ARW_DOWN __MSABI_LONG(0x0004) 5244 #define ARW_HIDE __MSABI_LONG(0x0008) 5245 5246 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5247 typedef struct tagMINIMIZEDMETRICS { 5248 UINT cbSize; 5249 int iWidth; 5250 int iHorzGap; 5251 int iVertGap; 5252 int iArrange; 5253 } MINIMIZEDMETRICS,*PMINIMIZEDMETRICS,*LPMINIMIZEDMETRICS; 5254 5255 #ifdef _WINGDI_ 5256 #ifndef NOGDI 5257 typedef struct tagICONMETRICSA { 5258 UINT cbSize; 5259 int iHorzSpacing; 5260 int iVertSpacing; 5261 int iTitleWrap; 5262 LOGFONTA lfFont; 5263 } ICONMETRICSA,*PICONMETRICSA,*LPICONMETRICSA; 5264 5265 typedef struct tagICONMETRICSW { 5266 UINT cbSize; 5267 int iHorzSpacing; 5268 int iVertSpacing; 5269 int iTitleWrap; 5270 LOGFONTW lfFont; 5271 } ICONMETRICSW,*PICONMETRICSW,*LPICONMETRICSW; 5272 5273 __MINGW_TYPEDEF_AW(ICONMETRICS) 5274 __MINGW_TYPEDEF_AW(PICONMETRICS) 5275 __MINGW_TYPEDEF_AW(LPICONMETRICS) 5276 #endif 5277 #endif 5278 5279 typedef struct tagANIMATIONINFO { 5280 UINT cbSize; 5281 int iMinAnimate; 5282 } ANIMATIONINFO,*LPANIMATIONINFO; 5283 5284 typedef struct tagSERIALKEYSA { 5285 UINT cbSize; 5286 DWORD dwFlags; 5287 LPSTR lpszActivePort; 5288 LPSTR lpszPort; 5289 UINT iBaudRate; 5290 UINT iPortState; 5291 UINT iActive; 5292 } SERIALKEYSA,*LPSERIALKEYSA; 5293 5294 typedef struct tagSERIALKEYSW { 5295 UINT cbSize; 5296 DWORD dwFlags; 5297 LPWSTR lpszActivePort; 5298 LPWSTR lpszPort; 5299 UINT iBaudRate; 5300 UINT iPortState; 5301 UINT iActive; 5302 } SERIALKEYSW,*LPSERIALKEYSW; 5303 5304 __MINGW_TYPEDEF_AW(SERIALKEYS) 5305 __MINGW_TYPEDEF_AW(LPSERIALKEYS) 5306 5307 typedef struct tagHIGHCONTRASTA { 5308 UINT cbSize; 5309 DWORD dwFlags; 5310 LPSTR lpszDefaultScheme; 5311 } HIGHCONTRASTA,*LPHIGHCONTRASTA; 5312 5313 typedef struct tagHIGHCONTRASTW { 5314 UINT cbSize; 5315 DWORD dwFlags; 5316 LPWSTR lpszDefaultScheme; 5317 } HIGHCONTRASTW,*LPHIGHCONTRASTW; 5318 5319 __MINGW_TYPEDEF_AW(HIGHCONTRAST) 5320 __MINGW_TYPEDEF_AW(LPHIGHCONTRAST) 5321 #endif 5322 5323 #define SERKF_SERIALKEYSON 0x00000001 5324 #define SERKF_AVAILABLE 0x00000002 5325 #define SERKF_INDICATOR 0x00000004 5326 5327 #define HCF_HIGHCONTRASTON 0x00000001 5328 #define HCF_AVAILABLE 0x00000002 5329 #define HCF_HOTKEYACTIVE 0x00000004 5330 #define HCF_CONFIRMHOTKEY 0x00000008 5331 #define HCF_HOTKEYSOUND 0x00000010 5332 #define HCF_INDICATOR 0x00000020 5333 #define HCF_HOTKEYAVAILABLE 0x00000040 5334 #define HCF_LOGONDESKTOP 0x00000100 5335 #define HCF_DEFAULTDESKTOP 0x00000200 5336 5337 #define CDS_UPDATEREGISTRY 0x00000001 5338 #define CDS_TEST 0x00000002 5339 #define CDS_FULLSCREEN 0x00000004 5340 #define CDS_GLOBAL 0x00000008 5341 #define CDS_SET_PRIMARY 0x00000010 5342 #define CDS_VIDEOPARAMETERS 0x00000020 5343 #if WINVER >= 0x0600 5344 #define CDS_ENABLE_UNSAFE_MODES 0x00000100 5345 #define CDS_DISABLE_UNSAFE_MODES 0x00000200 5346 #endif 5347 #define CDS_RESET 0x40000000 5348 #define CDS_RESET_EX 0x20000000 5349 #define CDS_NORESET 0x10000000 5350 5351 #include <tvout.h> 5352 5353 #define DISP_CHANGE_SUCCESSFUL 0 5354 #define DISP_CHANGE_RESTART 1 5355 #define DISP_CHANGE_FAILED -1 5356 #define DISP_CHANGE_BADMODE -2 5357 #define DISP_CHANGE_NOTUPDATED -3 5358 #define DISP_CHANGE_BADFLAGS -4 5359 #define DISP_CHANGE_BADPARAM -5 5360 #define DISP_CHANGE_BADDUALVIEW -6 5361 5362 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5363 #ifdef _WINGDI_ 5364 #ifndef NOGDI 5365 #define ChangeDisplaySettings __MINGW_NAME_AW(ChangeDisplaySettings) 5366 #define ChangeDisplaySettingsEx __MINGW_NAME_AW(ChangeDisplaySettingsEx) 5367 #define EnumDisplaySettings __MINGW_NAME_AW(EnumDisplaySettings) 5368 #define EnumDisplaySettingsEx __MINGW_NAME_AW(EnumDisplaySettingsEx) 5369 #define EnumDisplayDevices __MINGW_NAME_AW(EnumDisplayDevices) 5370 5371 WINUSERAPI LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA lpDevMode,DWORD dwFlags); 5372 WINUSERAPI LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,DWORD dwFlags); 5373 WINUSERAPI LONG WINAPI ChangeDisplaySettingsExA(LPCSTR lpszDeviceName,LPDEVMODEA lpDevMode,HWND hwnd,DWORD dwflags,LPVOID lParam); 5374 WINUSERAPI LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR lpszDeviceName,LPDEVMODEW lpDevMode,HWND hwnd,DWORD dwflags,LPVOID lParam); 5375 5376 #define ENUM_CURRENT_SETTINGS ((DWORD)-1) 5377 #define ENUM_REGISTRY_SETTINGS ((DWORD)-2) 5378 5379 WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsA(LPCSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEA lpDevMode); 5380 WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEW lpDevMode); 5381 WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEA lpDevMode,DWORD dwFlags); 5382 WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEW lpDevMode,DWORD dwFlags); 5383 5384 #define EDS_RAWMODE 0x00000002 5385 5386 WINUSERAPI WINBOOL WINAPI EnumDisplayDevicesA(LPCSTR lpDevice,DWORD iDevNum,PDISPLAY_DEVICEA lpDisplayDevice,DWORD dwFlags); 5387 WINUSERAPI WINBOOL WINAPI EnumDisplayDevicesW(LPCWSTR lpDevice,DWORD iDevNum,PDISPLAY_DEVICEW lpDisplayDevice,DWORD dwFlags); 5388 5389 #define EDD_GET_DEVICE_INTERFACE_NAME 0x00000001 5390 5391 #if WINVER >= 0x0601 5392 WINUSERAPI LONG WINAPI GetDisplayConfigBufferSizes (UINT32 flags, UINT32 *numPathArrayElements, UINT32 *numModeInfoArrayElements); 5393 WINUSERAPI LONG WINAPI SetDisplayConfig (UINT32 numPathArrayElements, DISPLAYCONFIG_PATH_INFO *pathArray, UINT32 numModeInfoArrayElements, DISPLAYCONFIG_MODE_INFO *modeInfoArray, UINT32 flags); 5394 WINUSERAPI LONG WINAPI QueryDisplayConfig (UINT32 flags, UINT32 *numPathArrayElements, DISPLAYCONFIG_PATH_INFO *pathArray, UINT32 *numModeInfoArrayElements, DISPLAYCONFIG_MODE_INFO *modeInfoArray, DISPLAYCONFIG_TOPOLOGY_ID *currentTopologyId); 5395 WINUSERAPI LONG WINAPI DisplayConfigGetDeviceInfo (DISPLAYCONFIG_DEVICE_INFO_HEADER *requestPacket); 5396 WINUSERAPI LONG WINAPI DisplayConfigSetDeviceInfo (DISPLAYCONFIG_DEVICE_INFO_HEADER *setPacket); 5397 #endif 5398 #endif 5399 #endif 5400 5401 #define SystemParametersInfo __MINGW_NAME_AW(SystemParametersInfo) 5402 5403 WINUSERAPI WINBOOL WINAPI SystemParametersInfoA(UINT uiAction,UINT uiParam,PVOID pvParam,UINT fWinIni); 5404 WINUSERAPI WINBOOL WINAPI SystemParametersInfoW(UINT uiAction,UINT uiParam,PVOID pvParam,UINT fWinIni); 5405 #endif 5406 #endif 5407 5408 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5409 typedef struct tagFILTERKEYS { 5410 UINT cbSize; 5411 DWORD dwFlags; 5412 DWORD iWaitMSec; 5413 DWORD iDelayMSec; 5414 DWORD iRepeatMSec; 5415 DWORD iBounceMSec; 5416 } FILTERKEYS,*LPFILTERKEYS; 5417 #endif 5418 5419 #define FKF_FILTERKEYSON 0x00000001 5420 #define FKF_AVAILABLE 0x00000002 5421 #define FKF_HOTKEYACTIVE 0x00000004 5422 #define FKF_CONFIRMHOTKEY 0x00000008 5423 #define FKF_HOTKEYSOUND 0x00000010 5424 #define FKF_INDICATOR 0x00000020 5425 #define FKF_CLICKON 0x00000040 5426 5427 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5428 typedef struct tagSTICKYKEYS { 5429 UINT cbSize; 5430 DWORD dwFlags; 5431 } STICKYKEYS,*LPSTICKYKEYS; 5432 #endif 5433 5434 #define SKF_STICKYKEYSON 0x00000001 5435 #define SKF_AVAILABLE 0x00000002 5436 #define SKF_HOTKEYACTIVE 0x00000004 5437 #define SKF_CONFIRMHOTKEY 0x00000008 5438 #define SKF_HOTKEYSOUND 0x00000010 5439 #define SKF_INDICATOR 0x00000020 5440 #define SKF_AUDIBLEFEEDBACK 0x00000040 5441 #define SKF_TRISTATE 0x00000080 5442 #define SKF_TWOKEYSOFF 0x00000100 5443 #define SKF_LALTLATCHED 0x10000000 5444 #define SKF_LCTLLATCHED 0x04000000 5445 #define SKF_LSHIFTLATCHED 0x01000000 5446 #define SKF_RALTLATCHED 0x20000000 5447 #define SKF_RCTLLATCHED 0x08000000 5448 #define SKF_RSHIFTLATCHED 0x02000000 5449 #define SKF_LWINLATCHED 0x40000000 5450 #define SKF_RWINLATCHED 0x80000000 5451 #define SKF_LALTLOCKED 0x00100000 5452 #define SKF_LCTLLOCKED 0x00040000 5453 #define SKF_LSHIFTLOCKED 0x00010000 5454 #define SKF_RALTLOCKED 0x00200000 5455 #define SKF_RCTLLOCKED 0x00080000 5456 #define SKF_RSHIFTLOCKED 0x00020000 5457 #define SKF_LWINLOCKED 0x00400000 5458 #define SKF_RWINLOCKED 0x00800000 5459 5460 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5461 typedef struct tagMOUSEKEYS { 5462 UINT cbSize; 5463 DWORD dwFlags; 5464 DWORD iMaxSpeed; 5465 DWORD iTimeToMaxSpeed; 5466 DWORD iCtrlSpeed; 5467 DWORD dwReserved1; 5468 DWORD dwReserved2; 5469 } MOUSEKEYS,*LPMOUSEKEYS; 5470 #endif 5471 5472 #define MKF_MOUSEKEYSON 0x00000001 5473 #define MKF_AVAILABLE 0x00000002 5474 #define MKF_HOTKEYACTIVE 0x00000004 5475 #define MKF_CONFIRMHOTKEY 0x00000008 5476 #define MKF_HOTKEYSOUND 0x00000010 5477 #define MKF_INDICATOR 0x00000020 5478 #define MKF_MODIFIERS 0x00000040 5479 #define MKF_REPLACENUMBERS 0x00000080 5480 #define MKF_LEFTBUTTONSEL 0x10000000 5481 #define MKF_RIGHTBUTTONSEL 0x20000000 5482 #define MKF_LEFTBUTTONDOWN 0x01000000 5483 #define MKF_RIGHTBUTTONDOWN 0x02000000 5484 #define MKF_MOUSEMODE 0x80000000 5485 5486 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5487 typedef struct tagACCESSTIMEOUT { 5488 UINT cbSize; 5489 DWORD dwFlags; 5490 DWORD iTimeOutMSec; 5491 } ACCESSTIMEOUT,*LPACCESSTIMEOUT; 5492 #endif 5493 5494 #define ATF_TIMEOUTON 0x00000001 5495 #define ATF_ONOFFFEEDBACK 0x00000002 5496 5497 #define SSGF_NONE 0 5498 #define SSGF_DISPLAY 3 5499 5500 #define SSTF_NONE 0 5501 #define SSTF_CHARS 1 5502 #define SSTF_BORDER 2 5503 #define SSTF_DISPLAY 3 5504 5505 #define SSWF_NONE 0 5506 #define SSWF_TITLE 1 5507 #define SSWF_WINDOW 2 5508 #define SSWF_DISPLAY 3 5509 #define SSWF_CUSTOM 4 5510 5511 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5512 typedef struct tagSOUNDSENTRYA { 5513 UINT cbSize; 5514 DWORD dwFlags; 5515 DWORD iFSTextEffect; 5516 DWORD iFSTextEffectMSec; 5517 DWORD iFSTextEffectColorBits; 5518 DWORD iFSGrafEffect; 5519 DWORD iFSGrafEffectMSec; 5520 DWORD iFSGrafEffectColor; 5521 DWORD iWindowsEffect; 5522 DWORD iWindowsEffectMSec; 5523 LPSTR lpszWindowsEffectDLL; 5524 DWORD iWindowsEffectOrdinal; 5525 } SOUNDSENTRYA,*LPSOUNDSENTRYA; 5526 5527 typedef struct tagSOUNDSENTRYW { 5528 UINT cbSize; 5529 DWORD dwFlags; 5530 DWORD iFSTextEffect; 5531 DWORD iFSTextEffectMSec; 5532 DWORD iFSTextEffectColorBits; 5533 DWORD iFSGrafEffect; 5534 DWORD iFSGrafEffectMSec; 5535 DWORD iFSGrafEffectColor; 5536 DWORD iWindowsEffect; 5537 DWORD iWindowsEffectMSec; 5538 LPWSTR lpszWindowsEffectDLL; 5539 DWORD iWindowsEffectOrdinal; 5540 } SOUNDSENTRYW,*LPSOUNDSENTRYW; 5541 5542 __MINGW_TYPEDEF_AW(SOUNDSENTRY) 5543 __MINGW_TYPEDEF_AW(LPSOUNDSENTRY) 5544 #endif 5545 5546 #define SSF_SOUNDSENTRYON 0x00000001 5547 #define SSF_AVAILABLE 0x00000002 5548 #define SSF_INDICATOR 0x00000004 5549 5550 #ifndef CCHDEVICENAME 5551 #define CCHDEVICENAME 32 5552 #endif 5553 5554 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5555 typedef struct tagTOGGLEKEYS { 5556 UINT cbSize; 5557 DWORD dwFlags; 5558 } TOGGLEKEYS,*LPTOGGLEKEYS; 5559 5560 typedef struct tagMONITORINFO { 5561 DWORD cbSize; 5562 RECT rcMonitor; 5563 RECT rcWork; 5564 DWORD dwFlags; 5565 } MONITORINFO,*LPMONITORINFO; 5566 5567 #if _WIN32_WINNT >= 0x0600 5568 typedef struct tagAUDIODESCRIPTION { 5569 UINT cbSize; 5570 WINBOOL Enabled; 5571 LCID Locale; 5572 } AUDIODESCRIPTION,*LPAUDIODESCRIPTION; 5573 #endif 5574 5575 #ifdef __cplusplus 5576 typedef struct tagMONITORINFOEXA : public tagMONITORINFO { 5577 CHAR szDevice[CCHDEVICENAME]; 5578 } MONITORINFOEXA,*LPMONITORINFOEXA; 5579 5580 typedef struct tagMONITORINFOEXW : public tagMONITORINFO { 5581 WCHAR szDevice[CCHDEVICENAME]; 5582 } MONITORINFOEXW,*LPMONITORINFOEXW; 5583 5584 __MINGW_TYPEDEF_AW(MONITORINFOEX) 5585 __MINGW_TYPEDEF_AW(LPMONITORINFOEX) 5586 #else 5587 typedef struct tagMONITORINFOEXA { 5588 __C89_NAMELESS struct { 5589 DWORD cbSize; 5590 RECT rcMonitor; 5591 RECT rcWork; 5592 DWORD dwFlags; 5593 }; 5594 CHAR szDevice[CCHDEVICENAME]; 5595 } MONITORINFOEXA,*LPMONITORINFOEXA; 5596 5597 typedef struct tagMONITORINFOEXW { 5598 __C89_NAMELESS struct { 5599 DWORD cbSize; 5600 RECT rcMonitor; 5601 RECT rcWork; 5602 DWORD dwFlags; 5603 }; 5604 WCHAR szDevice[CCHDEVICENAME]; 5605 } MONITORINFOEXW,*LPMONITORINFOEXW; 5606 5607 __MINGW_TYPEDEF_AW(MONITORINFOEX) 5608 __MINGW_TYPEDEF_AW(LPMONITORINFOEX) 5609 #endif 5610 5611 typedef WINBOOL (CALLBACK *MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM); 5612 5613 WINUSERAPI VOID WINAPI SetDebugErrorLevel (DWORD dwLevel); 5614 WINUSERAPI VOID WINAPI SetLastErrorEx (DWORD dwErrCode, DWORD dwType); 5615 WINUSERAPI int WINAPI InternalGetWindowText (HWND hWnd, LPWSTR pString, int cchMaxCount); 5616 WINUSERAPI WINBOOL WINAPI CancelShutdown (VOID); 5617 WINUSERAPI HMONITOR WINAPI MonitorFromPoint(POINT pt,DWORD dwFlags); 5618 WINUSERAPI HMONITOR WINAPI MonitorFromRect(LPCRECT lprc,DWORD dwFlags); 5619 WINUSERAPI HMONITOR WINAPI MonitorFromWindow(HWND hwnd,DWORD dwFlags); 5620 #ifdef WINNT 5621 WINUSERAPI WINBOOL WINAPI EndTask (HWND hWnd, WINBOOL fShutDown, WINBOOL fForce); 5622 #endif 5623 #if _WIN32_WINNT >= 0x0600 5624 WINUSERAPI WINBOOL WINAPI SoundSentry (VOID); 5625 #endif 5626 5627 #define GetMonitorInfo __MINGW_NAME_AW(GetMonitorInfo) 5628 5629 WINUSERAPI WINBOOL WINAPI GetMonitorInfoA(HMONITOR hMonitor,LPMONITORINFO lpmi); 5630 WINUSERAPI WINBOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor,LPMONITORINFO lpmi); 5631 WINUSERAPI WINBOOL WINAPI EnumDisplayMonitors(HDC hdc,LPCRECT lprcClip,MONITORENUMPROC lpfnEnum,LPARAM dwData); 5632 #endif 5633 5634 #define TKF_TOGGLEKEYSON 0x00000001 5635 #define TKF_AVAILABLE 0x00000002 5636 #define TKF_HOTKEYACTIVE 0x00000004 5637 #define TKF_CONFIRMHOTKEY 0x00000008 5638 #define TKF_HOTKEYSOUND 0x00000010 5639 #define TKF_INDICATOR 0x00000020 5640 5641 #define SLE_ERROR 0x00000001 5642 #define SLE_MINORERROR 0x00000002 5643 #define SLE_WARNING 0x00000003 5644 5645 #define MONITOR_DEFAULTTONULL 0x00000000 5646 #define MONITOR_DEFAULTTOPRIMARY 0x00000001 5647 #define MONITOR_DEFAULTTONEAREST 0x00000002 5648 5649 #define MONITORINFOF_PRIMARY 0x00000001 5650 5651 #ifndef NOWINABLE 5652 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5653 typedef VOID (CALLBACK *WINEVENTPROC)(HWINEVENTHOOK hWinEventHook,DWORD event,HWND hwnd,LONG idObject,LONG idChild,DWORD idEventThread,DWORD dwmsEventTime); 5654 5655 WINUSERAPI VOID WINAPI NotifyWinEvent(DWORD event,HWND hwnd,LONG idObject,LONG idChild); 5656 WINUSERAPI HWINEVENTHOOK WINAPI SetWinEventHook(DWORD eventMin,DWORD eventMax,HMODULE hmodWinEventProc,WINEVENTPROC pfnWinEventProc,DWORD idProcess,DWORD idThread,DWORD dwFlags); 5657 WINUSERAPI WINBOOL WINAPI IsWinEventHookInstalled(DWORD event); 5658 #endif 5659 5660 #define WINEVENT_OUTOFCONTEXT 0x0000 5661 #define WINEVENT_SKIPOWNTHREAD 0x0001 5662 #define WINEVENT_SKIPOWNPROCESS 0x0002 5663 #define WINEVENT_INCONTEXT 0x0004 5664 5665 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5666 WINUSERAPI WINBOOL WINAPI UnhookWinEvent(HWINEVENTHOOK hWinEventHook); 5667 #endif 5668 5669 #define CHILDID_SELF 0 5670 #define INDEXID_OBJECT 0 5671 #define INDEXID_CONTAINER 0 5672 5673 #define OBJID_WINDOW ((LONG)0x00000000) 5674 #define OBJID_SYSMENU ((LONG)0xFFFFFFFF) 5675 #define OBJID_TITLEBAR ((LONG)0xFFFFFFFE) 5676 #define OBJID_MENU ((LONG)0xFFFFFFFD) 5677 #define OBJID_CLIENT ((LONG)0xFFFFFFFC) 5678 #define OBJID_VSCROLL ((LONG)0xFFFFFFFB) 5679 #define OBJID_HSCROLL ((LONG)0xFFFFFFFA) 5680 #define OBJID_SIZEGRIP ((LONG)0xFFFFFFF9) 5681 #define OBJID_CARET ((LONG)0xFFFFFFF8) 5682 #define OBJID_CURSOR ((LONG)0xFFFFFFF7) 5683 #define OBJID_ALERT ((LONG)0xFFFFFFF6) 5684 #define OBJID_SOUND ((LONG)0xFFFFFFF5) 5685 #define OBJID_QUERYCLASSNAMEIDX ((LONG)0xFFFFFFF4) 5686 #define OBJID_NATIVEOM ((LONG)0xFFFFFFF0) 5687 5688 #define EVENT_MIN 0x00000001 5689 #define EVENT_MAX 0x7FFFFFFF 5690 5691 #define EVENT_SYSTEM_SOUND 0x0001 5692 #define EVENT_SYSTEM_ALERT 0x0002 5693 #define EVENT_SYSTEM_FOREGROUND 0x0003 5694 #define EVENT_SYSTEM_MENUSTART 0x0004 5695 #define EVENT_SYSTEM_MENUEND 0x0005 5696 #define EVENT_SYSTEM_MENUPOPUPSTART 0x0006 5697 #define EVENT_SYSTEM_MENUPOPUPEND 0x0007 5698 #define EVENT_SYSTEM_CAPTURESTART 0x0008 5699 #define EVENT_SYSTEM_CAPTUREEND 0x0009 5700 #define EVENT_SYSTEM_MOVESIZESTART 0x000A 5701 #define EVENT_SYSTEM_MOVESIZEEND 0x000B 5702 #define EVENT_SYSTEM_CONTEXTHELPSTART 0x000C 5703 #define EVENT_SYSTEM_CONTEXTHELPEND 0x000D 5704 #define EVENT_SYSTEM_DRAGDROPSTART 0x000E 5705 #define EVENT_SYSTEM_DRAGDROPEND 0x000F 5706 #define EVENT_SYSTEM_DIALOGSTART 0x0010 5707 #define EVENT_SYSTEM_DIALOGEND 0x0011 5708 #define EVENT_SYSTEM_SCROLLINGSTART 0x0012 5709 #define EVENT_SYSTEM_SCROLLINGEND 0x0013 5710 #define EVENT_SYSTEM_SWITCHSTART 0x0014 5711 #define EVENT_SYSTEM_SWITCHEND 0x0015 5712 #define EVENT_SYSTEM_MINIMIZESTART 0x0016 5713 #define EVENT_SYSTEM_MINIMIZEEND 0x0017 5714 #if _WIN32_WINNT >= 0x0600 5715 #define EVENT_SYSTEM_DESKTOPSWITCH 0x0020 5716 #endif 5717 #if _WIN32_WINNT >= 0x0602 5718 #define EVENT_SYSTEM_SWITCHER_APPGRABBED 0x0024 5719 #define EVENT_SYSTEM_SWITCHER_APPOVERTARGET 0x0025 5720 #define EVENT_SYSTEM_SWITCHER_APPDROPPED 0x0026 5721 #define EVENT_SYSTEM_SWITCHER_CANCELLED 0x0027 5722 #endif 5723 #if _WIN32_WINNT >= 0x0602 5724 #define EVENT_SYSTEM_IME_KEY_NOTIFICATION 0x0029 5725 #endif 5726 #if _WIN32_WINNT >= 0x0601 5727 #define EVENT_SYSTEM_END 0x00ff 5728 #define EVENT_OEM_DEFINED_START 0x0101 5729 #define EVENT_OEM_DEFINED_END 0x01ff 5730 #define EVENT_UIA_EVENTID_START 0x4e00 5731 #define EVENT_UIA_EVENTID_END 0x4eff 5732 #define EVENT_UIA_PROPID_START 0x7500 5733 #define EVENT_UIA_PROPID_END 0x75ff 5734 #endif 5735 5736 #define EVENT_CONSOLE_CARET 0x4001 5737 #define EVENT_CONSOLE_UPDATE_REGION 0x4002 5738 #define EVENT_CONSOLE_UPDATE_SIMPLE 0x4003 5739 #define EVENT_CONSOLE_UPDATE_SCROLL 0x4004 5740 #define EVENT_CONSOLE_LAYOUT 0x4005 5741 #define EVENT_CONSOLE_START_APPLICATION 0x4006 5742 #define EVENT_CONSOLE_END_APPLICATION 0x4007 5743 5744 #ifdef _WIN64 5745 #define CONSOLE_APPLICATION_16BIT 0x0000 5746 #else 5747 #define CONSOLE_APPLICATION_16BIT 0x0001 5748 #endif 5749 #define CONSOLE_CARET_SELECTION 0x0001 5750 #define CONSOLE_CARET_VISIBLE 0x0002 5751 #if _WIN32_WINNT >= 0x0601 5752 #define EVENT_CONSOLE_END 0x40ff 5753 #endif 5754 5755 #define EVENT_OBJECT_CREATE 0x8000 5756 #define EVENT_OBJECT_DESTROY 0x8001 5757 #define EVENT_OBJECT_SHOW 0x8002 5758 #define EVENT_OBJECT_HIDE 0x8003 5759 #define EVENT_OBJECT_REORDER 0x8004 5760 #define EVENT_OBJECT_FOCUS 0x8005 5761 #define EVENT_OBJECT_SELECTION 0x8006 5762 #define EVENT_OBJECT_SELECTIONADD 0x8007 5763 #define EVENT_OBJECT_SELECTIONREMOVE 0x8008 5764 #define EVENT_OBJECT_SELECTIONWITHIN 0x8009 5765 #define EVENT_OBJECT_STATECHANGE 0x800A 5766 #define EVENT_OBJECT_LOCATIONCHANGE 0x800B 5767 #define EVENT_OBJECT_NAMECHANGE 0x800C 5768 #define EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D 5769 #define EVENT_OBJECT_VALUECHANGE 0x800E 5770 #define EVENT_OBJECT_PARENTCHANGE 0x800F 5771 #define EVENT_OBJECT_HELPCHANGE 0x8010 5772 #define EVENT_OBJECT_DEFACTIONCHANGE 0x8011 5773 #define EVENT_OBJECT_ACCELERATORCHANGE 0x8012 5774 #if _WIN32_WINNT >= 0x0600 5775 #define EVENT_OBJECT_INVOKED 0x8013 5776 #define EVENT_OBJECT_TEXTSELECTIONCHANGED 0x8014 5777 #define EVENT_OBJECT_CONTENTSCROLLED 0x8015 5778 #endif 5779 #if _WIN32_WINNT >= 0x0601 5780 #define EVENT_SYSTEM_ARRANGMENTPREVIEW 0x8016 5781 #endif 5782 #if _WIN32_WINNT >= 0x0602 5783 #define EVENT_OBJECT_CLOAKED 0x8017 5784 #define EVENT_OBJECT_UNCLOAKED 0x8018 5785 #define EVENT_OBJECT_LIVEREGIONCHANGED 0x8019 5786 #define EVENT_OBJECT_HOSTEDOBJECTSINVALIDATED 0x8020 5787 #define EVENT_OBJECT_DRAGSTART 0x8021 5788 #define EVENT_OBJECT_DRAGCANCEL 0x8022 5789 #define EVENT_OBJECT_DRAGCOMPLETE 0x8023 5790 #define EVENT_OBJECT_DRAGENTER 0x8024 5791 #define EVENT_OBJECT_DRAGLEAVE 0x8025 5792 #define EVENT_OBJECT_DRAGDROPPED 0x8026 5793 #define EVENT_OBJECT_IME_SHOW 0x8027 5794 #define EVENT_OBJECT_IME_HIDE 0x8028 5795 #define EVENT_OBJECT_IME_CHANGE 0x8029 5796 #endif 5797 5798 #if _WIN32_WINNT >= 0x0601 5799 #define EVENT_OBJECT_END 0x80ff 5800 #define EVENT_AIA_START 0xa000 5801 #define EVENT_AIA_END 0xafff 5802 #endif 5803 5804 #define SOUND_SYSTEM_STARTUP 1 5805 #define SOUND_SYSTEM_SHUTDOWN 2 5806 #define SOUND_SYSTEM_BEEP 3 5807 #define SOUND_SYSTEM_ERROR 4 5808 #define SOUND_SYSTEM_QUESTION 5 5809 #define SOUND_SYSTEM_WARNING 6 5810 #define SOUND_SYSTEM_INFORMATION 7 5811 #define SOUND_SYSTEM_MAXIMIZE 8 5812 #define SOUND_SYSTEM_MINIMIZE 9 5813 #define SOUND_SYSTEM_RESTOREUP 10 5814 #define SOUND_SYSTEM_RESTOREDOWN 11 5815 #define SOUND_SYSTEM_APPSTART 12 5816 #define SOUND_SYSTEM_FAULT 13 5817 #define SOUND_SYSTEM_APPEND 14 5818 #define SOUND_SYSTEM_MENUCOMMAND 15 5819 #define SOUND_SYSTEM_MENUPOPUP 16 5820 #define CSOUND_SYSTEM 16 5821 5822 #define ALERT_SYSTEM_INFORMATIONAL 1 5823 #define ALERT_SYSTEM_WARNING 2 5824 #define ALERT_SYSTEM_ERROR 3 5825 #define ALERT_SYSTEM_QUERY 4 5826 #define ALERT_SYSTEM_CRITICAL 5 5827 #define CALERT_SYSTEM 6 5828 5829 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5830 typedef struct tagGUITHREADINFO { 5831 DWORD cbSize; 5832 DWORD flags; 5833 HWND hwndActive; 5834 HWND hwndFocus; 5835 HWND hwndCapture; 5836 HWND hwndMenuOwner; 5837 HWND hwndMoveSize; 5838 HWND hwndCaret; 5839 RECT rcCaret; 5840 } GUITHREADINFO,*PGUITHREADINFO,*LPGUITHREADINFO; 5841 #endif 5842 5843 #define GUI_CARETBLINKING 0x00000001 5844 #define GUI_INMOVESIZE 0x00000002 5845 #define GUI_INMENUMODE 0x00000004 5846 #define GUI_SYSTEMMENUMODE 0x00000008 5847 #define GUI_POPUPMENUMODE 0x00000010 5848 #ifdef _WIN64 5849 #define GUI_16BITTASK 0x00000000 5850 #else 5851 #define GUI_16BITTASK 0x00000020 5852 #endif 5853 5854 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5855 #define GetWindowModuleFileName __MINGW_NAME_AW(GetWindowModuleFileName) 5856 5857 WINUSERAPI WINBOOL WINAPI GetGUIThreadInfo(DWORD idThread,PGUITHREADINFO pgui); 5858 WINUSERAPI WINBOOL WINAPI BlockInput (WINBOOL fBlockIt); 5859 WINUSERAPI UINT WINAPI GetWindowModuleFileNameA(HWND hwnd,LPSTR pszFileName,UINT cchFileNameMax); 5860 WINUSERAPI UINT WINAPI GetWindowModuleFileNameW(HWND hwnd,LPWSTR pszFileName,UINT cchFileNameMax); 5861 #if _WIN32_WINNT >= 0x0600 5862 #define USER_DEFAULT_SCREEN_DPI 96 5863 5864 WINUSERAPI WINBOOL WINAPI SetProcessDPIAware (VOID); 5865 WINUSERAPI WINBOOL WINAPI IsProcessDPIAware (VOID); 5866 #endif 5867 #endif 5868 5869 #ifndef NO_STATE_FLAGS 5870 #define STATE_SYSTEM_UNAVAILABLE 0x00000001 5871 #define STATE_SYSTEM_SELECTED 0x00000002 5872 #define STATE_SYSTEM_FOCUSED 0x00000004 5873 #define STATE_SYSTEM_PRESSED 0x00000008 5874 #define STATE_SYSTEM_CHECKED 0x00000010 5875 #define STATE_SYSTEM_MIXED 0x00000020 5876 #define STATE_SYSTEM_INDETERMINATE STATE_SYSTEM_MIXED 5877 #define STATE_SYSTEM_READONLY 0x00000040 5878 #define STATE_SYSTEM_HOTTRACKED 0x00000080 5879 #define STATE_SYSTEM_DEFAULT 0x00000100 5880 #define STATE_SYSTEM_EXPANDED 0x00000200 5881 #define STATE_SYSTEM_COLLAPSED 0x00000400 5882 #define STATE_SYSTEM_BUSY 0x00000800 5883 #define STATE_SYSTEM_FLOATING 0x00001000 5884 #define STATE_SYSTEM_MARQUEED 0x00002000 5885 #define STATE_SYSTEM_ANIMATED 0x00004000 5886 #define STATE_SYSTEM_INVISIBLE 0x00008000 5887 #define STATE_SYSTEM_OFFSCREEN 0x00010000 5888 #define STATE_SYSTEM_SIZEABLE 0x00020000 5889 #define STATE_SYSTEM_MOVEABLE 0x00040000 5890 #define STATE_SYSTEM_SELFVOICING 0x00080000 5891 #define STATE_SYSTEM_FOCUSABLE 0x00100000 5892 #define STATE_SYSTEM_SELECTABLE 0x00200000 5893 #define STATE_SYSTEM_LINKED 0x00400000 5894 #define STATE_SYSTEM_TRAVERSED 0x00800000 5895 #define STATE_SYSTEM_MULTISELECTABLE 0x01000000 5896 #define STATE_SYSTEM_EXTSELECTABLE 0x02000000 5897 #define STATE_SYSTEM_ALERT_LOW 0x04000000 5898 #define STATE_SYSTEM_ALERT_MEDIUM 0x08000000 5899 #define STATE_SYSTEM_ALERT_HIGH 0x10000000 5900 #define STATE_SYSTEM_PROTECTED 0x20000000 5901 #define STATE_SYSTEM_VALID 0x3FFFFFFF 5902 #endif 5903 5904 #define CCHILDREN_TITLEBAR 5 5905 #define CCHILDREN_SCROLLBAR 5 5906 5907 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5908 typedef struct tagCURSORINFO { 5909 DWORD cbSize; 5910 DWORD flags; 5911 HCURSOR hCursor; 5912 POINT ptScreenPos; 5913 } CURSORINFO,*PCURSORINFO,*LPCURSORINFO; 5914 5915 #define CURSOR_SHOWING 0x00000001 5916 #if WINVER >= 0x0602 5917 #define CURSOR_SUPPRESSED 0x00000002 5918 #endif 5919 5920 WINUSERAPI WINBOOL WINAPI GetCursorInfo(PCURSORINFO pci); 5921 5922 typedef struct tagWINDOWINFO { 5923 DWORD cbSize; 5924 RECT rcWindow; 5925 RECT rcClient; 5926 DWORD dwStyle; 5927 DWORD dwExStyle; 5928 DWORD dwWindowStatus; 5929 UINT cxWindowBorders; 5930 UINT cyWindowBorders; 5931 ATOM atomWindowType; 5932 WORD wCreatorVersion; 5933 } WINDOWINFO,*PWINDOWINFO,*LPWINDOWINFO; 5934 5935 #define WS_ACTIVECAPTION 0x0001 5936 5937 WINUSERAPI WINBOOL WINAPI GetWindowInfo(HWND hwnd,PWINDOWINFO pwi); 5938 5939 typedef struct tagTITLEBARINFO { 5940 DWORD cbSize; 5941 RECT rcTitleBar; 5942 DWORD rgstate[CCHILDREN_TITLEBAR + 1]; 5943 } TITLEBARINFO,*PTITLEBARINFO,*LPTITLEBARINFO; 5944 5945 WINUSERAPI WINBOOL WINAPI GetTitleBarInfo(HWND hwnd,PTITLEBARINFO pti); 5946 5947 #if WINVER >= 0x0600 5948 typedef struct tagTITLEBARINFOEX { 5949 DWORD cbSize; 5950 RECT rcTitleBar; 5951 DWORD rgstate[CCHILDREN_TITLEBAR + 1]; 5952 RECT rgrect[CCHILDREN_TITLEBAR + 1]; 5953 } TITLEBARINFOEX,*PTITLEBARINFOEX,*LPTITLEBARINFOEX; 5954 #endif 5955 5956 typedef struct tagMENUBARINFO { 5957 DWORD cbSize; 5958 RECT rcBar; 5959 HMENU hMenu; 5960 HWND hwndMenu; 5961 WINBOOL fBarFocused:1; 5962 WINBOOL fFocused:1; 5963 } MENUBARINFO,*PMENUBARINFO,*LPMENUBARINFO; 5964 5965 WINUSERAPI WINBOOL WINAPI GetMenuBarInfo(HWND hwnd,LONG idObject,LONG idItem,PMENUBARINFO pmbi); 5966 5967 typedef struct tagSCROLLBARINFO { 5968 DWORD cbSize; 5969 RECT rcScrollBar; 5970 int dxyLineButton; 5971 int xyThumbTop; 5972 int xyThumbBottom; 5973 int reserved; 5974 DWORD rgstate[CCHILDREN_SCROLLBAR + 1]; 5975 } SCROLLBARINFO,*PSCROLLBARINFO,*LPSCROLLBARINFO; 5976 5977 WINUSERAPI WINBOOL WINAPI GetScrollBarInfo(HWND hwnd,LONG idObject,PSCROLLBARINFO psbi); 5978 5979 typedef struct tagCOMBOBOXINFO { 5980 DWORD cbSize; 5981 RECT rcItem; 5982 RECT rcButton; 5983 DWORD stateButton; 5984 HWND hwndCombo; 5985 HWND hwndItem; 5986 HWND hwndList; 5987 } COMBOBOXINFO,*PCOMBOBOXINFO,*LPCOMBOBOXINFO; 5988 5989 WINUSERAPI WINBOOL WINAPI GetComboBoxInfo(HWND hwndCombo,PCOMBOBOXINFO pcbi); 5990 #endif 5991 5992 #define GA_PARENT 1 5993 #define GA_ROOT 2 5994 #define GA_ROOTOWNER 3 5995 5996 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 5997 #define RealGetWindowClass __MINGW_NAME_AW(RealGetWindowClass) 5998 5999 WINUSERAPI HWND WINAPI GetAncestor(HWND hwnd,UINT gaFlags); 6000 WINUSERAPI HWND WINAPI RealChildWindowFromPoint(HWND hwndParent,POINT ptParentClientCoords); 6001 WINUSERAPI UINT WINAPI RealGetWindowClassA(HWND hwnd,LPSTR ptszClassName,UINT cchClassNameMax); 6002 WINUSERAPI UINT WINAPI RealGetWindowClassW(HWND hwnd,LPWSTR ptszClassName,UINT cchClassNameMax); 6003 6004 typedef struct tagALTTABINFO { 6005 DWORD cbSize; 6006 int cItems; 6007 int cColumns; 6008 int cRows; 6009 int iColFocus; 6010 int iRowFocus; 6011 int cxItem; 6012 int cyItem; 6013 POINT ptStart; 6014 } ALTTABINFO,*PALTTABINFO,*LPALTTABINFO; 6015 6016 #define GetAltTabInfo __MINGW_NAME_AW(GetAltTabInfo) 6017 6018 WINUSERAPI WINBOOL WINAPI GetAltTabInfoA(HWND hwnd,int iItem,PALTTABINFO pati,LPSTR pszItemText,UINT cchItemText); 6019 WINUSERAPI WINBOOL WINAPI GetAltTabInfoW(HWND hwnd,int iItem,PALTTABINFO pati,LPWSTR pszItemText,UINT cchItemText); 6020 WINUSERAPI DWORD WINAPI GetListBoxInfo(HWND hwnd); 6021 #endif 6022 #endif 6023 6024 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6025 WINUSERAPI WINBOOL WINAPI LockWorkStation(VOID); 6026 WINUSERAPI WINBOOL WINAPI UserHandleGrantAccess(HANDLE hUserHandle,HANDLE hJob,WINBOOL bGrant); 6027 6028 DECLARE_HANDLE(HRAWINPUT); 6029 #endif 6030 6031 #define GET_RAWINPUT_CODE_WPARAM(wParam) ((wParam) & 0xff) 6032 6033 #define RIM_INPUT 0 6034 #define RIM_INPUTSINK 1 6035 6036 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6037 typedef struct tagRAWINPUTHEADER { 6038 DWORD dwType; 6039 DWORD dwSize; 6040 HANDLE hDevice; 6041 WPARAM wParam; 6042 } RAWINPUTHEADER,*PRAWINPUTHEADER,*LPRAWINPUTHEADER; 6043 #endif 6044 6045 #define RIM_TYPEMOUSE 0 6046 #define RIM_TYPEKEYBOARD 1 6047 #define RIM_TYPEHID 2 6048 6049 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6050 typedef struct tagRAWMOUSE { 6051 USHORT usFlags; 6052 __C89_NAMELESS union { 6053 ULONG ulButtons; 6054 __C89_NAMELESS struct { 6055 USHORT usButtonFlags; 6056 USHORT usButtonData; 6057 }; 6058 }; 6059 ULONG ulRawButtons; 6060 LONG lLastX; 6061 LONG lLastY; 6062 ULONG ulExtraInformation; 6063 } RAWMOUSE,*PRAWMOUSE,*LPRAWMOUSE; 6064 #endif 6065 6066 #define RI_MOUSE_LEFT_BUTTON_DOWN 0x0001 6067 #define RI_MOUSE_LEFT_BUTTON_UP 0x0002 6068 #define RI_MOUSE_RIGHT_BUTTON_DOWN 0x0004 6069 #define RI_MOUSE_RIGHT_BUTTON_UP 0x0008 6070 #define RI_MOUSE_MIDDLE_BUTTON_DOWN 0x0010 6071 #define RI_MOUSE_MIDDLE_BUTTON_UP 0x0020 6072 #define RI_MOUSE_BUTTON_4_DOWN 0x0040 6073 #define RI_MOUSE_BUTTON_4_UP 0x0080 6074 #define RI_MOUSE_BUTTON_5_DOWN 0x0100 6075 #define RI_MOUSE_BUTTON_5_UP 0x0200 6076 #define RI_MOUSE_WHEEL 0x0400 6077 6078 #define RI_MOUSE_BUTTON_1_DOWN RI_MOUSE_LEFT_BUTTON_DOWN 6079 #define RI_MOUSE_BUTTON_1_UP RI_MOUSE_LEFT_BUTTON_UP 6080 #define RI_MOUSE_BUTTON_2_DOWN RI_MOUSE_RIGHT_BUTTON_DOWN 6081 #define RI_MOUSE_BUTTON_2_UP RI_MOUSE_RIGHT_BUTTON_UP 6082 #define RI_MOUSE_BUTTON_3_DOWN RI_MOUSE_MIDDLE_BUTTON_DOWN 6083 #define RI_MOUSE_BUTTON_3_UP RI_MOUSE_MIDDLE_BUTTON_UP 6084 6085 #define MOUSE_MOVE_RELATIVE 0 6086 #define MOUSE_MOVE_ABSOLUTE 1 6087 #define MOUSE_VIRTUAL_DESKTOP 0x02 6088 #define MOUSE_ATTRIBUTES_CHANGED 0x04 6089 #if WINVER >= 0x0600 6090 #define MOUSE_MOVE_NOCOALESCE 0x08 6091 #endif 6092 6093 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6094 typedef struct tagRAWKEYBOARD { 6095 USHORT MakeCode; 6096 USHORT Flags; 6097 USHORT Reserved; 6098 USHORT VKey; 6099 UINT Message; 6100 ULONG ExtraInformation; 6101 } RAWKEYBOARD,*PRAWKEYBOARD,*LPRAWKEYBOARD; 6102 #endif 6103 6104 #define KEYBOARD_OVERRUN_MAKE_CODE 0xFF 6105 6106 #define RI_KEY_MAKE 0 6107 #define RI_KEY_BREAK 1 6108 #define RI_KEY_E0 2 6109 #define RI_KEY_E1 4 6110 #define RI_KEY_TERMSRV_SET_LED 8 6111 #define RI_KEY_TERMSRV_SHADOW 0x10 6112 6113 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6114 typedef struct tagRAWHID { 6115 DWORD dwSizeHid; 6116 DWORD dwCount; 6117 BYTE bRawData[1]; 6118 } RAWHID,*PRAWHID,*LPRAWHID; 6119 6120 typedef struct tagRAWINPUT { 6121 RAWINPUTHEADER header; 6122 union { 6123 RAWMOUSE mouse; 6124 RAWKEYBOARD keyboard; 6125 RAWHID hid; 6126 } data; 6127 } RAWINPUT,*PRAWINPUT,*LPRAWINPUT; 6128 #endif 6129 6130 #ifdef _WIN64 6131 #define RAWINPUT_ALIGN(x) (((x) + sizeof(QWORD) - 1) & ~(sizeof(QWORD) - 1)) 6132 #else 6133 #define RAWINPUT_ALIGN(x) (((x) + sizeof(DWORD) - 1) & ~(sizeof(DWORD) - 1)) 6134 #endif 6135 6136 #define NEXTRAWINPUTBLOCK(ptr) ((PRAWINPUT)RAWINPUT_ALIGN((ULONG_PTR)((PBYTE)(ptr) + (ptr)->header.dwSize))) 6137 6138 #define RID_INPUT 0x10000003 6139 #define RID_HEADER 0x10000005 6140 6141 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6142 WINUSERAPI UINT WINAPI GetRawInputData(HRAWINPUT hRawInput,UINT uiCommand,LPVOID pData,PUINT pcbSize,UINT cbSizeHeader); 6143 #endif 6144 6145 #define RIDI_PREPARSEDDATA 0x20000005 6146 #define RIDI_DEVICENAME 0x20000007 6147 #define RIDI_DEVICEINFO 0x2000000b 6148 6149 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6150 typedef struct tagRID_DEVICE_INFO_MOUSE { 6151 DWORD dwId; 6152 DWORD dwNumberOfButtons; 6153 DWORD dwSampleRate; 6154 WINBOOL fHasHorizontalWheel; 6155 } RID_DEVICE_INFO_MOUSE,*PRID_DEVICE_INFO_MOUSE; 6156 6157 typedef struct tagRID_DEVICE_INFO_KEYBOARD { 6158 DWORD dwType; 6159 DWORD dwSubType; 6160 DWORD dwKeyboardMode; 6161 DWORD dwNumberOfFunctionKeys; 6162 DWORD dwNumberOfIndicators; 6163 DWORD dwNumberOfKeysTotal; 6164 } RID_DEVICE_INFO_KEYBOARD,*PRID_DEVICE_INFO_KEYBOARD; 6165 6166 typedef struct tagRID_DEVICE_INFO_HID { 6167 DWORD dwVendorId; 6168 DWORD dwProductId; 6169 DWORD dwVersionNumber; 6170 USHORT usUsagePage; 6171 USHORT usUsage; 6172 } RID_DEVICE_INFO_HID,*PRID_DEVICE_INFO_HID; 6173 6174 typedef struct tagRID_DEVICE_INFO { 6175 DWORD cbSize; 6176 DWORD dwType; 6177 __C89_NAMELESS union { 6178 RID_DEVICE_INFO_MOUSE mouse; 6179 RID_DEVICE_INFO_KEYBOARD keyboard; 6180 RID_DEVICE_INFO_HID hid; 6181 } DUMMYUNIONNAME; 6182 } RID_DEVICE_INFO,*PRID_DEVICE_INFO,*LPRID_DEVICE_INFO; 6183 6184 #define GetRawInputDeviceInfo __MINGW_NAME_AW(GetRawInputDeviceInfo) 6185 6186 WINUSERAPI UINT WINAPI GetRawInputDeviceInfoA(HANDLE hDevice,UINT uiCommand,LPVOID pData,PUINT pcbSize); 6187 WINUSERAPI UINT WINAPI GetRawInputDeviceInfoW(HANDLE hDevice,UINT uiCommand,LPVOID pData,PUINT pcbSize); 6188 WINUSERAPI UINT WINAPI GetRawInputBuffer(PRAWINPUT pData,PUINT pcbSize,UINT cbSizeHeader); 6189 6190 typedef struct tagRAWINPUTDEVICE { 6191 USHORT usUsagePage; 6192 USHORT usUsage; 6193 DWORD dwFlags; 6194 HWND hwndTarget; 6195 } RAWINPUTDEVICE,*PRAWINPUTDEVICE,*LPRAWINPUTDEVICE; 6196 6197 typedef CONST RAWINPUTDEVICE *PCRAWINPUTDEVICE; 6198 #endif 6199 6200 #define RIDEV_REMOVE 0x00000001 6201 #define RIDEV_EXCLUDE 0x00000010 6202 #define RIDEV_PAGEONLY 0x00000020 6203 #define RIDEV_NOLEGACY 0x00000030 6204 #define RIDEV_INPUTSINK 0x00000100 6205 #define RIDEV_CAPTUREMOUSE 0x00000200 6206 #define RIDEV_NOHOTKEYS 0x00000200 6207 #define RIDEV_APPKEYS 0x00000400 6208 #define RIDEV_EXINPUTSINK 0x00001000 6209 #define RIDEV_DEVNOTIFY 0x00002000 6210 6211 #define RIDEV_EXMODEMASK 0x000000F0 6212 #define RIDEV_EXMODE(mode) ((mode) & RIDEV_EXMODEMASK) 6213 6214 #define GIDC_ARRIVAL 1 6215 #define GIDC_REMOVAL 2 6216 6217 #if _WIN32_WINNT >= 0x0601 6218 #define GET_DEVICE_CHANGE_WPARAM(wParam) (LOWORD (wParam)) 6219 #else 6220 #define GET_DEVICE_CHANGE_LPARAM(lParam) (LOWORD (lParam)) 6221 #endif 6222 6223 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6224 typedef struct tagRAWINPUTDEVICELIST { 6225 HANDLE hDevice; 6226 DWORD dwType; 6227 } RAWINPUTDEVICELIST,*PRAWINPUTDEVICELIST; 6228 6229 WINUSERAPI WINBOOL WINAPI RegisterRawInputDevices (PCRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, UINT cbSize); 6230 WINUSERAPI UINT WINAPI GetRegisteredRawInputDevices (PRAWINPUTDEVICE pRawInputDevices, PUINT puiNumDevices, UINT cbSize); 6231 WINUSERAPI UINT WINAPI GetRawInputDeviceList (PRAWINPUTDEVICELIST pRawInputDeviceList, PUINT puiNumDevices, UINT cbSize); 6232 WINUSERAPI LRESULT WINAPI DefRawInputProc (PRAWINPUT *paRawInput, INT nInput, UINT cbSizeHeader); 6233 #endif 6234 6235 #if WINVER >= 0x0602 6236 #define POINTER_DEVICE_PRODUCT_STRING_MAX 520 6237 #define PDC_ARRIVAL 0x001 6238 #define PDC_REMOVAL 0x002 6239 #define PDC_ORIENTATION_0 0x004 6240 #define PDC_ORIENTATION_90 0x008 6241 #define PDC_ORIENTATION_180 0x010 6242 #define PDC_ORIENTATION_270 0x020 6243 #define PDC_MODE_DEFAULT 0x040 6244 #define PDC_MODE_CENTERED 0x080 6245 #define PDC_MAPPING_CHANGE 0x100 6246 #define PDC_RESOLUTION 0x200 6247 #define PDC_ORIGIN 0x400 6248 #define PDC_MODE_ASPECTRATIOPRESERVED 0x800 6249 6250 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6251 typedef enum tagPOINTER_DEVICE_TYPE { 6252 POINTER_DEVICE_TYPE_INTEGRATED_PEN = 0x00000001, 6253 POINTER_DEVICE_TYPE_EXTERNAL_PEN = 0x00000002, 6254 POINTER_DEVICE_TYPE_TOUCH = 0x00000003, 6255 POINTER_DEVICE_TYPE_MAX = 0xffffffff 6256 } POINTER_DEVICE_TYPE; 6257 6258 typedef struct tagPOINTER_DEVICE_INFO { 6259 DWORD displayOrientation; 6260 HANDLE device; 6261 POINTER_DEVICE_TYPE pointerDeviceType; 6262 HMONITOR monitor; 6263 ULONG startingCursorId; 6264 USHORT maxActiveContacts; 6265 WCHAR productString[POINTER_DEVICE_PRODUCT_STRING_MAX]; 6266 } POINTER_DEVICE_INFO; 6267 6268 typedef struct tagPOINTER_DEVICE_PROPERTY { 6269 INT32 logicalMin; 6270 INT32 logicalMax; 6271 INT32 physicalMin; 6272 INT32 physicalMax; 6273 UINT32 unit; 6274 UINT32 unitExponent; 6275 USHORT usagePageId; 6276 USHORT usageId; 6277 } POINTER_DEVICE_PROPERTY; 6278 6279 typedef enum tagPOINTER_DEVICE_CURSOR_TYPE { 6280 POINTER_DEVICE_CURSOR_TYPE_UNKNOWN = 0x00000000, 6281 POINTER_DEVICE_CURSOR_TYPE_TIP = 0x00000001, 6282 POINTER_DEVICE_CURSOR_TYPE_ERASER = 0x00000002, 6283 POINTER_DEVICE_CURSOR_TYPE_MAX = 0xffffffff 6284 } POINTER_DEVICE_CURSOR_TYPE; 6285 6286 typedef struct tagPOINTER_DEVICE_CURSOR_INFO { 6287 UINT32 cursorId; 6288 POINTER_DEVICE_CURSOR_TYPE cursor; 6289 } POINTER_DEVICE_CURSOR_INFO; 6290 6291 WINUSERAPI WINBOOL WINAPI GetPointerDevices (UINT32 *deviceCount, POINTER_DEVICE_INFO *pointerDevices); 6292 WINUSERAPI WINBOOL WINAPI GetPointerDevice (HANDLE device, POINTER_DEVICE_INFO *pointerDevice); 6293 WINUSERAPI WINBOOL WINAPI GetPointerDeviceProperties (HANDLE device, UINT32 *propertyCount, POINTER_DEVICE_PROPERTY *pointerProperties); 6294 WINUSERAPI WINBOOL WINAPI RegisterPointerDeviceNotifications (HWND window, WINBOOL notifyRange); 6295 WINUSERAPI WINBOOL WINAPI GetPointerDeviceRects (HANDLE device, RECT *pointerDeviceRect, RECT *displayRect); 6296 WINUSERAPI WINBOOL WINAPI GetPointerDeviceCursors (HANDLE device, UINT32 *cursorCount, POINTER_DEVICE_CURSOR_INFO *deviceCursors); 6297 WINUSERAPI WINBOOL WINAPI GetRawPointerDeviceData (UINT32 pointerId, UINT32 historyCount, UINT32 propertiesCount, POINTER_DEVICE_PROPERTY *pProperties, LONG *pValues); 6298 #endif 6299 #endif 6300 6301 #if WINVER >= 0x0600 6302 #define MSGFLT_ADD 1 6303 #define MSGFLT_REMOVE 2 6304 6305 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6306 WINUSERAPI WINBOOL WINAPI ChangeWindowMessageFilter (UINT message, DWORD dwFlag); 6307 #endif 6308 #endif 6309 #if WINVER >= 0x0601 6310 #define MSGFLTINFO_NONE (0) 6311 #define MSGFLTINFO_ALREADYALLOWED_FORWND (1) 6312 #define MSGFLTINFO_ALREADYDISALLOWED_FORWND (2) 6313 #define MSGFLTINFO_ALLOWED_HIGHER (3) 6314 6315 #define MSGFLT_RESET (0) 6316 #define MSGFLT_ALLOW (1) 6317 #define MSGFLT_DISALLOW (2) 6318 6319 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6320 typedef struct tagCHANGEFILTERSTRUCT { 6321 DWORD cbSize; 6322 DWORD ExtStatus; 6323 } CHANGEFILTERSTRUCT,*PCHANGEFILTERSTRUCT; 6324 6325 WINUSERAPI WINBOOL WINAPI ChangeWindowMessageFilterEx (HWND hwnd, UINT message, DWORD action, PCHANGEFILTERSTRUCT pChangeFilterStruct); 6326 #endif 6327 #endif 6328 6329 #if WINVER >= 0x0601 6330 #define GF_BEGIN 0x00000001 6331 #define GF_INERTIA 0x00000002 6332 #define GF_END 0x00000004 6333 6334 #define GID_BEGIN 1 6335 #define GID_END 2 6336 #define GID_ZOOM 3 6337 #define GID_PAN 4 6338 #define GID_ROTATE 5 6339 #define GID_TWOFINGERTAP 6 6340 #define GID_PRESSANDTAP 7 6341 #define GID_ROLLOVER GID_PRESSANDTAP 6342 6343 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6344 DECLARE_HANDLE (HGESTUREINFO); 6345 6346 typedef struct tagGESTUREINFO { 6347 UINT cbSize; 6348 DWORD dwFlags; 6349 DWORD dwID; 6350 HWND hwndTarget; 6351 POINTS ptsLocation; 6352 DWORD dwInstanceID; 6353 DWORD dwSequenceID; 6354 ULONGLONG ullArguments; 6355 UINT cbExtraArgs; 6356 } GESTUREINFO,*PGESTUREINFO; 6357 6358 typedef GESTUREINFO const *PCGESTUREINFO; 6359 6360 typedef struct tagGESTURENOTIFYSTRUCT { 6361 UINT cbSize; 6362 DWORD dwFlags; 6363 HWND hwndTarget; 6364 POINTS ptsLocation; 6365 DWORD dwInstanceID; 6366 } GESTURENOTIFYSTRUCT,*PGESTURENOTIFYSTRUCT; 6367 6368 #define GID_ROTATE_ANGLE_TO_ARGUMENT(_arg_) ((USHORT) ((((_arg_) + 2.0 *3.14159265) / (4.0 *3.14159265)) *65535.0)) 6369 #define GID_ROTATE_ANGLE_FROM_ARGUMENT(_arg_) ((((double) (_arg_) / 65535.0) *4.0 *3.14159265) - 2.0 *3.14159265) 6370 6371 WINUSERAPI WINBOOL WINAPI GetGestureInfo (HGESTUREINFO hGestureInfo, PGESTUREINFO pGestureInfo); 6372 WINUSERAPI WINBOOL WINAPI GetGestureExtraArgs (HGESTUREINFO hGestureInfo, UINT cbExtraArgs, PBYTE pExtraArgs); 6373 WINUSERAPI WINBOOL WINAPI CloseGestureInfoHandle (HGESTUREINFO hGestureInfo); 6374 6375 typedef struct tagGESTURECONFIG { 6376 DWORD dwID; 6377 DWORD dwWant; 6378 DWORD dwBlock; 6379 } GESTURECONFIG,*PGESTURECONFIG; 6380 #endif 6381 6382 #define GC_ALLGESTURES 0x00000001 6383 #define GC_ZOOM 0x00000001 6384 6385 #define GC_PAN 0x00000001 6386 #define GC_PAN_WITH_SINGLE_FINGER_VERTICALLY 0x00000002 6387 #define GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY 0x00000004 6388 #define GC_PAN_WITH_GUTTER 0x00000008 6389 #define GC_PAN_WITH_INERTIA 0x00000010 6390 6391 #define GC_ROTATE 0x00000001 6392 #define GC_TWOFINGERTAP 0x00000001 6393 #define GC_PRESSANDTAP 0x00000001 6394 #define GC_ROLLOVER GC_PRESSANDTAP 6395 6396 #define GESTURECONFIGMAXCOUNT 256 6397 6398 #define GCF_INCLUDE_ANCESTORS 0x00000001 6399 6400 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6401 WINUSERAPI WINBOOL WINAPI SetGestureConfig (HWND hwnd, DWORD dwReserved, UINT cIDs, PGESTURECONFIG pGestureConfig, UINT cbSize); 6402 WINUSERAPI WINBOOL WINAPI GetGestureConfig (HWND hwnd, DWORD dwReserved, DWORD dwFlags, PUINT pcIDs, PGESTURECONFIG pGestureConfig, UINT cbSize); 6403 #endif 6404 #endif 6405 6406 #if WINVER >= 0x0601 6407 #define NID_INTEGRATED_TOUCH 0x00000001 6408 #define NID_EXTERNAL_TOUCH 0x00000002 6409 #define NID_INTEGRATED_PEN 0x00000004 6410 #define NID_EXTERNAL_PEN 0x00000008 6411 #define NID_MULTI_INPUT 0x00000040 6412 #define NID_READY 0x00000080 6413 #endif 6414 6415 #define MAX_STR_BLOCKREASON 256 6416 6417 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6418 WINUSERAPI WINBOOL WINAPI ShutdownBlockReasonCreate (HWND hWnd, LPCWSTR pwszReason); 6419 WINUSERAPI WINBOOL WINAPI ShutdownBlockReasonQuery (HWND hWnd, LPWSTR pwszBuff, DWORD *pcchBuff); 6420 WINUSERAPI WINBOOL WINAPI ShutdownBlockReasonDestroy (HWND hWnd); 6421 6422 #if WINVER >= 0x0601 6423 typedef enum tagINPUT_MESSAGE_DEVICE_TYPE { 6424 IMDT_UNAVAILABLE = 0x00000000, 6425 IMDT_KEYBOARD = 0x00000001, 6426 IMDT_MOUSE = 0x00000002, 6427 IMDT_TOUCH = 0x00000004, 6428 IMDT_PEN = 0x00000008, 6429 } INPUT_MESSAGE_DEVICE_TYPE; 6430 6431 typedef enum tagINPUT_MESSAGE_ORIGIN_ID { 6432 IMO_UNAVAILABLE = 0x00000000, 6433 IMO_HARDWARE = 0x00000001, 6434 IMO_INJECTED = 0x00000002, 6435 IMO_SYSTEM = 0x00000004, 6436 } INPUT_MESSAGE_ORIGIN_ID; 6437 6438 typedef struct tagINPUT_MESSAGE_SOURCE { 6439 INPUT_MESSAGE_DEVICE_TYPE deviceType; 6440 INPUT_MESSAGE_ORIGIN_ID originId; 6441 } INPUT_MESSAGE_SOURCE; 6442 6443 WINUSERAPI WINBOOL WINAPI GetCurrentInputMessageSource (INPUT_MESSAGE_SOURCE *inputMessageSource); 6444 WINUSERAPI WINBOOL WINAPI GetCIMSSM (INPUT_MESSAGE_SOURCE *inputMessageSource); 6445 #endif 6446 #endif 6447 6448 #if WINVER >= 0x0601 6449 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 6450 typedef enum tagAR_STATE { 6451 AR_ENABLED = 0x0, 6452 AR_DISABLED = 0x1, 6453 AR_SUPPRESSED = 0x2, 6454 AR_REMOTESESSION = 0x4, 6455 AR_MULTIMON = 0x8, 6456 AR_NOSENSOR = 0x10, 6457 AR_NOT_SUPPORTED = 0x20, 6458 AR_DOCKED = 0x40, 6459 AR_LAPTOP = 0x80 6460 } AR_STATE,*PAR_STATE; 6461 #endif 6462 6463 #ifndef __WIDL__ 6464 DEFINE_ENUM_FLAG_OPERATORS (AR_STATE); 6465 #endif 6466 6467 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6468 typedef enum ORIENTATION_PREFERENCE { 6469 ORIENTATION_PREFERENCE_NONE = 0x0, 6470 ORIENTATION_PREFERENCE_LANDSCAPE = 0x1, 6471 ORIENTATION_PREFERENCE_PORTRAIT = 0x2, 6472 ORIENTATION_PREFERENCE_LANDSCAPE_FLIPPED = 0x4, 6473 ORIENTATION_PREFERENCE_PORTRAIT_FLIPPED = 0x8 6474 } ORIENTATION_PREFERENCE; 6475 6476 #ifndef __WIDL__ 6477 DEFINE_ENUM_FLAG_OPERATORS (ORIENTATION_PREFERENCE); 6478 #endif 6479 6480 WINUSERAPI WINBOOL WINAPI GetAutoRotationState (PAR_STATE pState); 6481 WINUSERAPI WINBOOL WINAPI GetDisplayAutoRotationPreferences (ORIENTATION_PREFERENCE *pOrientation); 6482 WINUSERAPI WINBOOL WINAPI GetDisplayAutoRotationPreferencesByProcessId (DWORD dwProcessId, ORIENTATION_PREFERENCE *pOrientation, WINBOOL *fRotateScreen); 6483 WINUSERAPI WINBOOL WINAPI SetDisplayAutoRotationPreferences (ORIENTATION_PREFERENCE orientation); 6484 #endif 6485 #endif 6486 6487 #if WINVER >= 0x0601 6488 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6489 WINUSERAPI WINBOOL WINAPI IsImmersiveProcess (HANDLE hProcess); 6490 WINUSERAPI WINBOOL WINAPI SetProcessRestrictionExemption (WINBOOL fEnableExemption); 6491 #endif 6492 #endif 6493 6494 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 6495 #if (_WIN32_WINNT >= 0x0602) 6496 /* Does this belongs here? */ 6497 typedef struct tagINPUT_TRANSFORM { 6498 __C89_NAMELESS union { 6499 __C89_NAMELESS struct { 6500 float _11; 6501 float _12; 6502 float _13; 6503 float _14; 6504 float _21; 6505 float _22; 6506 float _23; 6507 float _24; 6508 float _31; 6509 float _32; 6510 float _33; 6511 float _34; 6512 float _41; 6513 float _42; 6514 float _43; 6515 float _44; 6516 }; 6517 float m[4][4]; 6518 }; 6519 } INPUT_TRANSFORM; 6520 6521 /* Do these functions belong here? */ 6522 WINUSERAPI WINBOOL WINAPI GetPointerInputTransform(UINT32 pointerId, UINT32 historyCount, UINT32 *inputTransform); 6523 WINUSERAPI WINBOOL WINAPI IsMousePointerEnabled(void); 6524 #endif /*(_WIN32_WINNT >= 0x0602)*/ 6525 #endif 6526 6527 #ifdef __cplusplus 6528 } 6529 #endif 6530 #endif 6531