1 // Copyright © 2015-2017 winapi-rs developers
2 // Licensed under the Apache License, Version 2.0
3 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
4 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
5 // All files in the project carrying such notice may not be copied, modified, or distributed
6 // except according to those terms.
7 //! USER procedure declarations, constant definitions and macros
8 use ctypes::{c_int, c_long, c_short, c_uint};
9 use shared::basetsd::{
10     DWORD_PTR, INT32, INT_PTR, PDWORD_PTR, UINT16, UINT32, UINT64, UINT_PTR, ULONG_PTR,
11 };
12 #[cfg(target_arch = "x86_64")]
13 use shared::basetsd::LONG_PTR;
14 use shared::guiddef::{GUID, LPCGUID};
15 use shared::minwindef::{
16     ATOM, BOOL, BYTE, DWORD, HINSTANCE, HIWORD, HKL, HMODULE, HRGN, HWINSTA, INT, LOWORD, LPARAM,
17     LPBYTE, LPDWORD, LPINT, LPVOID, LPWORD, LRESULT, PBYTE, PUINT, PULONG, TRUE, UCHAR, UINT, ULONG,
18     USHORT, WORD, WPARAM,
19 };
20 use shared::windef::{
21     COLORREF, HACCEL, HBITMAP, HBRUSH, HCURSOR, HDC, HDESK, HHOOK, HICON, HMENU, HMONITOR,
22     HWINEVENTHOOK, HWND, LPCRECT, LPPOINT, LPRECT, POINT, RECT,
23 };
24 use um::minwinbase::LPSECURITY_ATTRIBUTES;
25 use um::wingdi::{
26     BLENDFUNCTION, DEVMODEA, DEVMODEW, LOGFONTA, LOGFONTW, PDISPLAY_DEVICEA, PDISPLAY_DEVICEW
27 };
28 use um::winnt::{
29     ACCESS_MASK, BOOLEAN, CHAR, HANDLE, LONG, LPCSTR, LPCWSTR, LPSTR, LPWSTR, LUID,
30     PSECURITY_DESCRIPTOR, PSECURITY_INFORMATION, PVOID, SHORT, VOID, WCHAR,
31 };
32 use vc::limits::UINT_MAX;
33 use vc::vadefs::va_list;
34 pub type HDWP = HANDLE;
35 pub type MENUTEMPLATEA = VOID;
36 pub type MENUTEMPLATEW = VOID;
37 pub type LPMENUTEMPLATEA = PVOID;
38 pub type LPMENUTEMPLATEW = PVOID;
39 FN!{stdcall WNDPROC(
40     HWND,
41     UINT,
42     WPARAM,
43     LPARAM,
44 ) -> LRESULT}
45 FN!{stdcall DLGPROC(
46     HWND,
47     UINT,
48     WPARAM,
49     LPARAM,
50 ) -> INT_PTR}
51 FN!{stdcall TIMERPROC(
52     HWND,
53     UINT,
54     UINT_PTR,
55     DWORD,
56 ) -> ()}
57 FN!{stdcall GRAYSTRINGPROC(
58     HDC,
59     LPARAM,
60     c_int,
61 ) -> BOOL}
62 FN!{stdcall WNDENUMPROC(
63     HWND,
64     LPARAM,
65 ) -> BOOL}
66 FN!{stdcall HOOKPROC(
67     code: c_int,
68     wParam: WPARAM,
69     lParam: LPARAM,
70 ) -> LRESULT}
71 FN!{stdcall SENDASYNCPROC(
72     HWND,
73     UINT,
74     ULONG_PTR,
75     LRESULT,
76 ) -> ()}
77 FN!{stdcall PROPENUMPROCA(
78     HWND,
79     LPCSTR,
80     HANDLE,
81 ) -> BOOL}
82 FN!{stdcall PROPENUMPROCW(
83     HWND,
84     LPCWSTR,
85     HANDLE,
86 ) -> BOOL}
87 FN!{stdcall PROPENUMPROCEXA(
88     HWND,
89     LPSTR,
90     HANDLE,
91     ULONG_PTR,
92 ) -> BOOL}
93 FN!{stdcall PROPENUMPROCEXW(
94     HWND,
95     LPWSTR,
96     HANDLE,
97     ULONG_PTR,
98 ) -> BOOL}
99 FN!{stdcall EDITWORDBREAKPROCA(
100     lpch: LPSTR,
101     ichCurrent: c_int,
102     cch: c_int,
103     code: c_int,
104 ) -> c_int}
105 FN!{stdcall EDITWORDBREAKPROCW(
106     lpch: LPWSTR,
107     ichCurrent: c_int,
108     cch: c_int,
109     code: c_int,
110 ) -> c_int}
111 FN!{stdcall DRAWSTATEPROC(
112     hdc: HDC,
113     lData: LPARAM,
114     wData: WPARAM,
115     cx: c_int,
116     cy: c_int,
117 ) -> BOOL}
118 FN!{stdcall NAMEENUMPROCA(
119     LPSTR,
120     LPARAM,
121 ) -> BOOL}
122 FN!{stdcall NAMEENUMPROCW(
123     LPWSTR,
124     LPARAM,
125 ) -> BOOL}
126 pub type WINSTAENUMPROCA = NAMEENUMPROCA;
127 pub type DESKTOPENUMPROCA = NAMEENUMPROCA;
128 pub type WINSTAENUMPROCW = NAMEENUMPROCW;
129 pub type DESKTOPENUMPROCW = NAMEENUMPROCW;
130 #[inline]
IS_INTRESOURCE(r: ULONG_PTR) -> bool131 pub fn IS_INTRESOURCE(r: ULONG_PTR) -> bool {
132     (r >> 16) == 0
133 }
134 #[inline]
MAKEINTRESOURCEA(i: WORD) -> LPSTR135 pub fn MAKEINTRESOURCEA(i: WORD) -> LPSTR {
136     i as ULONG_PTR as LPSTR
137 }
138 #[inline]
MAKEINTRESOURCEW(i: WORD) -> LPWSTR139 pub fn MAKEINTRESOURCEW(i: WORD) -> LPWSTR {
140     i as ULONG_PTR as LPWSTR
141 }
142 pub const RT_CURSOR: LPWSTR = MAKEINTRESOURCE!(1);
143 pub const RT_BITMAP: LPWSTR = MAKEINTRESOURCE!(2);
144 pub const RT_ICON: LPWSTR = MAKEINTRESOURCE!(3);
145 pub const RT_MENU: LPWSTR = MAKEINTRESOURCE!(4);
146 pub const RT_DIALOG: LPWSTR = MAKEINTRESOURCE!(5);
147 pub const RT_STRING: LPWSTR = MAKEINTRESOURCE!(6);
148 pub const RT_FONTDIR: LPWSTR = MAKEINTRESOURCE!(7);
149 pub const RT_FONT: LPWSTR = MAKEINTRESOURCE!(8);
150 pub const RT_ACCELERATOR: LPWSTR = MAKEINTRESOURCE!(9);
151 pub const RT_RCDATA: LPWSTR = MAKEINTRESOURCE!(10);
152 pub const RT_MESSAGETABLE: LPWSTR = MAKEINTRESOURCE!(11);
153 pub const DIFFERENCE: WORD = 11;
154 pub const RT_GROUP_CURSOR: LPWSTR = MAKEINTRESOURCE!(1 + DIFFERENCE);
155 pub const RT_GROUP_ICON: LPWSTR = MAKEINTRESOURCE!(3 + DIFFERENCE);
156 pub const RT_VERSION: LPWSTR = MAKEINTRESOURCE!(16);
157 pub const RT_DLGINCLUDE: LPWSTR = MAKEINTRESOURCE!(17);
158 pub const RT_PLUGPLAY: LPWSTR = MAKEINTRESOURCE!(19);
159 pub const RT_VXD: LPWSTR = MAKEINTRESOURCE!(20);
160 pub const RT_ANICURSOR: LPWSTR = MAKEINTRESOURCE!(21);
161 pub const RT_ANIICON: LPWSTR = MAKEINTRESOURCE!(22);
162 pub const RT_HTML: LPWSTR = MAKEINTRESOURCE!(23);
163 pub const RT_MANIFEST: LPWSTR = MAKEINTRESOURCE!(24);
164 pub const CREATEPROCESS_MANIFEST_RESOURCE_ID: LPWSTR = MAKEINTRESOURCE!(1);
165 pub const ISOLATIONAWARE_MANIFEST_RESOURCE_ID: LPWSTR = MAKEINTRESOURCE!(2);
166 pub const ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID: LPWSTR
167     = MAKEINTRESOURCE!(3);
168 pub const MINIMUM_RESERVED_MANIFEST_RESOURCE_ID: LPWSTR = MAKEINTRESOURCE!(1);
169 pub const MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID: LPWSTR = MAKEINTRESOURCE!(16);
170 extern "system" {
wvsprintfA( _: LPSTR, _: LPCSTR, arglist: va_list, ) -> c_int171     pub fn wvsprintfA(
172         _: LPSTR,
173         _: LPCSTR,
174         arglist: va_list,
175     ) -> c_int;
wvsprintfW( _: LPWSTR, _: LPCWSTR, arglist: va_list, ) -> c_int176     pub fn wvsprintfW(
177         _: LPWSTR,
178         _: LPCWSTR,
179         arglist: va_list,
180     ) -> c_int;
181 }
182 extern "C" {
wsprintfA( _: LPSTR, _: LPCSTR, ... ) -> c_int183     pub fn wsprintfA(
184         _: LPSTR,
185         _: LPCSTR,
186         ...
187     ) -> c_int;
wsprintfW( _: LPWSTR, _: LPCWSTR, ... ) -> c_int188     pub fn wsprintfW(
189         _: LPWSTR,
190         _: LPCWSTR,
191         ...
192     ) -> c_int;
193 }
194 pub const SETWALLPAPER_DEFAULT: LPWSTR = -1isize as LPWSTR;
195 pub const SB_HORZ: UINT = 0;
196 pub const SB_VERT: UINT = 1;
197 pub const SB_CTL: UINT = 2;
198 pub const SB_BOTH: UINT = 3;
199 pub const SB_LINEUP: LPARAM = 0;
200 pub const SB_LINELEFT: LPARAM = 0;
201 pub const SB_LINEDOWN: LPARAM = 1;
202 pub const SB_LINERIGHT: LPARAM = 1;
203 pub const SB_PAGEUP: LPARAM = 2;
204 pub const SB_PAGELEFT: LPARAM = 2;
205 pub const SB_PAGEDOWN: LPARAM = 3;
206 pub const SB_PAGERIGHT: LPARAM = 3;
207 pub const SB_THUMBPOSITION: LPARAM = 4;
208 pub const SB_THUMBTRACK: LPARAM = 5;
209 pub const SB_TOP: LPARAM = 6;
210 pub const SB_LEFT: LPARAM = 6;
211 pub const SB_BOTTOM: LPARAM = 7;
212 pub const SB_RIGHT: LPARAM = 7;
213 pub const SB_ENDSCROLL: LPARAM = 8;
214 pub const SW_HIDE: c_int = 0;
215 pub const SW_SHOWNORMAL: c_int = 1;
216 pub const SW_NORMAL: c_int = 1;
217 pub const SW_SHOWMINIMIZED: c_int = 2;
218 pub const SW_SHOWMAXIMIZED: c_int = 3;
219 pub const SW_MAXIMIZE: c_int = 3;
220 pub const SW_SHOWNOACTIVATE: c_int = 4;
221 pub const SW_SHOW: c_int = 5;
222 pub const SW_MINIMIZE: c_int = 6;
223 pub const SW_SHOWMINNOACTIVE: c_int = 7;
224 pub const SW_SHOWNA: c_int = 8;
225 pub const SW_RESTORE: c_int = 9;
226 pub const SW_SHOWDEFAULT: c_int = 10;
227 pub const SW_FORCEMINIMIZE: c_int = 11;
228 pub const SW_MAX: c_int = 11;
229 pub const HIDE_WINDOW: c_int = 0;
230 pub const SHOW_OPENWINDOW: c_int = 1;
231 pub const SHOW_ICONWINDOW: c_int = 2;
232 pub const SHOW_FULLSCREEN: c_int = 3;
233 pub const SHOW_OPENNOACTIVATE: c_int = 4;
234 pub const SW_PARENTCLOSING: LPARAM = 1;
235 pub const SW_OTHERZOOM: LPARAM = 2;
236 pub const SW_PARENTOPENING: LPARAM = 3;
237 pub const SW_OTHERUNZOOM: LPARAM = 4;
238 pub const AW_HOR_POSITIVE: DWORD = 0x00000001;
239 pub const AW_HOR_NEGATIVE: DWORD = 0x00000002;
240 pub const AW_VER_POSITIVE: DWORD = 0x00000004;
241 pub const AW_VER_NEGATIVE: DWORD = 0x00000008;
242 pub const AW_CENTER: DWORD = 0x00000010;
243 pub const AW_HIDE: DWORD = 0x00010000;
244 pub const AW_ACTIVATE: DWORD = 0x00020000;
245 pub const AW_SLIDE: DWORD = 0x00040000;
246 pub const AW_BLEND: DWORD = 0x00080000;
247 pub const KF_EXTENDED: WORD = 0x0100;
248 pub const KF_DLGMODE: WORD = 0x0800;
249 pub const KF_MENUMODE: WORD = 0x1000;
250 pub const KF_ALTDOWN: WORD = 0x2000;
251 pub const KF_REPEAT: WORD = 0x4000;
252 pub const KF_UP: WORD = 0x8000;
253 pub const VK_LBUTTON: c_int = 0x01;
254 pub const VK_RBUTTON: c_int = 0x02;
255 pub const VK_CANCEL: c_int = 0x03;
256 pub const VK_MBUTTON: c_int = 0x04;
257 pub const VK_XBUTTON1: c_int = 0x05;
258 pub const VK_XBUTTON2: c_int = 0x06;
259 pub const VK_BACK: c_int = 0x08;
260 pub const VK_TAB: c_int = 0x09;
261 pub const VK_CLEAR: c_int = 0x0C;
262 pub const VK_RETURN: c_int = 0x0D;
263 pub const VK_SHIFT: c_int = 0x10;
264 pub const VK_CONTROL: c_int = 0x11;
265 pub const VK_MENU: c_int = 0x12;
266 pub const VK_PAUSE: c_int = 0x13;
267 pub const VK_CAPITAL: c_int = 0x14;
268 pub const VK_KANA: c_int = 0x15;
269 pub const VK_HANGEUL: c_int = 0x15;
270 pub const VK_HANGUL: c_int = 0x15;
271 pub const VK_JUNJA: c_int = 0x17;
272 pub const VK_FINAL: c_int = 0x18;
273 pub const VK_HANJA: c_int = 0x19;
274 pub const VK_KANJI: c_int = 0x19;
275 pub const VK_ESCAPE: c_int = 0x1B;
276 pub const VK_CONVERT: c_int = 0x1C;
277 pub const VK_NONCONVERT: c_int = 0x1D;
278 pub const VK_ACCEPT: c_int = 0x1E;
279 pub const VK_MODECHANGE: c_int = 0x1F;
280 pub const VK_SPACE: c_int = 0x20;
281 pub const VK_PRIOR: c_int = 0x21;
282 pub const VK_NEXT: c_int = 0x22;
283 pub const VK_END: c_int = 0x23;
284 pub const VK_HOME: c_int = 0x24;
285 pub const VK_LEFT: c_int = 0x25;
286 pub const VK_UP: c_int = 0x26;
287 pub const VK_RIGHT: c_int = 0x27;
288 pub const VK_DOWN: c_int = 0x28;
289 pub const VK_SELECT: c_int = 0x29;
290 pub const VK_PRINT: c_int = 0x2A;
291 pub const VK_EXECUTE: c_int = 0x2B;
292 pub const VK_SNAPSHOT: c_int = 0x2C;
293 pub const VK_INSERT: c_int = 0x2D;
294 pub const VK_DELETE: c_int = 0x2E;
295 pub const VK_HELP: c_int = 0x2F;
296 pub const VK_LWIN: c_int = 0x5B;
297 pub const VK_RWIN: c_int = 0x5C;
298 pub const VK_APPS: c_int = 0x5D;
299 pub const VK_SLEEP: c_int = 0x5F;
300 pub const VK_NUMPAD0: c_int = 0x60;
301 pub const VK_NUMPAD1: c_int = 0x61;
302 pub const VK_NUMPAD2: c_int = 0x62;
303 pub const VK_NUMPAD3: c_int = 0x63;
304 pub const VK_NUMPAD4: c_int = 0x64;
305 pub const VK_NUMPAD5: c_int = 0x65;
306 pub const VK_NUMPAD6: c_int = 0x66;
307 pub const VK_NUMPAD7: c_int = 0x67;
308 pub const VK_NUMPAD8: c_int = 0x68;
309 pub const VK_NUMPAD9: c_int = 0x69;
310 pub const VK_MULTIPLY: c_int = 0x6A;
311 pub const VK_ADD: c_int = 0x6B;
312 pub const VK_SEPARATOR: c_int = 0x6C;
313 pub const VK_SUBTRACT: c_int = 0x6D;
314 pub const VK_DECIMAL: c_int = 0x6E;
315 pub const VK_DIVIDE: c_int = 0x6F;
316 pub const VK_F1: c_int = 0x70;
317 pub const VK_F2: c_int = 0x71;
318 pub const VK_F3: c_int = 0x72;
319 pub const VK_F4: c_int = 0x73;
320 pub const VK_F5: c_int = 0x74;
321 pub const VK_F6: c_int = 0x75;
322 pub const VK_F7: c_int = 0x76;
323 pub const VK_F8: c_int = 0x77;
324 pub const VK_F9: c_int = 0x78;
325 pub const VK_F10: c_int = 0x79;
326 pub const VK_F11: c_int = 0x7A;
327 pub const VK_F12: c_int = 0x7B;
328 pub const VK_F13: c_int = 0x7C;
329 pub const VK_F14: c_int = 0x7D;
330 pub const VK_F15: c_int = 0x7E;
331 pub const VK_F16: c_int = 0x7F;
332 pub const VK_F17: c_int = 0x80;
333 pub const VK_F18: c_int = 0x81;
334 pub const VK_F19: c_int = 0x82;
335 pub const VK_F20: c_int = 0x83;
336 pub const VK_F21: c_int = 0x84;
337 pub const VK_F22: c_int = 0x85;
338 pub const VK_F23: c_int = 0x86;
339 pub const VK_F24: c_int = 0x87;
340 pub const VK_NAVIGATION_VIEW: c_int = 0x88;
341 pub const VK_NAVIGATION_MENU: c_int = 0x89;
342 pub const VK_NAVIGATION_UP: c_int = 0x8A;
343 pub const VK_NAVIGATION_DOWN: c_int = 0x8B;
344 pub const VK_NAVIGATION_LEFT: c_int = 0x8C;
345 pub const VK_NAVIGATION_RIGHT: c_int = 0x8D;
346 pub const VK_NAVIGATION_ACCEPT: c_int = 0x8E;
347 pub const VK_NAVIGATION_CANCEL: c_int = 0x8F;
348 pub const VK_NUMLOCK: c_int = 0x90;
349 pub const VK_SCROLL: c_int = 0x91;
350 pub const VK_OEM_NEC_EQUAL: c_int = 0x92;
351 pub const VK_OEM_FJ_JISHO: c_int = 0x92;
352 pub const VK_OEM_FJ_MASSHOU: c_int = 0x93;
353 pub const VK_OEM_FJ_TOUROKU: c_int = 0x94;
354 pub const VK_OEM_FJ_LOYA: c_int = 0x95;
355 pub const VK_OEM_FJ_ROYA: c_int = 0x96;
356 pub const VK_LSHIFT: c_int = 0xA0;
357 pub const VK_RSHIFT: c_int = 0xA1;
358 pub const VK_LCONTROL: c_int = 0xA2;
359 pub const VK_RCONTROL: c_int = 0xA3;
360 pub const VK_LMENU: c_int = 0xA4;
361 pub const VK_RMENU: c_int = 0xA5;
362 pub const VK_BROWSER_BACK: c_int = 0xA6;
363 pub const VK_BROWSER_FORWARD: c_int = 0xA7;
364 pub const VK_BROWSER_REFRESH: c_int = 0xA8;
365 pub const VK_BROWSER_STOP: c_int = 0xA9;
366 pub const VK_BROWSER_SEARCH: c_int = 0xAA;
367 pub const VK_BROWSER_FAVORITES: c_int = 0xAB;
368 pub const VK_BROWSER_HOME: c_int = 0xAC;
369 pub const VK_VOLUME_MUTE: c_int = 0xAD;
370 pub const VK_VOLUME_DOWN: c_int = 0xAE;
371 pub const VK_VOLUME_UP: c_int = 0xAF;
372 pub const VK_MEDIA_NEXT_TRACK: c_int = 0xB0;
373 pub const VK_MEDIA_PREV_TRACK: c_int = 0xB1;
374 pub const VK_MEDIA_STOP: c_int = 0xB2;
375 pub const VK_MEDIA_PLAY_PAUSE: c_int = 0xB3;
376 pub const VK_LAUNCH_MAIL: c_int = 0xB4;
377 pub const VK_LAUNCH_MEDIA_SELECT: c_int = 0xB5;
378 pub const VK_LAUNCH_APP1: c_int = 0xB6;
379 pub const VK_LAUNCH_APP2: c_int = 0xB7;
380 pub const VK_OEM_1: c_int = 0xBA;
381 pub const VK_OEM_PLUS: c_int = 0xBB;
382 pub const VK_OEM_COMMA: c_int = 0xBC;
383 pub const VK_OEM_MINUS: c_int = 0xBD;
384 pub const VK_OEM_PERIOD: c_int = 0xBE;
385 pub const VK_OEM_2: c_int = 0xBF;
386 pub const VK_OEM_3: c_int = 0xC0;
387 pub const VK_GAMEPAD_A: c_int = 0xC3;
388 pub const VK_GAMEPAD_B: c_int = 0xC4;
389 pub const VK_GAMEPAD_X: c_int = 0xC5;
390 pub const VK_GAMEPAD_Y: c_int = 0xC6;
391 pub const VK_GAMEPAD_RIGHT_SHOULDER: c_int = 0xC7;
392 pub const VK_GAMEPAD_LEFT_SHOULDER: c_int = 0xC8;
393 pub const VK_GAMEPAD_LEFT_TRIGGER: c_int = 0xC9;
394 pub const VK_GAMEPAD_RIGHT_TRIGGER: c_int = 0xCA;
395 pub const VK_GAMEPAD_DPAD_UP: c_int = 0xCB;
396 pub const VK_GAMEPAD_DPAD_DOWN: c_int = 0xCC;
397 pub const VK_GAMEPAD_DPAD_LEFT: c_int = 0xCD;
398 pub const VK_GAMEPAD_DPAD_RIGHT: c_int = 0xCE;
399 pub const VK_GAMEPAD_MENU: c_int = 0xCF;
400 pub const VK_GAMEPAD_VIEW: c_int = 0xD0;
401 pub const VK_GAMEPAD_LEFT_THUMBSTICK_BUTTON: c_int = 0xD1;
402 pub const VK_GAMEPAD_RIGHT_THUMBSTICK_BUTTON: c_int = 0xD2;
403 pub const VK_GAMEPAD_LEFT_THUMBSTICK_UP: c_int = 0xD3;
404 pub const VK_GAMEPAD_LEFT_THUMBSTICK_DOWN: c_int = 0xD4;
405 pub const VK_GAMEPAD_LEFT_THUMBSTICK_RIGHT: c_int = 0xD5;
406 pub const VK_GAMEPAD_LEFT_THUMBSTICK_LEFT: c_int = 0xD6;
407 pub const VK_GAMEPAD_RIGHT_THUMBSTICK_UP: c_int = 0xD7;
408 pub const VK_GAMEPAD_RIGHT_THUMBSTICK_DOWN: c_int = 0xD8;
409 pub const VK_GAMEPAD_RIGHT_THUMBSTICK_RIGHT: c_int = 0xD9;
410 pub const VK_GAMEPAD_RIGHT_THUMBSTICK_LEFT: c_int = 0xDA;
411 pub const VK_OEM_4: c_int = 0xDB;
412 pub const VK_OEM_5: c_int = 0xDC;
413 pub const VK_OEM_6: c_int = 0xDD;
414 pub const VK_OEM_7: c_int = 0xDE;
415 pub const VK_OEM_8: c_int = 0xDF;
416 pub const VK_OEM_AX: c_int = 0xE1;
417 pub const VK_OEM_102: c_int = 0xE2;
418 pub const VK_ICO_HELP: c_int = 0xE3;
419 pub const VK_ICO_00: c_int = 0xE4;
420 pub const VK_PROCESSKEY: c_int = 0xE5;
421 pub const VK_ICO_CLEAR: c_int = 0xE6;
422 pub const VK_PACKET: c_int = 0xE7;
423 pub const VK_OEM_RESET: c_int = 0xE9;
424 pub const VK_OEM_JUMP: c_int = 0xEA;
425 pub const VK_OEM_PA1: c_int = 0xEB;
426 pub const VK_OEM_PA2: c_int = 0xEC;
427 pub const VK_OEM_PA3: c_int = 0xED;
428 pub const VK_OEM_WSCTRL: c_int = 0xEE;
429 pub const VK_OEM_CUSEL: c_int = 0xEF;
430 pub const VK_OEM_ATTN: c_int = 0xF0;
431 pub const VK_OEM_FINISH: c_int = 0xF1;
432 pub const VK_OEM_COPY: c_int = 0xF2;
433 pub const VK_OEM_AUTO: c_int = 0xF3;
434 pub const VK_OEM_ENLW: c_int = 0xF4;
435 pub const VK_OEM_BACKTAB: c_int = 0xF5;
436 pub const VK_ATTN: c_int = 0xF6;
437 pub const VK_CRSEL: c_int = 0xF7;
438 pub const VK_EXSEL: c_int = 0xF8;
439 pub const VK_EREOF: c_int = 0xF9;
440 pub const VK_PLAY: c_int = 0xFA;
441 pub const VK_ZOOM: c_int = 0xFB;
442 pub const VK_NONAME: c_int = 0xFC;
443 pub const VK_PA1: c_int = 0xFD;
444 pub const VK_OEM_CLEAR: c_int = 0xFE;
445 pub const WH_MIN: c_int = -1;
446 pub const WH_MSGFILTER: c_int = -1;
447 pub const WH_JOURNALRECORD: c_int = 0;
448 pub const WH_JOURNALPLAYBACK: c_int = 1;
449 pub const WH_KEYBOARD: c_int = 2;
450 pub const WH_GETMESSAGE: c_int = 3;
451 pub const WH_CALLWNDPROC: c_int = 4;
452 pub const WH_CBT: c_int = 5;
453 pub const WH_SYSMSGFILTER: c_int = 6;
454 pub const WH_MOUSE: c_int = 7;
455 pub const WH_HARDWARE: c_int = 8;
456 pub const WH_DEBUG: c_int = 9;
457 pub const WH_SHELL: c_int = 10;
458 pub const WH_FOREGROUNDIDLE: c_int = 11;
459 pub const WH_CALLWNDPROCRET: c_int = 12;
460 pub const WH_KEYBOARD_LL: c_int = 13;
461 pub const WH_MOUSE_LL: c_int = 14;
462 pub const WH_MAX: c_int = 14;
463 pub const WH_MINHOOK: c_int = WH_MIN;
464 pub const WH_MAXHOOK: c_int = WH_MAX;
465 pub const HC_ACTION: c_int = 0;
466 pub const HC_GETNEXT: c_int = 1;
467 pub const HC_SKIP: c_int = 2;
468 pub const HC_NOREMOVE: c_int = 3;
469 pub const HC_NOREM: c_int = HC_NOREMOVE;
470 pub const HC_SYSMODALON: c_int = 4;
471 pub const HC_SYSMODALOFF: c_int = 5;
472 pub const HCBT_MOVESIZE: c_int = 0;
473 pub const HCBT_MINMAX: c_int = 1;
474 pub const HCBT_QS: c_int = 2;
475 pub const HCBT_CREATEWND: c_int = 3;
476 pub const HCBT_DESTROYWND: c_int = 4;
477 pub const HCBT_ACTIVATE: c_int = 5;
478 pub const HCBT_CLICKSKIPPED: c_int = 6;
479 pub const HCBT_KEYSKIPPED: c_int = 7;
480 pub const HCBT_SYSCOMMAND: c_int = 8;
481 pub const HCBT_SETFOCUS: c_int = 9;
482 STRUCT!{struct CBT_CREATEWNDA {
483     lpcs: *mut CREATESTRUCTA,
484     hwndInsertAfter: HWND,
485 }}
486 pub type LPCBT_CREATEWNDA = *mut CBT_CREATEWNDA;
487 STRUCT!{struct CBT_CREATEWNDW {
488     lpcs: *mut CREATESTRUCTW,
489     hwndInsertAfter: HWND,
490 }}
491 pub type LPCBT_CREATEWNDW = *mut CBT_CREATEWNDW;
492 STRUCT!{struct CBTACTIVATESTRUCT {
493     fMouse: BOOL,
494     hWndActive: HWND,
495 }}
496 pub type LPCBTACTIVATESTRUCT = *mut CBTACTIVATESTRUCT;
497 STRUCT!{struct WTSSESSION_NOTIFICATION {
498     cbSize: DWORD,
499     dwSessionId: DWORD,
500 }}
501 pub type PWTSSESSION_NOTIFICATION = *mut WTSSESSION_NOTIFICATION;
502 pub const WTS_CONSOLE_CONNECT: WPARAM = 0x1;
503 pub const WTS_CONSOLE_DISCONNECT: WPARAM = 0x2;
504 pub const WTS_REMOTE_CONNECT: WPARAM = 0x3;
505 pub const WTS_REMOTE_DISCONNECT: WPARAM = 0x4;
506 pub const WTS_SESSION_LOGON: WPARAM = 0x5;
507 pub const WTS_SESSION_LOGOFF: WPARAM = 0x6;
508 pub const WTS_SESSION_LOCK: WPARAM = 0x7;
509 pub const WTS_SESSION_UNLOCK: WPARAM = 0x8;
510 pub const WTS_SESSION_REMOTE_CONTROL: WPARAM = 0x9;
511 pub const WTS_SESSION_CREATE: WPARAM = 0xa;
512 pub const WTS_SESSION_TERMINATE: WPARAM = 0xb;
513 pub const MSGF_DIALOGBOX: c_int = 0;
514 pub const MSGF_MESSAGEBOX: c_int = 1;
515 pub const MSGF_MENU: c_int = 2;
516 pub const MSGF_SCROLLBAR: c_int = 5;
517 pub const MSGF_NEXTWINDOW: c_int = 6;
518 pub const MSGF_MAX: c_int = 8;
519 pub const MSGF_USER: c_int = 4096;
520 pub const HSHELL_WINDOWCREATED: c_int = 1;
521 pub const HSHELL_WINDOWDESTROYED: c_int = 2;
522 pub const HSHELL_ACTIVATESHELLWINDOW: c_int = 3;
523 pub const HSHELL_WINDOWACTIVATED: c_int = 4;
524 pub const HSHELL_GETMINRECT: c_int = 5;
525 pub const HSHELL_REDRAW: c_int = 6;
526 pub const HSHELL_TASKMAN: c_int = 7;
527 pub const HSHELL_LANGUAGE: c_int = 8;
528 pub const HSHELL_SYSMENU: c_int = 9;
529 pub const HSHELL_ENDTASK: c_int = 10;
530 pub const HSHELL_ACCESSIBILITYSTATE: c_int = 11;
531 pub const HSHELL_APPCOMMAND: c_int = 12;
532 pub const HSHELL_WINDOWREPLACED: c_int = 13;
533 pub const HSHELL_WINDOWREPLACING: c_int = 14;
534 pub const HSHELL_MONITORCHANGED: c_int = 16;
535 pub const HSHELL_HIGHBIT: c_int = 0x8000;
536 pub const HSHELL_FLASH: c_int = HSHELL_REDRAW | HSHELL_HIGHBIT;
537 pub const HSHELL_RUDEAPPACTIVATED: c_int = HSHELL_WINDOWACTIVATED | HSHELL_HIGHBIT;
538 pub const APPCOMMAND_BROWSER_BACKWARD: c_short = 1;
539 pub const APPCOMMAND_BROWSER_FORWARD: c_short = 2;
540 pub const APPCOMMAND_BROWSER_REFRESH: c_short = 3;
541 pub const APPCOMMAND_BROWSER_STOP: c_short = 4;
542 pub const APPCOMMAND_BROWSER_SEARCH: c_short = 5;
543 pub const APPCOMMAND_BROWSER_FAVORITES: c_short = 6;
544 pub const APPCOMMAND_BROWSER_HOME: c_short = 7;
545 pub const APPCOMMAND_VOLUME_MUTE: c_short = 8;
546 pub const APPCOMMAND_VOLUME_DOWN: c_short = 9;
547 pub const APPCOMMAND_VOLUME_UP: c_short = 10;
548 pub const APPCOMMAND_MEDIA_NEXTTRACK: c_short = 11;
549 pub const APPCOMMAND_MEDIA_PREVIOUSTRACK: c_short = 12;
550 pub const APPCOMMAND_MEDIA_STOP: c_short = 13;
551 pub const APPCOMMAND_MEDIA_PLAY_PAUSE: c_short = 14;
552 pub const APPCOMMAND_LAUNCH_MAIL: c_short = 15;
553 pub const APPCOMMAND_LAUNCH_MEDIA_SELECT: c_short = 16;
554 pub const APPCOMMAND_LAUNCH_APP1: c_short = 17;
555 pub const APPCOMMAND_LAUNCH_APP2: c_short = 18;
556 pub const APPCOMMAND_BASS_DOWN: c_short = 19;
557 pub const APPCOMMAND_BASS_BOOST: c_short = 20;
558 pub const APPCOMMAND_BASS_UP: c_short = 21;
559 pub const APPCOMMAND_TREBLE_DOWN: c_short = 22;
560 pub const APPCOMMAND_TREBLE_UP: c_short = 23;
561 pub const APPCOMMAND_MICROPHONE_VOLUME_MUTE: c_short = 24;
562 pub const APPCOMMAND_MICROPHONE_VOLUME_DOWN: c_short = 25;
563 pub const APPCOMMAND_MICROPHONE_VOLUME_UP: c_short = 26;
564 pub const APPCOMMAND_HELP: c_short = 27;
565 pub const APPCOMMAND_FIND: c_short = 28;
566 pub const APPCOMMAND_NEW: c_short = 29;
567 pub const APPCOMMAND_OPEN: c_short = 30;
568 pub const APPCOMMAND_CLOSE: c_short = 31;
569 pub const APPCOMMAND_SAVE: c_short = 32;
570 pub const APPCOMMAND_PRINT: c_short = 33;
571 pub const APPCOMMAND_UNDO: c_short = 34;
572 pub const APPCOMMAND_REDO: c_short = 35;
573 pub const APPCOMMAND_COPY: c_short = 36;
574 pub const APPCOMMAND_CUT: c_short = 37;
575 pub const APPCOMMAND_PASTE: c_short = 38;
576 pub const APPCOMMAND_REPLY_TO_MAIL: c_short = 39;
577 pub const APPCOMMAND_FORWARD_MAIL: c_short = 40;
578 pub const APPCOMMAND_SEND_MAIL: c_short = 41;
579 pub const APPCOMMAND_SPELL_CHECK: c_short = 42;
580 pub const APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE: c_short = 43;
581 pub const APPCOMMAND_MIC_ON_OFF_TOGGLE: c_short = 44;
582 pub const APPCOMMAND_CORRECTION_LIST: c_short = 45;
583 pub const APPCOMMAND_MEDIA_PLAY: c_short = 46;
584 pub const APPCOMMAND_MEDIA_PAUSE: c_short = 47;
585 pub const APPCOMMAND_MEDIA_RECORD: c_short = 48;
586 pub const APPCOMMAND_MEDIA_FAST_FORWARD: c_short = 49;
587 pub const APPCOMMAND_MEDIA_REWIND: c_short = 50;
588 pub const APPCOMMAND_MEDIA_CHANNEL_UP: c_short = 51;
589 pub const APPCOMMAND_MEDIA_CHANNEL_DOWN: c_short = 52;
590 pub const APPCOMMAND_DELETE: c_short = 53;
591 pub const APPCOMMAND_DWM_FLIP3D: c_short = 54;
592 pub const FAPPCOMMAND_MOUSE: WORD = 0x8000;
593 pub const FAPPCOMMAND_KEY: WORD = 0;
594 pub const FAPPCOMMAND_OEM: WORD = 0x1000;
595 pub const FAPPCOMMAND_MASK: WORD = 0xF000;
596 #[inline]
GET_APPCOMMAND_LPARAM(lParam: LPARAM) -> c_short597 pub fn GET_APPCOMMAND_LPARAM(lParam: LPARAM) -> c_short {
598     (HIWORD(lParam as DWORD) & !FAPPCOMMAND_MASK) as c_short
599 }
600 #[inline]
GET_DEVICE_LPARAM(lParam: LPARAM) -> WORD601 pub fn GET_DEVICE_LPARAM(lParam: LPARAM) -> WORD {
602     HIWORD(lParam as DWORD) & FAPPCOMMAND_MASK
603 }
604 pub use self::GET_DEVICE_LPARAM as GET_MOUSEORKEY_LPARAM;
605 pub use shared::minwindef::LOWORD as GET_FLAGS_LPARAM;
606 pub use self::GET_FLAGS_LPARAM as GET_KEYSTATE_LPARAM;
607 STRUCT!{struct SHELLHOOKINFO {
608     hwnd: HWND,
609     rc: RECT,
610 }}
611 pub type LPSHELLHOOKINFO = *mut SHELLHOOKINFO;
612 STRUCT!{struct EVENTMSG {
613     message: UINT,
614     paramL: UINT,
615     paramH: UINT,
616     time: DWORD,
617     hwnd: HWND,
618 }}
619 pub type PEVENTMSGMSG = *mut EVENTMSG;
620 pub type NPEVENTMSGMSG = *mut EVENTMSG;
621 pub type LPEVENTMSGMSG = *mut EVENTMSG;
622 pub type PEVENTMSG = *mut EVENTMSG;
623 pub type NPEVENTMSG = *mut EVENTMSG;
624 pub type LPEVENTMSG = *mut EVENTMSG;
625 STRUCT!{struct CWPSTRUCT {
626     lParam: LPARAM,
627     wParam: WPARAM,
628     message: UINT,
629     hwnd: HWND,
630 }}
631 pub type PCWPSTRUCT = *mut CWPSTRUCT;
632 pub type NPCWPSTRUCT = *mut CWPSTRUCT;
633 pub type LPCWPSTRUCT = *mut CWPSTRUCT;
634 STRUCT!{struct CWPRETSTRUCT {
635     lResult: LRESULT,
636     lParam: LPARAM,
637     wParam: WPARAM,
638     message: UINT,
639     hwnd: HWND,
640 }}
641 pub type PCWPRETSTRUCT = *mut CWPRETSTRUCT;
642 pub type NPCWPRETSTRUCT = *mut CWPRETSTRUCT;
643 pub type LPCWPRETSTRUCT = *mut CWPRETSTRUCT;
644 pub const LLKHF_EXTENDED: DWORD = (KF_EXTENDED >> 8) as u32;
645 pub const LLKHF_INJECTED: DWORD = 0x00000010;
646 pub const LLKHF_ALTDOWN: DWORD = (KF_ALTDOWN >> 8) as u32;
647 pub const LLKHF_UP: DWORD = (KF_UP >> 8) as u32;
648 pub const LLKHF_LOWER_IL_INJECTED: DWORD = 0x00000002;
649 pub const LLMHF_INJECTED: DWORD = 0x00000001;
650 pub const LLMHF_LOWER_IL_INJECTED: DWORD = 0x00000002;
651 STRUCT!{struct KBDLLHOOKSTRUCT {
652     vkCode: DWORD,
653     scanCode: DWORD,
654     flags: DWORD,
655     time: DWORD,
656     dwExtraInfo: ULONG_PTR,
657 }}
658 pub type LPKBDLLHOOKSTRUCT = *mut KBDLLHOOKSTRUCT;
659 pub type PKBDLLHOOKSTRUCT = *mut KBDLLHOOKSTRUCT;
660 STRUCT!{struct MSLLHOOKSTRUCT {
661     pt: POINT,
662     mouseData: DWORD,
663     flags: DWORD,
664     time: DWORD,
665     dwExtraInfo: ULONG_PTR,
666 }}
667 pub type LPMSLLHOOKSTRUCT = *mut MSLLHOOKSTRUCT;
668 pub type PMSLLHOOKSTRUCT = *mut MSLLHOOKSTRUCT;
669 STRUCT!{struct DEBUGHOOKINFO {
670     idThread: DWORD,
671     idThreadInstaller: DWORD,
672     lParam: LPARAM,
673     wParam: WPARAM,
674     code: c_int,
675 }}
676 pub type PDEBUGHOOKINFO = *mut DEBUGHOOKINFO;
677 pub type NPDEBUGHOOKINFO = *mut DEBUGHOOKINFO;
678 pub type LPDEBUGHOOKINFO = *mut DEBUGHOOKINFO;
679 STRUCT!{struct MOUSEHOOKSTRUCT {
680     pt: POINT,
681     hwnd: HWND,
682     wHitTestCode: UINT,
683     dwExtraInfo: ULONG_PTR,
684 }}
685 pub type LPMOUSEHOOKSTRUCT = *mut MOUSEHOOKSTRUCT;
686 pub type PMOUSEHOOKSTRUCT = *mut MOUSEHOOKSTRUCT;
687 STRUCT!{struct MOUSEHOOKSTRUCTEX {
688     parent: MOUSEHOOKSTRUCT,
689     mouseData: DWORD,
690 }}
691 pub type LPMOUSEHOOKSTRUCTEX = *mut MOUSEHOOKSTRUCTEX;
692 pub type PMOUSEHOOKSTRUCTEX = *mut MOUSEHOOKSTRUCTEX;
693 STRUCT!{struct HARDWAREHOOKSTRUCT {
694     hwnd: HWND,
695     message: UINT,
696     wParam: WPARAM,
697     lParam: LPARAM,
698 }}
699 pub type LPHARDWAREHOOKSTRUCT = *mut HARDWAREHOOKSTRUCT;
700 pub type PHARDWAREHOOKSTRUCT = *mut HARDWAREHOOKSTRUCT;
701 pub const HKL_PREV: HKL = 0 as HKL;
702 pub const HKL_NEXT: HKL = 1 as HKL;
703 pub const KLF_ACTIVATE: UINT = 0x00000001;
704 pub const KLF_SUBSTITUTE_OK: UINT = 0x00000002;
705 pub const KLF_REORDER: UINT = 0x00000008;
706 pub const KLF_REPLACELANG: UINT = 0x00000010;
707 pub const KLF_NOTELLSHELL: UINT = 0x00000080;
708 pub const KLF_SETFORPROCESS: UINT = 0x00000100;
709 pub const KLF_SHIFTLOCK: UINT = 0x00010000;
710 pub const KLF_RESET: UINT = 0x40000000;
711 pub const INPUTLANGCHANGE_SYSCHARSET: WPARAM = 0x0001;
712 pub const INPUTLANGCHANGE_FORWARD: WPARAM = 0x0002;
713 pub const INPUTLANGCHANGE_BACKWARD: WPARAM = 0x0004;
714 pub const KL_NAMELENGTH: usize = 9;
715 extern "system" {
LoadKeyboardLayoutA( pwszKLID: LPCSTR, Flags: DWORD, ) -> HKL716     pub fn LoadKeyboardLayoutA(
717         pwszKLID: LPCSTR,
718         Flags: DWORD,
719     ) -> HKL;
LoadKeyboardLayoutW( pwszKLID: LPCWSTR, Flags: DWORD, ) -> HKL720     pub fn LoadKeyboardLayoutW(
721         pwszKLID: LPCWSTR,
722         Flags: DWORD,
723     ) -> HKL;
ActivateKeyboardLayout( hkl: HKL, Flags: UINT, ) -> HKL724     pub fn ActivateKeyboardLayout(
725         hkl: HKL,
726         Flags: UINT,
727     ) -> HKL;
ToUnicodeEx( wVirtKey: UINT, wScanCode: UINT, lpKeyState: *const BYTE, pwszBuff: LPWSTR, cchBuff: c_int, wFlags: UINT, dwhkl: HKL, ) -> c_int728     pub fn ToUnicodeEx(
729         wVirtKey: UINT,
730         wScanCode: UINT,
731         lpKeyState: *const BYTE,
732         pwszBuff: LPWSTR,
733         cchBuff: c_int,
734         wFlags: UINT,
735         dwhkl: HKL,
736     ) -> c_int;
UnloadKeyboardLayout( hkl: HKL, ) -> BOOL737     pub fn UnloadKeyboardLayout(
738         hkl: HKL,
739     ) -> BOOL;
GetKeyboardLayoutNameA( pwszKLID: LPSTR, ) -> BOOL740     pub fn GetKeyboardLayoutNameA(
741         pwszKLID: LPSTR,
742     ) -> BOOL;
GetKeyboardLayoutNameW( pwszKLID: LPWSTR, ) -> BOOL743     pub fn GetKeyboardLayoutNameW(
744         pwszKLID: LPWSTR,
745     ) -> BOOL;
GetKeyboardLayoutList( nBuff: c_int, lpList: *mut HKL, ) -> c_int746     pub fn GetKeyboardLayoutList(
747         nBuff: c_int,
748         lpList: *mut HKL,
749     ) -> c_int;
GetKeyboardLayout( idThread: DWORD, ) -> HKL750     pub fn GetKeyboardLayout(
751         idThread: DWORD,
752     ) -> HKL;
753 }
754 STRUCT!{struct MOUSEMOVEPOINT {
755     x: c_int,
756     y: c_int,
757     time: DWORD,
758     dwExtraInfo: ULONG_PTR,
759 }}
760 pub type PMOUSEMOVEPOINT = *mut MOUSEMOVEPOINT;
761 pub type LPMOUSEMOVEPOINT = *mut MOUSEMOVEPOINT;
762 pub const GMMP_USE_DISPLAY_POINTS: DWORD = 1;
763 pub const GMMP_USE_HIGH_RESOLUTION_POINTS: DWORD = 2;
764 extern "system" {
GetMouseMovePointsEx( cbSize: UINT, lppt: LPMOUSEMOVEPOINT, lpptBuf: LPMOUSEMOVEPOINT, nBufPoints: c_int, resolution: DWORD, ) -> c_int765     pub fn GetMouseMovePointsEx(
766         cbSize: UINT,
767         lppt: LPMOUSEMOVEPOINT,
768         lpptBuf: LPMOUSEMOVEPOINT,
769         nBufPoints: c_int,
770         resolution: DWORD,
771     ) -> c_int;
772 }
773 pub const DESKTOP_READOBJECTS: DWORD = 0x0001;
774 pub const DESKTOP_CREATEWINDOW: DWORD = 0x0002;
775 pub const DESKTOP_CREATEMENU: DWORD = 0x0004;
776 pub const DESKTOP_HOOKCONTROL: DWORD = 0x0008;
777 pub const DESKTOP_JOURNALRECORD: DWORD = 0x0010;
778 pub const DESKTOP_JOURNALPLAYBACK: DWORD = 0x0020;
779 pub const DESKTOP_ENUMERATE: DWORD = 0x0040;
780 pub const DESKTOP_WRITEOBJECTS: DWORD = 0x0080;
781 pub const DESKTOP_SWITCHDESKTOP: DWORD = 0x0100;
782 pub const DF_ALLOWOTHERACCOUNTHOOK: DWORD = 0x0001;
783 extern "system" {
CreateDesktopA( lpszDesktop: LPCSTR, lpszDevice: LPCSTR, pDevmode: *mut DEVMODEA, dwFlags: DWORD, dwDesiredAccess: ACCESS_MASK, lpsa: LPSECURITY_ATTRIBUTES, ) -> HDESK784     pub fn CreateDesktopA(
785         lpszDesktop: LPCSTR,
786         lpszDevice: LPCSTR,
787         pDevmode: *mut DEVMODEA,
788         dwFlags: DWORD,
789         dwDesiredAccess: ACCESS_MASK,
790         lpsa: LPSECURITY_ATTRIBUTES,
791     ) -> HDESK;
CreateDesktopW( lpszDesktop: LPCWSTR, lpszDevice: LPCWSTR, pDevmode: *mut DEVMODEW, dwFlags: DWORD, dwDesiredAccess: ACCESS_MASK, lpsa: LPSECURITY_ATTRIBUTES, ) -> HDESK792     pub fn CreateDesktopW(
793         lpszDesktop: LPCWSTR,
794         lpszDevice: LPCWSTR,
795         pDevmode: *mut DEVMODEW,
796         dwFlags: DWORD,
797         dwDesiredAccess: ACCESS_MASK,
798         lpsa: LPSECURITY_ATTRIBUTES,
799     ) -> HDESK;
CreateDesktopExA( lpszDesktop: LPCSTR, lpszDevice: LPCSTR, pDevmode: *mut DEVMODEA, dwFlags: DWORD, dwDesiredAccess: ACCESS_MASK, lpsa: LPSECURITY_ATTRIBUTES, ulHeapSize: ULONG, pvoid: PVOID, ) -> HDESK800     pub fn CreateDesktopExA(
801         lpszDesktop: LPCSTR,
802         lpszDevice: LPCSTR,
803         pDevmode: *mut DEVMODEA,
804         dwFlags: DWORD,
805         dwDesiredAccess: ACCESS_MASK,
806         lpsa: LPSECURITY_ATTRIBUTES,
807         ulHeapSize: ULONG,
808         pvoid: PVOID,
809     ) -> HDESK;
CreateDesktopExW( lpszDesktop: LPCWSTR, lpszDevice: LPCWSTR, pDevmode: *mut DEVMODEW, dwFlags: DWORD, dwDesiredAccess: ACCESS_MASK, lpsa: LPSECURITY_ATTRIBUTES, ulHeapSize: ULONG, pvoid: PVOID, ) -> HDESK810     pub fn CreateDesktopExW(
811         lpszDesktop: LPCWSTR,
812         lpszDevice: LPCWSTR,
813         pDevmode: *mut DEVMODEW,
814         dwFlags: DWORD,
815         dwDesiredAccess: ACCESS_MASK,
816         lpsa: LPSECURITY_ATTRIBUTES,
817         ulHeapSize: ULONG,
818         pvoid: PVOID,
819     ) -> HDESK;
OpenDesktopA( lpszDesktop: LPCSTR, dwFlags: DWORD, fInherit: BOOL, dwDesiredAccess: ACCESS_MASK, ) -> HDESK820     pub fn OpenDesktopA(
821         lpszDesktop: LPCSTR,
822         dwFlags: DWORD,
823         fInherit: BOOL,
824         dwDesiredAccess: ACCESS_MASK,
825     ) -> HDESK;
OpenDesktopW( lpszDesktop: LPCWSTR, dwFlags: DWORD, fInherit: BOOL, dwDesiredAccess: ACCESS_MASK, ) -> HDESK826     pub fn OpenDesktopW(
827         lpszDesktop: LPCWSTR,
828         dwFlags: DWORD,
829         fInherit: BOOL,
830         dwDesiredAccess: ACCESS_MASK,
831     ) -> HDESK;
OpenInputDesktop( dwFlags: DWORD, fInherit: BOOL, dwDesiredAccess: ACCESS_MASK, ) -> HDESK832     pub fn OpenInputDesktop(
833         dwFlags: DWORD,
834         fInherit: BOOL,
835         dwDesiredAccess: ACCESS_MASK,
836     ) -> HDESK;
EnumDesktopsA( hwinsta: HWINSTA, lpEnumFunc: DESKTOPENUMPROCA, lParam: LPARAM, ) -> BOOL837     pub fn EnumDesktopsA(
838         hwinsta: HWINSTA,
839         lpEnumFunc: DESKTOPENUMPROCA,
840         lParam: LPARAM,
841     ) -> BOOL;
EnumDesktopsW( hwinsta: HWINSTA, lpEnumFunc: DESKTOPENUMPROCW, lParam: LPARAM, ) -> BOOL842     pub fn EnumDesktopsW(
843         hwinsta: HWINSTA,
844         lpEnumFunc: DESKTOPENUMPROCW,
845         lParam: LPARAM,
846     ) -> BOOL;
EnumDesktopWindows( hDesktop: HDESK, lpfn: WNDENUMPROC, lParam: LPARAM, ) -> BOOL847     pub fn EnumDesktopWindows(
848         hDesktop: HDESK,
849         lpfn: WNDENUMPROC,
850         lParam: LPARAM,
851     ) -> BOOL;
SwitchDesktop( hDesktop: HDESK, ) -> BOOL852     pub fn SwitchDesktop(
853         hDesktop: HDESK,
854     ) -> BOOL;
SetThreadDesktop( hDesktop: HDESK, ) -> BOOL855     pub fn SetThreadDesktop(
856         hDesktop: HDESK,
857     ) -> BOOL;
CloseDesktop( hDesktop: HDESK, ) -> BOOL858     pub fn CloseDesktop(
859         hDesktop: HDESK,
860     ) -> BOOL;
GetThreadDesktop( dwThreadId: DWORD, ) -> HDESK861     pub fn GetThreadDesktop(
862         dwThreadId: DWORD,
863     ) -> HDESK;
864 }
865 pub const WINSTA_ENUMDESKTOPS: DWORD = 0x0001;
866 pub const WINSTA_READATTRIBUTES: DWORD = 0x0002;
867 pub const WINSTA_ACCESSCLIPBOARD: DWORD = 0x0004;
868 pub const WINSTA_CREATEDESKTOP: DWORD = 0x0008;
869 pub const WINSTA_WRITEATTRIBUTES: DWORD = 0x0010;
870 pub const WINSTA_ACCESSGLOBALATOMS: DWORD = 0x0020;
871 pub const WINSTA_EXITWINDOWS: DWORD = 0x0040;
872 pub const WINSTA_ENUMERATE: DWORD = 0x0100;
873 pub const WINSTA_READSCREEN: DWORD = 0x0200;
874 pub const WINSTA_ALL_ACCESS: DWORD = WINSTA_ENUMDESKTOPS | WINSTA_READATTRIBUTES
875     | WINSTA_ACCESSCLIPBOARD | WINSTA_CREATEDESKTOP | WINSTA_WRITEATTRIBUTES
876     | WINSTA_ACCESSGLOBALATOMS | WINSTA_EXITWINDOWS | WINSTA_ENUMERATE | WINSTA_READSCREEN;
877 pub const CWF_CREATE_ONLY: DWORD = 0x00000001;
878 pub const WSF_VISIBLE: DWORD = 0x0001;
879 extern "system" {
CreateWindowStationA( lpwinsta: LPCSTR, dwFlags: DWORD, dwDesiredAccess: ACCESS_MASK, lpsa: LPSECURITY_ATTRIBUTES, ) -> HWINSTA880     pub fn CreateWindowStationA(
881         lpwinsta: LPCSTR,
882         dwFlags: DWORD,
883         dwDesiredAccess: ACCESS_MASK,
884         lpsa: LPSECURITY_ATTRIBUTES,
885     ) -> HWINSTA;
CreateWindowStationW( lpwinsta: LPCWSTR, dwFlags: DWORD, dwDesiredAccess: ACCESS_MASK, lpsa: LPSECURITY_ATTRIBUTES, ) -> HWINSTA886     pub fn CreateWindowStationW(
887         lpwinsta: LPCWSTR,
888         dwFlags: DWORD,
889         dwDesiredAccess: ACCESS_MASK,
890         lpsa: LPSECURITY_ATTRIBUTES,
891     ) -> HWINSTA;
OpenWindowStationA( lpszWinSta: LPCSTR, fInherit: BOOL, dwDesiredAccess: ACCESS_MASK, ) -> HWINSTA892     pub fn OpenWindowStationA(
893         lpszWinSta: LPCSTR,
894         fInherit: BOOL,
895         dwDesiredAccess: ACCESS_MASK,
896     ) -> HWINSTA;
OpenWindowStationW( lpszWinSta: LPCWSTR, fInherit: BOOL, dwDesiredAccess: ACCESS_MASK, ) -> HWINSTA897     pub fn OpenWindowStationW(
898         lpszWinSta: LPCWSTR,
899         fInherit: BOOL,
900         dwDesiredAccess: ACCESS_MASK,
901     ) -> HWINSTA;
EnumWindowStationsA( lpEnumFunc: WINSTAENUMPROCA, lParam: LPARAM, ) -> BOOL902     pub fn EnumWindowStationsA(
903         lpEnumFunc: WINSTAENUMPROCA,
904         lParam: LPARAM,
905     ) -> BOOL;
EnumWindowStationsW( lpEnumFunc: WINSTAENUMPROCW, lParam: LPARAM, ) -> BOOL906     pub fn EnumWindowStationsW(
907         lpEnumFunc: WINSTAENUMPROCW,
908         lParam: LPARAM,
909     ) -> BOOL;
CloseWindowStation( hWinSta: HWINSTA, ) -> BOOL910     pub fn CloseWindowStation(
911         hWinSta: HWINSTA,
912     ) -> BOOL;
SetProcessWindowStation( hWinSta: HWINSTA, ) -> BOOL913     pub fn SetProcessWindowStation(
914         hWinSta: HWINSTA,
915     ) -> BOOL;
GetProcessWindowStation( ) -> HWINSTA916     pub fn GetProcessWindowStation(
917     ) -> HWINSTA;
SetUserObjectSecurity( hObj: HANDLE, pSIRequested: PSECURITY_INFORMATION, pSID: PSECURITY_DESCRIPTOR, ) -> BOOL918     pub fn SetUserObjectSecurity(
919         hObj: HANDLE,
920         pSIRequested: PSECURITY_INFORMATION,
921         pSID: PSECURITY_DESCRIPTOR,
922     ) -> BOOL;
GetUserObjectSecurity( hObj: HANDLE, pSIRequested: PSECURITY_INFORMATION, pSID: PSECURITY_DESCRIPTOR, nLength: DWORD, lpnLengthNeeded: LPDWORD, ) -> BOOL923     pub fn GetUserObjectSecurity(
924         hObj: HANDLE,
925         pSIRequested: PSECURITY_INFORMATION,
926         pSID: PSECURITY_DESCRIPTOR,
927         nLength: DWORD,
928         lpnLengthNeeded: LPDWORD,
929     ) -> BOOL;
930 }
931 pub const UOI_FLAGS: DWORD = 1;
932 pub const UOI_NAME: DWORD = 2;
933 pub const UOI_TYPE: DWORD = 3;
934 pub const UOI_USER_SID: DWORD = 4;
935 pub const UOI_HEAPSIZE: DWORD = 5;
936 pub const UOI_IO: DWORD = 6;
937 pub const UOI_TIMERPROC_EXCEPTION_SUPPRESSION: DWORD = 7;
938 STRUCT!{struct USEROBJECTFLAGS {
939     fInherit: BOOL,
940     fReserved: BOOL,
941     dwFlags: DWORD,
942 }}
943 pub type PUSEROBJECTFLAGS = *mut USEROBJECTFLAGS;
944 extern "system" {
GetUserObjectInformationA( hObj: HANDLE, nIndex: c_int, pvInfo: PVOID, nLength: DWORD, lpnLengthNeeded: LPDWORD, ) -> BOOL945     pub fn GetUserObjectInformationA(
946         hObj: HANDLE,
947         nIndex: c_int,
948         pvInfo: PVOID,
949         nLength: DWORD,
950         lpnLengthNeeded: LPDWORD,
951     ) -> BOOL;
GetUserObjectInformationW( hObj: HANDLE, nIndex: c_int, pvInfo: PVOID, nLength: DWORD, lpnLengthNeeded: LPDWORD, ) -> BOOL952     pub fn GetUserObjectInformationW(
953         hObj: HANDLE,
954         nIndex: c_int,
955         pvInfo: PVOID,
956         nLength: DWORD,
957         lpnLengthNeeded: LPDWORD,
958     ) -> BOOL;
SetUserObjectInformationA( hObj: HANDLE, nIndex: c_int, pvInfo: PVOID, nLength: DWORD, ) -> BOOL959     pub fn SetUserObjectInformationA(
960         hObj: HANDLE,
961         nIndex: c_int,
962         pvInfo: PVOID,
963         nLength: DWORD,
964     ) -> BOOL;
SetUserObjectInformationW( hObj: HANDLE, nIndex: c_int, pvInfo: PVOID, nLength: DWORD, ) -> BOOL965     pub fn SetUserObjectInformationW(
966         hObj: HANDLE,
967         nIndex: c_int,
968         pvInfo: PVOID,
969         nLength: DWORD,
970     ) -> BOOL;
971 }
972 STRUCT!{struct WNDCLASSEXA {
973     cbSize: UINT,
974     style: UINT,
975     lpfnWndProc: WNDPROC,
976     cbClsExtra: c_int,
977     cbWndExtra: c_int,
978     hInstance: HINSTANCE,
979     hIcon: HICON,
980     hCursor: HCURSOR,
981     hbrBackground: HBRUSH,
982     lpszMenuName: LPCSTR,
983     lpszClassName: LPCSTR,
984     hIconSm: HICON,
985 }}
986 pub type PWNDCLASSEXA = *mut WNDCLASSEXA;
987 pub type NPWNDCLASSEXA = *mut WNDCLASSEXA;
988 pub type LPWNDCLASSEXA = *mut WNDCLASSEXA;
989 STRUCT!{struct WNDCLASSEXW {
990     cbSize: UINT,
991     style: UINT,
992     lpfnWndProc: WNDPROC,
993     cbClsExtra: c_int,
994     cbWndExtra: c_int,
995     hInstance: HINSTANCE,
996     hIcon: HICON,
997     hCursor: HCURSOR,
998     hbrBackground: HBRUSH,
999     lpszMenuName: LPCWSTR,
1000     lpszClassName: LPCWSTR,
1001     hIconSm: HICON,
1002 }}
1003 pub type PWNDCLASSEXW = *mut WNDCLASSEXW;
1004 pub type NPWNDCLASSEXW = *mut WNDCLASSEXW;
1005 pub type LPWNDCLASSEXW = *mut WNDCLASSEXW;
1006 STRUCT!{struct WNDCLASSA {
1007     style: UINT,
1008     lpfnWndProc: WNDPROC,
1009     cbClsExtra: c_int,
1010     cbWndExtra: c_int,
1011     hInstance: HINSTANCE,
1012     hIcon: HICON,
1013     hCursor: HCURSOR,
1014     hbrBackground: HBRUSH,
1015     lpszMenuName: LPCSTR,
1016     lpszClassName: LPCSTR,
1017 }}
1018 pub type PWNDCLASSA = *mut WNDCLASSA;
1019 pub type NPWNDCLASSA = *mut WNDCLASSA;
1020 pub type LPWNDCLASSA = *mut WNDCLASSA;
1021 STRUCT!{struct WNDCLASSW {
1022     style: UINT,
1023     lpfnWndProc: WNDPROC,
1024     cbClsExtra: c_int,
1025     cbWndExtra: c_int,
1026     hInstance: HINSTANCE,
1027     hIcon: HICON,
1028     hCursor: HCURSOR,
1029     hbrBackground: HBRUSH,
1030     lpszMenuName: LPCWSTR,
1031     lpszClassName: LPCWSTR,
1032 }}
1033 pub type PWNDCLASSW = *mut WNDCLASSW;
1034 pub type NPWNDCLASSW = *mut WNDCLASSW;
1035 pub type LPWNDCLASSW = *mut WNDCLASSW;
1036 extern "system" {
IsHungAppWindow( hwnd: HWND, ) -> BOOL1037     pub fn IsHungAppWindow(
1038         hwnd: HWND,
1039     ) -> BOOL;
DisableProcessWindowsGhosting()1040     pub fn DisableProcessWindowsGhosting();
1041 }
1042 STRUCT!{struct MSG {
1043     hwnd: HWND,
1044     message: UINT,
1045     wParam: WPARAM,
1046     lParam: LPARAM,
1047     time: DWORD,
1048     pt: POINT,
1049 }}
1050 pub type PMSG = *mut MSG;
1051 pub type NPMSG = *mut MSG;
1052 pub type LPMSG = *mut MSG;
1053 //POINTSTOPOINT
1054 //POINTTOPOINTS
1055 //MAKEWPARAM
1056 //MAKELPARAM
1057 //MAKELRESULT
1058 pub const GWL_WNDPROC: c_int = -4;
1059 pub const GWL_HINSTANCE: c_int = -6;
1060 pub const GWL_HWNDPARENT: c_int = -8;
1061 pub const GWL_STYLE: c_int = -16;
1062 pub const GWL_EXSTYLE: c_int = -20;
1063 pub const GWL_USERDATA: c_int = -21;
1064 pub const GWL_ID: c_int = -12;
1065 pub const GWLP_WNDPROC: c_int = -4;
1066 pub const GWLP_HINSTANCE: c_int = -6;
1067 pub const GWLP_HWNDPARENT: c_int = -8;
1068 pub const GWLP_USERDATA: c_int = -21;
1069 pub const GWLP_ID: c_int = -12;
1070 pub const GCL_MENUNAME: c_int = -8;
1071 pub const GCL_HBRBACKGROUND: c_int = -10;
1072 pub const GCL_HCURSOR: c_int = -12;
1073 pub const GCL_HICON: c_int = -14;
1074 pub const GCL_HMODULE: c_int = -16;
1075 pub const GCL_CBWNDEXTRA: c_int = -18;
1076 pub const GCL_CBCLSEXTRA: c_int = -20;
1077 pub const GCL_WNDPROC: c_int = -24;
1078 pub const GCL_STYLE: c_int = -26;
1079 pub const GCW_ATOM: c_int = -32;
1080 pub const GCL_HICONSM: c_int = -34;
1081 pub const GCLP_MENUNAME: c_int = -8;
1082 pub const GCLP_HBRBACKGROUND: c_int = -10;
1083 pub const GCLP_HCURSOR: c_int = -12;
1084 pub const GCLP_HICON: c_int = -14;
1085 pub const GCLP_HMODULE: c_int = -16;
1086 pub const GCLP_WNDPROC: c_int = -24;
1087 pub const GCLP_HICONSM: c_int = -34;
1088 pub const WM_NULL: UINT = 0x0000;
1089 pub const WM_CREATE: UINT = 0x0001;
1090 pub const WM_DESTROY: UINT = 0x0002;
1091 pub const WM_MOVE: UINT = 0x0003;
1092 pub const WM_SIZE: UINT = 0x0005;
1093 pub const WM_ACTIVATE: UINT = 0x0006;
1094 pub const WA_INACTIVE: WORD = 0;
1095 pub const WA_ACTIVE: WORD = 1;
1096 pub const WA_CLICKACTIVE: WORD = 2;
1097 pub const WM_SETFOCUS: UINT = 0x0007;
1098 pub const WM_KILLFOCUS: UINT = 0x0008;
1099 pub const WM_ENABLE: UINT = 0x000A;
1100 pub const WM_SETREDRAW: UINT = 0x000B;
1101 pub const WM_SETTEXT: UINT = 0x000C;
1102 pub const WM_GETTEXT: UINT = 0x000D;
1103 pub const WM_GETTEXTLENGTH: UINT = 0x000E;
1104 pub const WM_PAINT: UINT = 0x000F;
1105 pub const WM_CLOSE: UINT = 0x0010;
1106 pub const WM_QUERYENDSESSION: UINT = 0x0011;
1107 pub const WM_QUERYOPEN: UINT = 0x0013;
1108 pub const WM_ENDSESSION: UINT = 0x0016;
1109 pub const WM_QUIT: UINT = 0x0012;
1110 pub const WM_ERASEBKGND: UINT = 0x0014;
1111 pub const WM_SYSCOLORCHANGE: UINT = 0x0015;
1112 pub const WM_SHOWWINDOW: UINT = 0x0018;
1113 pub const WM_WININICHANGE: UINT = 0x001A;
1114 pub const WM_SETTINGCHANGE: UINT = WM_WININICHANGE;
1115 pub const WM_DEVMODECHANGE: UINT = 0x001B;
1116 pub const WM_ACTIVATEAPP: UINT = 0x001C;
1117 pub const WM_FONTCHANGE: UINT = 0x001D;
1118 pub const WM_TIMECHANGE: UINT = 0x001E;
1119 pub const WM_CANCELMODE: UINT = 0x001F;
1120 pub const WM_SETCURSOR: UINT = 0x0020;
1121 pub const WM_MOUSEACTIVATE: UINT = 0x0021;
1122 pub const WM_CHILDACTIVATE: UINT = 0x0022;
1123 pub const WM_QUEUESYNC: UINT = 0x0023;
1124 pub const WM_GETMINMAXINFO: UINT = 0x0024;
1125 STRUCT!{struct MINMAXINFO {
1126     ptReserved: POINT,
1127     ptMaxSize: POINT,
1128     ptMaxPosition: POINT,
1129     ptMinTrackSize: POINT,
1130     ptMaxTrackSize: POINT,
1131 }}
1132 pub type PMINMAXINFO = *mut MINMAXINFO;
1133 pub type LPMINMAXINFO = *mut MINMAXINFO;
1134 pub const WM_PAINTICON: UINT = 0x0026;
1135 pub const WM_ICONERASEBKGND: UINT = 0x0027;
1136 pub const WM_NEXTDLGCTL: UINT = 0x0028;
1137 pub const WM_SPOOLERSTATUS: UINT = 0x002A;
1138 pub const WM_DRAWITEM: UINT = 0x002B;
1139 pub const WM_MEASUREITEM: UINT = 0x002C;
1140 pub const WM_DELETEITEM: UINT = 0x002D;
1141 pub const WM_VKEYTOITEM: UINT = 0x002E;
1142 pub const WM_CHARTOITEM: UINT = 0x002F;
1143 pub const WM_SETFONT: UINT = 0x0030;
1144 pub const WM_GETFONT: UINT = 0x0031;
1145 pub const WM_SETHOTKEY: UINT = 0x0032;
1146 pub const WM_GETHOTKEY: UINT = 0x0033;
1147 pub const WM_QUERYDRAGICON: UINT = 0x0037;
1148 pub const WM_COMPAREITEM: UINT = 0x0039;
1149 pub const WM_GETOBJECT: UINT = 0x003D;
1150 pub const WM_COMPACTING: UINT = 0x0041;
1151 pub const WM_COMMNOTIFY: UINT = 0x0044;
1152 pub const WM_WINDOWPOSCHANGING: UINT = 0x0046;
1153 pub const WM_WINDOWPOSCHANGED: UINT = 0x0047;
1154 pub const WM_POWER: UINT = 0x0048;
1155 pub const PWR_OK: WPARAM = 1;
1156 pub const PWR_FAIL: WPARAM = -1isize as usize;
1157 pub const PWR_SUSPENDREQUEST: WPARAM = 1;
1158 pub const PWR_SUSPENDRESUME: WPARAM = 2;
1159 pub const PWR_CRITICALRESUME: WPARAM = 3;
1160 pub const WM_COPYDATA: UINT = 0x004A;
1161 pub const WM_CANCELJOURNAL: UINT = 0x004B;
1162 STRUCT!{struct COPYDATASTRUCT {
1163     dwData: ULONG_PTR,
1164     cbData: DWORD,
1165     lpData: PVOID,
1166 }}
1167 pub type PCOPYDATASTRUCT = *mut COPYDATASTRUCT;
1168 STRUCT!{struct MDINEXTMENU {
1169     hmenuIn: HMENU,
1170     hmenuNext: HMENU,
1171     hwndNext: HWND,
1172 }}
1173 pub type PMDINEXTMENU = *mut MDINEXTMENU;
1174 pub type LPMDINEXTMENU = *mut MDINEXTMENU;
1175 pub const WM_NOTIFY: UINT = 0x004E;
1176 pub const WM_INPUTLANGCHANGEREQUEST: UINT = 0x0050;
1177 pub const WM_INPUTLANGCHANGE: UINT = 0x0051;
1178 pub const WM_TCARD: UINT = 0x0052;
1179 pub const WM_HELP: UINT = 0x0053;
1180 pub const WM_USERCHANGED: UINT = 0x0054;
1181 pub const WM_NOTIFYFORMAT: UINT = 0x0055;
1182 pub const NFR_ANSI: LRESULT = 1;
1183 pub const NFR_UNICODE: LRESULT = 2;
1184 pub const NF_QUERY: LPARAM = 3;
1185 pub const NF_REQUERY: LPARAM = 4;
1186 pub const WM_CONTEXTMENU: UINT = 0x007B;
1187 pub const WM_STYLECHANGING: UINT = 0x007C;
1188 pub const WM_STYLECHANGED: UINT = 0x007D;
1189 pub const WM_DISPLAYCHANGE: UINT = 0x007E;
1190 pub const WM_GETICON: UINT = 0x007F;
1191 pub const WM_SETICON: UINT = 0x0080;
1192 pub const WM_NCCREATE: UINT = 0x0081;
1193 pub const WM_NCDESTROY: UINT = 0x0082;
1194 pub const WM_NCCALCSIZE: UINT = 0x0083;
1195 pub const WM_NCHITTEST: UINT = 0x0084;
1196 pub const WM_NCPAINT: UINT = 0x0085;
1197 pub const WM_NCACTIVATE: UINT = 0x0086;
1198 pub const WM_GETDLGCODE: UINT = 0x0087;
1199 pub const WM_SYNCPAINT: UINT = 0x0088;
1200 pub const WM_NCMOUSEMOVE: UINT = 0x00A0;
1201 pub const WM_NCLBUTTONDOWN: UINT = 0x00A1;
1202 pub const WM_NCLBUTTONUP: UINT = 0x00A2;
1203 pub const WM_NCLBUTTONDBLCLK: UINT = 0x00A3;
1204 pub const WM_NCRBUTTONDOWN: UINT = 0x00A4;
1205 pub const WM_NCRBUTTONUP: UINT = 0x00A5;
1206 pub const WM_NCRBUTTONDBLCLK: UINT = 0x00A6;
1207 pub const WM_NCMBUTTONDOWN: UINT = 0x00A7;
1208 pub const WM_NCMBUTTONUP: UINT = 0x00A8;
1209 pub const WM_NCMBUTTONDBLCLK: UINT = 0x00A9;
1210 pub const WM_NCXBUTTONDOWN: UINT = 0x00AB;
1211 pub const WM_NCXBUTTONUP: UINT = 0x00AC;
1212 pub const WM_NCXBUTTONDBLCLK: UINT = 0x00AD;
1213 pub const WM_INPUT_DEVICE_CHANGE: UINT = 0x00FE;
1214 pub const WM_INPUT: UINT = 0x00FF;
1215 pub const WM_KEYFIRST: UINT = 0x0100;
1216 pub const WM_KEYDOWN: UINT = 0x0100;
1217 pub const WM_KEYUP: UINT = 0x0101;
1218 pub const WM_CHAR: UINT = 0x0102;
1219 pub const WM_DEADCHAR: UINT = 0x0103;
1220 pub const WM_SYSKEYDOWN: UINT = 0x0104;
1221 pub const WM_SYSKEYUP: UINT = 0x0105;
1222 pub const WM_SYSCHAR: UINT = 0x0106;
1223 pub const WM_SYSDEADCHAR: UINT = 0x0107;
1224 pub const WM_UNICHAR: UINT = 0x0109;
1225 pub const WM_KEYLAST: UINT = 0x0109;
1226 pub const UNICODE_NOCHAR: WPARAM = 0xFFFF;
1227 pub const WM_IME_STARTCOMPOSITION: UINT = 0x010D;
1228 pub const WM_IME_ENDCOMPOSITION: UINT = 0x010E;
1229 pub const WM_IME_COMPOSITION: UINT = 0x010F;
1230 pub const WM_IME_KEYLAST: UINT = 0x010F;
1231 pub const WM_INITDIALOG: UINT = 0x0110;
1232 pub const WM_COMMAND: UINT = 0x0111;
1233 pub const WM_SYSCOMMAND: UINT = 0x0112;
1234 pub const WM_TIMER: UINT = 0x0113;
1235 pub const WM_HSCROLL: UINT = 0x0114;
1236 pub const WM_VSCROLL: UINT = 0x0115;
1237 pub const WM_INITMENU: UINT = 0x0116;
1238 pub const WM_INITMENUPOPUP: UINT = 0x0117;
1239 pub const WM_GESTURE: UINT = 0x0119;
1240 pub const WM_GESTURENOTIFY: UINT = 0x011A;
1241 pub const WM_MENUSELECT: UINT = 0x011F;
1242 pub const WM_MENUCHAR: UINT = 0x0120;
1243 pub const WM_ENTERIDLE: UINT = 0x0121;
1244 pub const WM_MENURBUTTONUP: UINT = 0x0122;
1245 pub const WM_MENUDRAG: UINT = 0x0123;
1246 pub const WM_MENUGETOBJECT: UINT = 0x0124;
1247 pub const WM_UNINITMENUPOPUP: UINT = 0x0125;
1248 pub const WM_MENUCOMMAND: UINT = 0x0126;
1249 pub const WM_CHANGEUISTATE: UINT = 0x0127;
1250 pub const WM_UPDATEUISTATE: UINT = 0x0128;
1251 pub const WM_QUERYUISTATE: UINT = 0x0129;
1252 pub const UIS_SET: WORD = 1;
1253 pub const UIS_CLEAR: WORD = 2;
1254 pub const UIS_INITIALIZE: WORD = 3;
1255 pub const UISF_HIDEFOCUS: WORD = 0x1;
1256 pub const UISF_HIDEACCEL: WORD = 0x2;
1257 pub const UISF_ACTIVE: WORD = 0x4;
1258 pub const WM_CTLCOLORMSGBOX: UINT = 0x0132;
1259 pub const WM_CTLCOLOREDIT: UINT = 0x0133;
1260 pub const WM_CTLCOLORLISTBOX: UINT = 0x0134;
1261 pub const WM_CTLCOLORBTN: UINT = 0x0135;
1262 pub const WM_CTLCOLORDLG: UINT = 0x0136;
1263 pub const WM_CTLCOLORSCROLLBAR: UINT = 0x0137;
1264 pub const WM_CTLCOLORSTATIC: UINT = 0x0138;
1265 pub const MN_GETHMENU: UINT = 0x01E1;
1266 pub const WM_MOUSEFIRST: UINT = 0x0200;
1267 pub const WM_MOUSEMOVE: UINT = 0x0200;
1268 pub const WM_LBUTTONDOWN: UINT = 0x0201;
1269 pub const WM_LBUTTONUP: UINT = 0x0202;
1270 pub const WM_LBUTTONDBLCLK: UINT = 0x0203;
1271 pub const WM_RBUTTONDOWN: UINT = 0x0204;
1272 pub const WM_RBUTTONUP: UINT = 0x0205;
1273 pub const WM_RBUTTONDBLCLK: UINT = 0x0206;
1274 pub const WM_MBUTTONDOWN: UINT = 0x0207;
1275 pub const WM_MBUTTONUP: UINT = 0x0208;
1276 pub const WM_MBUTTONDBLCLK: UINT = 0x0209;
1277 pub const WM_MOUSEWHEEL: UINT = 0x020A;
1278 pub const WM_XBUTTONDOWN: UINT = 0x020B;
1279 pub const WM_XBUTTONUP: UINT = 0x020C;
1280 pub const WM_XBUTTONDBLCLK: UINT = 0x020D;
1281 pub const WM_MOUSEHWHEEL: UINT = 0x020E;
1282 pub const WM_MOUSELAST: UINT = 0x020E;
1283 pub const WHEEL_DELTA: c_short = 120;
1284 #[inline]
GET_WHEEL_DELTA_WPARAM(wParam: WPARAM) -> c_short1285 pub fn GET_WHEEL_DELTA_WPARAM(wParam: WPARAM) -> c_short {
1286     HIWORD(wParam as DWORD) as c_short
1287 }
1288 pub const WHEEL_PAGESCROLL: UINT = UINT_MAX;
1289 #[inline]
GET_KEYSTATE_WPARAM(wParam: WPARAM) -> WORD1290 pub fn GET_KEYSTATE_WPARAM(wParam: WPARAM) -> WORD {
1291     LOWORD(wParam as DWORD)
1292 }
1293 #[inline]
GET_NCHITTEST_WPARAM(wParam: WPARAM) -> c_short1294 pub fn GET_NCHITTEST_WPARAM(wParam: WPARAM) -> c_short {
1295     LOWORD(wParam as DWORD) as c_short
1296 }
1297 #[inline]
GET_XBUTTON_WPARAM(wParam: WPARAM) -> WORD1298 pub fn GET_XBUTTON_WPARAM(wParam: WPARAM) -> WORD {
1299     HIWORD(wParam as DWORD)
1300 }
1301 pub const XBUTTON1: WORD = 0x0001;
1302 pub const XBUTTON2: WORD = 0x0002;
1303 pub const WM_PARENTNOTIFY: UINT = 0x0210;
1304 pub const WM_ENTERMENULOOP: UINT = 0x0211;
1305 pub const WM_EXITMENULOOP: UINT = 0x0212;
1306 pub const WM_NEXTMENU: UINT = 0x0213;
1307 pub const WM_SIZING: UINT = 0x0214;
1308 pub const WM_CAPTURECHANGED: UINT = 0x0215;
1309 pub const WM_MOVING: UINT = 0x0216;
1310 pub const WM_POWERBROADCAST: UINT = 0x0218;
1311 pub const PBT_APMQUERYSUSPEND: WPARAM = 0x0000;
1312 pub const PBT_APMQUERYSTANDBY: WPARAM = 0x0001;
1313 pub const PBT_APMQUERYSUSPENDFAILED: WPARAM = 0x0002;
1314 pub const PBT_APMQUERYSTANDBYFAILED: WPARAM = 0x0003;
1315 pub const PBT_APMSUSPEND: WPARAM = 0x0004;
1316 pub const PBT_APMSTANDBY: WPARAM = 0x0005;
1317 pub const PBT_APMRESUMECRITICAL: WPARAM = 0x0006;
1318 pub const PBT_APMRESUMESUSPEND: WPARAM = 0x0007;
1319 pub const PBT_APMRESUMESTANDBY: WPARAM = 0x0008;
1320 pub const PBTF_APMRESUMEFROMFAILURE: LPARAM = 0x00000001;
1321 pub const PBT_APMBATTERYLOW: WPARAM = 0x0009;
1322 pub const PBT_APMPOWERSTATUSCHANGE: WPARAM = 0x000A;
1323 pub const PBT_APMOEMEVENT: WPARAM = 0x000B;
1324 pub const PBT_APMRESUMEAUTOMATIC: WPARAM = 0x0012;
1325 pub const PBT_POWERSETTINGCHANGE: WPARAM = 0x8013;
1326 STRUCT!{struct POWERBROADCAST_SETTING {
1327     PowerSetting: GUID,
1328     DataLength: DWORD,
1329     Data: [UCHAR; 1],
1330 }}
1331 pub type PPOWERBROADCAST_SETTING = *mut POWERBROADCAST_SETTING;
1332 pub const WM_DEVICECHANGE: UINT = 0x0219;
1333 pub const WM_MDICREATE: UINT = 0x0220;
1334 pub const WM_MDIDESTROY: UINT = 0x0221;
1335 pub const WM_MDIACTIVATE: UINT = 0x0222;
1336 pub const WM_MDIRESTORE: UINT = 0x0223;
1337 pub const WM_MDINEXT: UINT = 0x0224;
1338 pub const WM_MDIMAXIMIZE: UINT = 0x0225;
1339 pub const WM_MDITILE: UINT = 0x0226;
1340 pub const WM_MDICASCADE: UINT = 0x0227;
1341 pub const WM_MDIICONARRANGE: UINT = 0x0228;
1342 pub const WM_MDIGETACTIVE: UINT = 0x0229;
1343 pub const WM_MDISETMENU: UINT = 0x0230;
1344 pub const WM_ENTERSIZEMOVE: UINT = 0x0231;
1345 pub const WM_EXITSIZEMOVE: UINT = 0x0232;
1346 pub const WM_DROPFILES: UINT = 0x0233;
1347 pub const WM_MDIREFRESHMENU: UINT = 0x0234;
1348 pub const WM_POINTERDEVICECHANGE: UINT = 0x238;
1349 pub const WM_POINTERDEVICEINRANGE: UINT = 0x239;
1350 pub const WM_POINTERDEVICEOUTOFRANGE: UINT = 0x23A;
1351 pub const WM_TOUCH: UINT = 0x0240;
1352 pub const WM_NCPOINTERUPDATE: UINT = 0x0241;
1353 pub const WM_NCPOINTERDOWN: UINT = 0x0242;
1354 pub const WM_NCPOINTERUP: UINT = 0x0243;
1355 pub const WM_POINTERUPDATE: UINT = 0x0245;
1356 pub const WM_POINTERDOWN: UINT = 0x0246;
1357 pub const WM_POINTERUP: UINT = 0x0247;
1358 pub const WM_POINTERENTER: UINT = 0x0249;
1359 pub const WM_POINTERLEAVE: UINT = 0x024A;
1360 pub const WM_POINTERACTIVATE: UINT = 0x024B;
1361 pub const WM_POINTERCAPTURECHANGED: UINT = 0x024C;
1362 pub const WM_TOUCHHITTESTING: UINT = 0x024D;
1363 pub const WM_POINTERWHEEL: UINT = 0x024E;
1364 pub const WM_POINTERHWHEEL: UINT = 0x024F;
1365 pub const DM_POINTERHITTEST: UINT = 0x0250;
1366 pub const WM_POINTERROUTEDTO: UINT = 0x0251;
1367 pub const WM_POINTERROUTEDAWAY: UINT = 0x0252;
1368 pub const WM_POINTERROUTEDRELEASED: UINT = 0x0253;
1369 pub const WM_IME_SETCONTEXT: UINT = 0x0281;
1370 pub const WM_IME_NOTIFY: UINT = 0x0282;
1371 pub const WM_IME_CONTROL: UINT = 0x0283;
1372 pub const WM_IME_COMPOSITIONFULL: UINT = 0x0284;
1373 pub const WM_IME_SELECT: UINT = 0x0285;
1374 pub const WM_IME_CHAR: UINT = 0x0286;
1375 pub const WM_IME_REQUEST: UINT = 0x0288;
1376 pub const WM_IME_KEYDOWN: UINT = 0x0290;
1377 pub const WM_IME_KEYUP: UINT = 0x0291;
1378 pub const WM_MOUSEHOVER: UINT = 0x02A1;
1379 pub const WM_MOUSELEAVE: UINT = 0x02A3;
1380 pub const WM_NCMOUSEHOVER: UINT = 0x02A0;
1381 pub const WM_NCMOUSELEAVE: UINT = 0x02A2;
1382 pub const WM_WTSSESSION_CHANGE: UINT = 0x02B1;
1383 pub const WM_TABLET_FIRST: UINT = 0x02c0;
1384 pub const WM_TABLET_LAST: UINT = 0x02df;
1385 pub const WM_DPICHANGED: UINT = 0x02E0;
1386 pub const WM_CUT: UINT = 0x0300;
1387 pub const WM_COPY: UINT = 0x0301;
1388 pub const WM_PASTE: UINT = 0x0302;
1389 pub const WM_CLEAR: UINT = 0x0303;
1390 pub const WM_UNDO: UINT = 0x0304;
1391 pub const WM_RENDERFORMAT: UINT = 0x0305;
1392 pub const WM_RENDERALLFORMATS: UINT = 0x0306;
1393 pub const WM_DESTROYCLIPBOARD: UINT = 0x0307;
1394 pub const WM_DRAWCLIPBOARD: UINT = 0x0308;
1395 pub const WM_PAINTCLIPBOARD: UINT = 0x0309;
1396 pub const WM_VSCROLLCLIPBOARD: UINT = 0x030A;
1397 pub const WM_SIZECLIPBOARD: UINT = 0x030B;
1398 pub const WM_ASKCBFORMATNAME: UINT = 0x030C;
1399 pub const WM_CHANGECBCHAIN: UINT = 0x030D;
1400 pub const WM_HSCROLLCLIPBOARD: UINT = 0x030E;
1401 pub const WM_QUERYNEWPALETTE: UINT = 0x030F;
1402 pub const WM_PALETTEISCHANGING: UINT = 0x0310;
1403 pub const WM_PALETTECHANGED: UINT = 0x0311;
1404 pub const WM_HOTKEY: UINT = 0x0312;
1405 pub const WM_PRINT: UINT = 0x0317;
1406 pub const WM_PRINTCLIENT: UINT = 0x0318;
1407 pub const WM_APPCOMMAND: UINT = 0x0319;
1408 pub const WM_THEMECHANGED: UINT = 0x031A;
1409 pub const WM_CLIPBOARDUPDATE: UINT = 0x031D;
1410 pub const WM_DWMCOMPOSITIONCHANGED: UINT = 0x031E;
1411 pub const WM_DWMNCRENDERINGCHANGED: UINT = 0x031F;
1412 pub const WM_DWMCOLORIZATIONCOLORCHANGED: UINT = 0x0320;
1413 pub const WM_DWMWINDOWMAXIMIZEDCHANGE: UINT = 0x0321;
1414 pub const WM_DWMSENDICONICTHUMBNAIL: UINT = 0x0323;
1415 pub const WM_DWMSENDICONICLIVEPREVIEWBITMAP: UINT = 0x0326;
1416 pub const WM_GETTITLEBARINFOEX: UINT = 0x033F;
1417 pub const WM_HANDHELDFIRST: UINT = 0x0358;
1418 pub const WM_HANDHELDLAST: UINT = 0x035F;
1419 pub const WM_AFXFIRST: UINT = 0x0360;
1420 pub const WM_AFXLAST: UINT = 0x037F;
1421 pub const WM_PENWINFIRST: UINT = 0x0380;
1422 pub const WM_PENWINLAST: UINT = 0x038F;
1423 pub const WM_APP: UINT = 0x8000;
1424 pub const WM_USER: UINT = 0x0400;
1425 pub const WMSZ_LEFT: UINT = 1;
1426 pub const WMSZ_RIGHT: UINT = 2;
1427 pub const WMSZ_TOP: UINT = 3;
1428 pub const WMSZ_TOPLEFT: UINT = 4;
1429 pub const WMSZ_TOPRIGHT: UINT = 5;
1430 pub const WMSZ_BOTTOM: UINT = 6;
1431 pub const WMSZ_BOTTOMLEFT: UINT = 7;
1432 pub const WMSZ_BOTTOMRIGHT: UINT = 8;
1433 pub const HTERROR: LRESULT = (-2);
1434 pub const HTTRANSPARENT: LRESULT = (-1);
1435 pub const HTNOWHERE: LRESULT = 0;
1436 pub const HTCLIENT: LRESULT = 1;
1437 pub const HTCAPTION: LRESULT = 2;
1438 pub const HTSYSMENU: LRESULT = 3;
1439 pub const HTGROWBOX: LRESULT = 4;
1440 pub const HTSIZE: LRESULT = HTGROWBOX;
1441 pub const HTMENU: LRESULT = 5;
1442 pub const HTHSCROLL: LRESULT = 6;
1443 pub const HTVSCROLL: LRESULT = 7;
1444 pub const HTMINBUTTON: LRESULT = 8;
1445 pub const HTMAXBUTTON: LRESULT = 9;
1446 pub const HTLEFT: LRESULT = 10;
1447 pub const HTRIGHT: LRESULT = 11;
1448 pub const HTTOP: LRESULT = 12;
1449 pub const HTTOPLEFT: LRESULT = 13;
1450 pub const HTTOPRIGHT: LRESULT = 14;
1451 pub const HTBOTTOM: LRESULT = 15;
1452 pub const HTBOTTOMLEFT: LRESULT = 16;
1453 pub const HTBOTTOMRIGHT: LRESULT = 17;
1454 pub const HTBORDER: LRESULT = 18;
1455 pub const HTREDUCE: LRESULT = HTMINBUTTON;
1456 pub const HTZOOM: LRESULT = HTMAXBUTTON;
1457 pub const HTSIZEFIRST: LRESULT = HTLEFT;
1458 pub const HTSIZELAST: LRESULT = HTBOTTOMRIGHT;
1459 pub const HTOBJECT: LRESULT = 19;
1460 pub const HTCLOSE: LRESULT = 20;
1461 pub const HTHELP: LRESULT = 21;
1462 pub const SMTO_NORMAL: UINT = 0x0000;
1463 pub const SMTO_BLOCK: UINT = 0x0001;
1464 pub const SMTO_ABORTIFHUNG: UINT = 0x0002;
1465 pub const SMTO_NOTIMEOUTIFNOTHUNG: UINT = 0x0008;
1466 pub const SMTO_ERRORONEXIT: UINT = 0x0020;
1467 pub const MA_ACTIVATE: UINT = 1;
1468 pub const MA_ACTIVATEANDEAT: UINT = 2;
1469 pub const MA_NOACTIVATE: UINT = 3;
1470 pub const MA_NOACTIVATEANDEAT: UINT = 4;
1471 pub const ICON_SMALL: UINT = 0;
1472 pub const ICON_BIG: UINT = 1;
1473 pub const ICON_SMALL2: UINT = 2;
1474 extern "system" {
RegisterWindowMessageA( lpString: LPCSTR, ) -> UINT1475     pub fn RegisterWindowMessageA(
1476         lpString: LPCSTR,
1477     ) -> UINT;
RegisterWindowMessageW( lpString: LPCWSTR, ) -> UINT1478     pub fn RegisterWindowMessageW(
1479         lpString: LPCWSTR,
1480     ) -> UINT;
1481 }
1482 pub const SIZE_RESTORED: WPARAM = 0;
1483 pub const SIZE_MINIMIZED: WPARAM = 1;
1484 pub const SIZE_MAXIMIZED: WPARAM = 2;
1485 pub const SIZE_MAXSHOW: WPARAM = 3;
1486 pub const SIZE_MAXHIDE: WPARAM = 4;
1487 pub const SIZENORMAL: WPARAM = SIZE_RESTORED;
1488 pub const SIZEICONIC: WPARAM = SIZE_MINIMIZED;
1489 pub const SIZEFULLSCREEN: WPARAM = SIZE_MAXIMIZED;
1490 pub const SIZEZOOMSHOW: WPARAM = SIZE_MAXSHOW;
1491 pub const SIZEZOOMHIDE: WPARAM = SIZE_MAXHIDE;
1492 STRUCT!{struct WINDOWPOS {
1493     hwnd: HWND,
1494     hwndInsertAfter: HWND,
1495     x: c_int,
1496     y: c_int,
1497     cx: c_int,
1498     cy: c_int,
1499     flags: UINT,
1500 }}
1501 pub type LPWINDOWPOS = *mut WINDOWPOS;
1502 pub type PWINDOWPOS = *mut WINDOWPOS;
1503 STRUCT!{struct NCCALCSIZE_PARAMS {
1504     rgrc: [RECT; 3],
1505     lppos: PWINDOWPOS,
1506 }}
1507 pub type LPNCCALCSIZE_PARAMS = *mut NCCALCSIZE_PARAMS;
1508 pub const WVR_ALIGNTOP: LRESULT = 0x0010;
1509 pub const WVR_ALIGNLEFT: LRESULT = 0x0020;
1510 pub const WVR_ALIGNBOTTOM: LRESULT = 0x0040;
1511 pub const WVR_ALIGNRIGHT: LRESULT = 0x0080;
1512 pub const WVR_HREDRAW: LRESULT = 0x0100;
1513 pub const WVR_VREDRAW: LRESULT = 0x0200;
1514 pub const WVR_REDRAW: LRESULT = WVR_HREDRAW | WVR_VREDRAW;
1515 pub const WVR_VALIDRECTS: LRESULT = 0x0400;
1516 pub const MK_LBUTTON: WPARAM = 0x0001;
1517 pub const MK_RBUTTON: WPARAM = 0x0002;
1518 pub const MK_SHIFT: WPARAM = 0x0004;
1519 pub const MK_CONTROL: WPARAM = 0x0008;
1520 pub const MK_MBUTTON: WPARAM = 0x0010;
1521 pub const MK_XBUTTON1: WPARAM = 0x0020;
1522 pub const MK_XBUTTON2: WPARAM = 0x0040;
1523 pub const TME_HOVER: DWORD = 0x00000001;
1524 pub const TME_LEAVE: DWORD = 0x00000002;
1525 pub const TME_NONCLIENT: DWORD = 0x00000010;
1526 pub const TME_QUERY: DWORD = 0x40000000;
1527 pub const TME_CANCEL: DWORD = 0x80000000;
1528 pub const HOVER_DEFAULT: DWORD = 0xFFFFFFFF;
1529 STRUCT!{struct TRACKMOUSEEVENT {
1530     cbSize: DWORD,
1531     dwFlags: DWORD,
1532     hwndTrack: HWND,
1533     dwHoverTime: DWORD,
1534 }}
1535 pub type LPTRACKMOUSEEVENT = *mut TRACKMOUSEEVENT;
1536 extern "system" {
TrackMouseEvent( lpEventTrack: LPTRACKMOUSEEVENT, ) -> BOOL1537     pub fn TrackMouseEvent(
1538         lpEventTrack: LPTRACKMOUSEEVENT,
1539     ) -> BOOL;
1540 }
1541 pub const WS_OVERLAPPED: DWORD = 0x00000000;
1542 pub const WS_POPUP: DWORD = 0x80000000;
1543 pub const WS_CHILD: DWORD = 0x40000000;
1544 pub const WS_MINIMIZE: DWORD = 0x20000000;
1545 pub const WS_VISIBLE: DWORD = 0x10000000;
1546 pub const WS_DISABLED: DWORD = 0x08000000;
1547 pub const WS_CLIPSIBLINGS: DWORD = 0x04000000;
1548 pub const WS_CLIPCHILDREN: DWORD = 0x02000000;
1549 pub const WS_MAXIMIZE: DWORD = 0x01000000;
1550 pub const WS_CAPTION: DWORD = 0x00C00000;
1551 pub const WS_BORDER: DWORD = 0x00800000;
1552 pub const WS_DLGFRAME: DWORD = 0x00400000;
1553 pub const WS_VSCROLL: DWORD = 0x00200000;
1554 pub const WS_HSCROLL: DWORD = 0x00100000;
1555 pub const WS_SYSMENU: DWORD = 0x00080000;
1556 pub const WS_THICKFRAME: DWORD = 0x00040000;
1557 pub const WS_GROUP: DWORD = 0x00020000;
1558 pub const WS_TABSTOP: DWORD = 0x00010000;
1559 pub const WS_MINIMIZEBOX: DWORD = 0x00020000;
1560 pub const WS_MAXIMIZEBOX: DWORD = 0x00010000;
1561 pub const WS_TILED: DWORD = WS_OVERLAPPED;
1562 pub const WS_ICONIC: DWORD = WS_MINIMIZE;
1563 pub const WS_SIZEBOX: DWORD = WS_THICKFRAME;
1564 pub const WS_TILEDWINDOW: DWORD = WS_OVERLAPPEDWINDOW;
1565 pub const WS_OVERLAPPEDWINDOW: DWORD = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
1566     | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
1567 pub const WS_POPUPWINDOW: DWORD = WS_POPUP | WS_BORDER | WS_SYSMENU;
1568 pub const WS_CHILDWINDOW: DWORD = WS_CHILD;
1569 pub const WS_EX_DLGMODALFRAME: DWORD = 0x00000001;
1570 pub const WS_EX_NOPARENTNOTIFY: DWORD = 0x00000004;
1571 pub const WS_EX_TOPMOST: DWORD = 0x00000008;
1572 pub const WS_EX_ACCEPTFILES: DWORD = 0x00000010;
1573 pub const WS_EX_TRANSPARENT: DWORD = 0x00000020;
1574 pub const WS_EX_MDICHILD: DWORD = 0x00000040;
1575 pub const WS_EX_TOOLWINDOW: DWORD = 0x00000080;
1576 pub const WS_EX_WINDOWEDGE: DWORD = 0x00000100;
1577 pub const WS_EX_CLIENTEDGE: DWORD = 0x00000200;
1578 pub const WS_EX_CONTEXTHELP: DWORD = 0x00000400;
1579 pub const WS_EX_RIGHT: DWORD = 0x00001000;
1580 pub const WS_EX_LEFT: DWORD = 0x00000000;
1581 pub const WS_EX_RTLREADING: DWORD = 0x00002000;
1582 pub const WS_EX_LTRREADING: DWORD = 0x00000000;
1583 pub const WS_EX_LEFTSCROLLBAR: DWORD = 0x00004000;
1584 pub const WS_EX_RIGHTSCROLLBAR: DWORD = 0x00000000;
1585 pub const WS_EX_CONTROLPARENT: DWORD = 0x00010000;
1586 pub const WS_EX_STATICEDGE: DWORD = 0x00020000;
1587 pub const WS_EX_APPWINDOW: DWORD = 0x00040000;
1588 pub const WS_EX_OVERLAPPEDWINDOW: DWORD = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE;
1589 pub const WS_EX_PALETTEWINDOW: DWORD = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
1590 pub const WS_EX_LAYERED: DWORD = 0x00080000;
1591 pub const WS_EX_NOINHERITLAYOUT: DWORD = 0x00100000;
1592 pub const WS_EX_NOREDIRECTIONBITMAP: DWORD = 0x00200000;
1593 pub const WS_EX_LAYOUTRTL: DWORD = 0x00400000;
1594 pub const WS_EX_COMPOSITED: DWORD = 0x02000000;
1595 pub const WS_EX_NOACTIVATE: DWORD = 0x08000000;
1596 pub const CS_VREDRAW: UINT = 0x0001;
1597 pub const CS_HREDRAW: UINT = 0x0002;
1598 pub const CS_DBLCLKS: UINT = 0x0008;
1599 pub const CS_OWNDC: UINT = 0x0020;
1600 pub const CS_CLASSDC: UINT = 0x0040;
1601 pub const CS_PARENTDC: UINT = 0x0080;
1602 pub const CS_NOCLOSE: UINT = 0x0200;
1603 pub const CS_SAVEBITS: UINT = 0x0800;
1604 pub const CS_BYTEALIGNCLIENT: UINT = 0x1000;
1605 pub const CS_BYTEALIGNWINDOW: UINT = 0x2000;
1606 pub const CS_GLOBALCLASS: UINT = 0x4000;
1607 pub const CS_IME: UINT = 0x00010000;
1608 pub const CS_DROPSHADOW: UINT = 0x00020000;
1609 pub const PRF_CHECKVISIBLE: UINT = 0x00000001;
1610 pub const PRF_NONCLIENT: UINT = 0x00000002;
1611 pub const PRF_CLIENT: UINT = 0x00000004;
1612 pub const PRF_ERASEBKGND: UINT = 0x00000008;
1613 pub const PRF_CHILDREN: UINT = 0x00000010;
1614 pub const PRF_OWNED: UINT = 0x00000020;
1615 pub const BDR_RAISEDOUTER: UINT = 0x0001;
1616 pub const BDR_SUNKENOUTER: UINT = 0x0002;
1617 pub const BDR_RAISEDINNER: UINT = 0x0004;
1618 pub const BDR_SUNKENINNER: UINT = 0x0008;
1619 pub const BDR_OUTER: UINT = BDR_RAISEDOUTER | BDR_SUNKENOUTER;
1620 pub const BDR_INNER: UINT = BDR_RAISEDINNER | BDR_SUNKENINNER;
1621 pub const BDR_RAISED: UINT = BDR_RAISEDOUTER | BDR_RAISEDINNER;
1622 pub const BDR_SUNKEN: UINT = BDR_SUNKENOUTER | BDR_SUNKENINNER;
1623 pub const EDGE_RAISED: UINT = BDR_RAISEDOUTER | BDR_RAISEDINNER;
1624 pub const EDGE_SUNKEN: UINT = BDR_SUNKENOUTER | BDR_SUNKENINNER;
1625 pub const EDGE_ETCHED: UINT = BDR_SUNKENOUTER | BDR_RAISEDINNER;
1626 pub const EDGE_BUMP: UINT = BDR_RAISEDOUTER | BDR_SUNKENINNER;
1627 pub const BF_LEFT: UINT = 0x0001;
1628 pub const BF_TOP: UINT = 0x0002;
1629 pub const BF_RIGHT: UINT = 0x0004;
1630 pub const BF_BOTTOM: UINT = 0x0008;
1631 pub const BF_TOPLEFT: UINT = BF_TOP | BF_LEFT;
1632 pub const BF_TOPRIGHT: UINT = BF_TOP | BF_RIGHT;
1633 pub const BF_BOTTOMLEFT: UINT = BF_BOTTOM | BF_LEFT;
1634 pub const BF_BOTTOMRIGHT: UINT = BF_BOTTOM | BF_RIGHT;
1635 pub const BF_RECT: UINT = BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM;
1636 pub const BF_DIAGONAL: UINT = 0x0010;
1637 pub const BF_DIAGONAL_ENDTOPRIGHT: UINT = BF_DIAGONAL | BF_TOP | BF_RIGHT;
1638 pub const BF_DIAGONAL_ENDTOPLEFT: UINT = BF_DIAGONAL | BF_TOP | BF_LEFT;
1639 pub const BF_DIAGONAL_ENDBOTTOMLEFT: UINT = BF_DIAGONAL | BF_BOTTOM | BF_LEFT;
1640 pub const BF_DIAGONAL_ENDBOTTOMRIGHT: UINT = BF_DIAGONAL | BF_BOTTOM | BF_RIGHT;
1641 pub const BF_MIDDLE: UINT = 0x0800;
1642 pub const BF_SOFT: UINT = 0x1000;
1643 pub const BF_ADJUST: UINT = 0x2000;
1644 pub const BF_FLAT: UINT = 0x4000;
1645 pub const BF_MONO: UINT = 0x8000;
1646 extern "system" {
DrawEdge( hdc: HDC, qrc: LPRECT, edge: UINT, grfFlags: UINT, ) -> BOOL1647     pub fn DrawEdge(
1648         hdc: HDC,
1649         qrc: LPRECT,
1650         edge: UINT,
1651         grfFlags: UINT,
1652     ) -> BOOL;
1653 }
1654 pub const DFC_CAPTION: UINT = 1;
1655 pub const DFC_MENU: UINT = 2;
1656 pub const DFC_SCROLL: UINT = 3;
1657 pub const DFC_BUTTON: UINT = 4;
1658 pub const DFC_POPUPMENU: UINT = 5;
1659 pub const DFCS_CAPTIONCLOSE: UINT = 0x0000;
1660 pub const DFCS_CAPTIONMIN: UINT = 0x0001;
1661 pub const DFCS_CAPTIONMAX: UINT = 0x0002;
1662 pub const DFCS_CAPTIONRESTORE: UINT = 0x0003;
1663 pub const DFCS_CAPTIONHELP: UINT = 0x0004;
1664 pub const DFCS_MENUARROW: UINT = 0x0000;
1665 pub const DFCS_MENUCHECK: UINT = 0x0001;
1666 pub const DFCS_MENUBULLET: UINT = 0x0002;
1667 pub const DFCS_MENUARROWRIGHT: UINT = 0x0004;
1668 pub const DFCS_SCROLLUP: UINT = 0x0000;
1669 pub const DFCS_SCROLLDOWN: UINT = 0x0001;
1670 pub const DFCS_SCROLLLEFT: UINT = 0x0002;
1671 pub const DFCS_SCROLLRIGHT: UINT = 0x0003;
1672 pub const DFCS_SCROLLCOMBOBOX: UINT = 0x0005;
1673 pub const DFCS_SCROLLSIZEGRIP: UINT = 0x0008;
1674 pub const DFCS_SCROLLSIZEGRIPRIGHT: UINT = 0x0010;
1675 pub const DFCS_BUTTONCHECK: UINT = 0x0000;
1676 pub const DFCS_BUTTONRADIOIMAGE: UINT = 0x0001;
1677 pub const DFCS_BUTTONRADIOMASK: UINT = 0x0002;
1678 pub const DFCS_BUTTONRADIO: UINT = 0x0004;
1679 pub const DFCS_BUTTON3STATE: UINT = 0x0008;
1680 pub const DFCS_BUTTONPUSH: UINT = 0x0010;
1681 pub const DFCS_INACTIVE: UINT = 0x0100;
1682 pub const DFCS_PUSHED: UINT = 0x0200;
1683 pub const DFCS_CHECKED: UINT = 0x0400;
1684 pub const DFCS_TRANSPARENT: UINT = 0x0800;
1685 pub const DFCS_HOT: UINT = 0x1000;
1686 pub const DFCS_ADJUSTRECT: UINT = 0x2000;
1687 pub const DFCS_FLAT: UINT = 0x4000;
1688 pub const DFCS_MONO: UINT = 0x8000;
1689 extern "system" {
DrawFrameControl( hdc: HDC, lprc: LPRECT, uType: UINT, uState: UINT, ) -> BOOL1690     pub fn DrawFrameControl(
1691         hdc: HDC,
1692         lprc: LPRECT,
1693         uType: UINT,
1694         uState: UINT,
1695     ) -> BOOL;
1696 }
1697 pub const DC_ACTIVE: UINT = 0x0001;
1698 pub const DC_SMALLCAP: UINT = 0x0002;
1699 pub const DC_ICON: UINT = 0x0004;
1700 pub const DC_TEXT: UINT = 0x0008;
1701 pub const DC_INBUTTON: UINT = 0x0010;
1702 pub const DC_GRADIENT: UINT = 0x0020;
1703 pub const DC_BUTTONS: UINT = 0x1000;
1704 extern "system" {
DrawCaption( hwnd: HWND, hdc: HDC, lprect: *const RECT, flags: UINT, ) -> BOOL1705     pub fn DrawCaption(
1706         hwnd: HWND,
1707         hdc: HDC,
1708         lprect: *const RECT,
1709         flags: UINT,
1710     ) -> BOOL;
1711 }
1712 pub const IDANI_OPEN: c_int = 1;
1713 pub const IDANI_CAPTION: c_int = 3;
1714 extern "system" {
DrawAnimatedRects( hwnd: HWND, idAni: c_int, lprcFrom: *const RECT, lprcTo: *const RECT, ) -> BOOL1715     pub fn DrawAnimatedRects(
1716         hwnd: HWND,
1717         idAni: c_int,
1718         lprcFrom: *const RECT,
1719         lprcTo: *const RECT,
1720     ) -> BOOL;
1721 }
1722 pub const CF_TEXT: UINT = 1;
1723 pub const CF_BITMAP: UINT = 2;
1724 pub const CF_METAFILEPICT: UINT = 3;
1725 pub const CF_SYLK: UINT = 4;
1726 pub const CF_DIF: UINT = 5;
1727 pub const CF_TIFF: UINT = 6;
1728 pub const CF_OEMTEXT: UINT = 7;
1729 pub const CF_DIB: UINT = 8;
1730 pub const CF_PALETTE: UINT = 9;
1731 pub const CF_PENDATA: UINT = 10;
1732 pub const CF_RIFF: UINT = 11;
1733 pub const CF_WAVE: UINT = 12;
1734 pub const CF_UNICODETEXT: UINT = 13;
1735 pub const CF_ENHMETAFILE: UINT = 14;
1736 pub const CF_HDROP: UINT = 15;
1737 pub const CF_LOCALE: UINT = 16;
1738 pub const CF_DIBV5: UINT = 17;
1739 pub const CF_MAX: UINT = 18;
1740 pub const CF_OWNERDISPLAY: UINT = 0x0080;
1741 pub const CF_DSPTEXT: UINT = 0x0081;
1742 pub const CF_DSPBITMAP: UINT = 0x0082;
1743 pub const CF_DSPMETAFILEPICT: UINT = 0x0083;
1744 pub const CF_DSPENHMETAFILE: UINT = 0x008E;
1745 pub const CF_PRIVATEFIRST: UINT = 0x0200;
1746 pub const CF_PRIVATELAST: UINT = 0x02FF;
1747 pub const CF_GDIOBJFIRST: UINT = 0x0300;
1748 pub const CF_GDIOBJLAST: UINT = 0x03FF;
1749 pub const FVIRTKEY: BYTE = TRUE as u8;
1750 pub const FNOINVERT: BYTE = 0x02;
1751 pub const FSHIFT: BYTE = 0x04;
1752 pub const FCONTROL: BYTE = 0x08;
1753 pub const FALT: BYTE = 0x10;
1754 STRUCT!{struct ACCEL {
1755     fVirt: BYTE,
1756     key: WORD,
1757     cmd: WORD,
1758 }}
1759 pub type LPACCEL = *mut ACCEL;
1760 STRUCT!{struct PAINTSTRUCT {
1761     hdc: HDC,
1762     fErase: BOOL,
1763     rcPaint: RECT,
1764     fRestore: BOOL,
1765     fIncUpdate: BOOL,
1766     rgbReserved: [BYTE; 32],
1767 }}
1768 pub type PPAINTSTRUCT = *mut PAINTSTRUCT;
1769 pub type NPPAINTSTRUCT = *mut PAINTSTRUCT;
1770 pub type LPPAINTSTRUCT = *mut PAINTSTRUCT;
1771 STRUCT!{struct CREATESTRUCTA {
1772     lpCreateParams: LPVOID,
1773     hInstance: HINSTANCE,
1774     hMenu: HMENU,
1775     hwndParent: HWND,
1776     cy: c_int,
1777     cx: c_int,
1778     y: c_int,
1779     x: c_int,
1780     style: LONG,
1781     lpszName: LPCSTR,
1782     lpszClass: LPCSTR,
1783     dwExStyle: DWORD,
1784 }}
1785 pub type LPCREATESTRUCTA = *mut CREATESTRUCTA;
1786 STRUCT!{struct CREATESTRUCTW {
1787     lpCreateParams: LPVOID,
1788     hInstance: HINSTANCE,
1789     hMenu: HMENU,
1790     hwndParent: HWND,
1791     cy: c_int,
1792     cx: c_int,
1793     y: c_int,
1794     x: c_int,
1795     style: LONG,
1796     lpszName: LPCWSTR,
1797     lpszClass: LPCWSTR,
1798     dwExStyle: DWORD,
1799 }}
1800 pub type LPCREATESTRUCTW = *mut CREATESTRUCTW;
1801 STRUCT!{struct WINDOWPLACEMENT {
1802     length: UINT,
1803     flags: UINT,
1804     showCmd: UINT,
1805     ptMinPosition: POINT,
1806     ptMaxPosition: POINT,
1807     rcNormalPosition: RECT,
1808 }}
1809 pub type PWINDOWPLACEMENT = *mut WINDOWPLACEMENT;
1810 pub type LPWINDOWPLACEMENT = *mut WINDOWPLACEMENT;
1811 pub const WPF_SETMINPOSITION: UINT = 0x0001;
1812 pub const WPF_RESTORETOMAXIMIZED: UINT = 0x0002;
1813 pub const WPF_ASYNCWINDOWPLACEMENT: UINT = 0x0004;
1814 STRUCT!{struct NMHDR {
1815     hwndFrom: HWND,
1816     idFrom: UINT_PTR,
1817     code: UINT,
1818 }}
1819 pub type LPNMHDR = *mut NMHDR;
1820 STRUCT!{struct STYLESTRUCT {
1821     styleOld: DWORD,
1822     styleNew: DWORD,
1823 }}
1824 pub type LPSTYLESTRUCT = *mut STYLESTRUCT;
1825 pub const ODT_MENU: UINT = 1;
1826 pub const ODT_LISTBOX: UINT = 2;
1827 pub const ODT_COMBOBOX: UINT = 3;
1828 pub const ODT_BUTTON: UINT = 4;
1829 pub const ODT_STATIC: UINT = 5;
1830 pub const ODA_DRAWENTIRE: UINT = 0x0001;
1831 pub const ODA_SELECT: UINT = 0x0002;
1832 pub const ODA_FOCUS: UINT = 0x0004;
1833 pub const ODS_SELECTED: UINT = 0x0001;
1834 pub const ODS_GRAYED: UINT = 0x0002;
1835 pub const ODS_DISABLED: UINT = 0x0004;
1836 pub const ODS_CHECKED: UINT = 0x0008;
1837 pub const ODS_FOCUS: UINT = 0x0010;
1838 pub const ODS_DEFAULT: UINT = 0x0020;
1839 pub const ODS_COMBOBOXEDIT: UINT = 0x1000;
1840 pub const ODS_HOTLIGHT: UINT = 0x0040;
1841 pub const ODS_INACTIVE: UINT = 0x0080;
1842 pub const ODS_NOACCEL: UINT = 0x0100;
1843 pub const ODS_NOFOCUSRECT: UINT = 0x0200;
1844 STRUCT!{struct MEASUREITEMSTRUCT {
1845     CtlType: UINT,
1846     CtlID: UINT,
1847     itemID: UINT,
1848     itemWidth: UINT,
1849     itemHeight: UINT,
1850     itemData: ULONG_PTR,
1851 }}
1852 pub type PMEASUREITEMSTRUCT = *mut MEASUREITEMSTRUCT;
1853 pub type LPMEASUREITEMSTRUCT = *mut MEASUREITEMSTRUCT;
1854 STRUCT!{struct DRAWITEMSTRUCT {
1855     CtlType: UINT,
1856     CtlID: UINT,
1857     itemID: UINT,
1858     itemAction: UINT,
1859     itemState: UINT,
1860     hwndItem: HWND,
1861     hDC: HDC,
1862     rcItem: RECT,
1863     itemData: ULONG_PTR,
1864 }}
1865 pub type PDRAWITEMSTRUCT = *mut DRAWITEMSTRUCT;
1866 pub type LPDRAWITEMSTRUCT = *mut DRAWITEMSTRUCT;
1867 STRUCT!{struct DELETEITEMSTRUCT {
1868     CtlType: UINT,
1869     CtlID: UINT,
1870     itemID: UINT,
1871     hwndItem: HWND,
1872     itemData: ULONG_PTR,
1873 }}
1874 pub type PDELETEITEMSTRUCT = *mut DELETEITEMSTRUCT;
1875 pub type LPDELETEITEMSTRUCT = *mut DELETEITEMSTRUCT;
1876 STRUCT!{struct COMPAREITEMSTRUCT {
1877     CtlType: UINT,
1878     CtlID: UINT,
1879     hwndItem: HWND,
1880     itemID1: UINT,
1881     itemData1: ULONG_PTR,
1882     itemID2: UINT,
1883     itemData2: ULONG_PTR,
1884     dwLocaleId: DWORD,
1885 }}
1886 pub type PCOMPAREITEMSTRUCT = *mut COMPAREITEMSTRUCT;
1887 pub type LPCOMPAREITEMSTRUCT = *mut COMPAREITEMSTRUCT;
1888 extern "system" {
GetMessageA( lpMsg: LPMSG, hWnd: HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, ) -> BOOL1889     pub fn GetMessageA(
1890         lpMsg: LPMSG,
1891         hWnd: HWND,
1892         wMsgFilterMin: UINT,
1893         wMsgFilterMax: UINT,
1894     ) -> BOOL;
GetMessageW( lpMsg: LPMSG, hWnd: HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, ) -> BOOL1895     pub fn GetMessageW(
1896         lpMsg: LPMSG,
1897         hWnd: HWND,
1898         wMsgFilterMin: UINT,
1899         wMsgFilterMax: UINT,
1900     ) -> BOOL;
TranslateMessage( lpmsg: *const MSG, ) -> BOOL1901     pub fn TranslateMessage(
1902         lpmsg: *const MSG,
1903     ) -> BOOL;
DispatchMessageA( lpmsg: *const MSG, ) -> LRESULT1904     pub fn DispatchMessageA(
1905         lpmsg: *const MSG,
1906     ) -> LRESULT;
DispatchMessageW( lpmsg: *const MSG, ) -> LRESULT1907     pub fn DispatchMessageW(
1908         lpmsg: *const MSG,
1909     ) -> LRESULT;
SetMessageQueue( cMessagesMax: c_int, ) -> BOOL1910     pub fn SetMessageQueue(
1911         cMessagesMax: c_int,
1912     ) -> BOOL;
PeekMessageA( lpMsg: LPMSG, hWnd: HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, wRemoveMsg: UINT, ) -> BOOL1913     pub fn PeekMessageA(
1914         lpMsg: LPMSG,
1915         hWnd: HWND,
1916         wMsgFilterMin: UINT,
1917         wMsgFilterMax: UINT,
1918         wRemoveMsg: UINT,
1919     ) -> BOOL;
PeekMessageW( lpMsg: LPMSG, hWnd: HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, wRemoveMsg: UINT, ) -> BOOL1920     pub fn PeekMessageW(
1921         lpMsg: LPMSG,
1922         hWnd: HWND,
1923         wMsgFilterMin: UINT,
1924         wMsgFilterMax: UINT,
1925         wRemoveMsg: UINT,
1926     ) -> BOOL;
1927 }
1928 pub const PM_NOREMOVE: UINT = 0x0000;
1929 pub const PM_REMOVE: UINT = 0x0001;
1930 pub const PM_NOYIELD: UINT = 0x0002;
1931 pub const PM_QS_INPUT: UINT = QS_INPUT << 16;
1932 pub const PM_QS_POSTMESSAGE: UINT = (QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16;
1933 pub const PM_QS_PAINT: UINT = QS_PAINT << 16;
1934 pub const PM_QS_SENDMESSAGE: UINT = QS_SENDMESSAGE << 16;
1935 extern "system" {
RegisterHotKey( hwnd: HWND, id: c_int, fsModifiers: UINT, vk: UINT, ) -> BOOL1936     pub fn RegisterHotKey(
1937         hwnd: HWND,
1938         id: c_int,
1939         fsModifiers: UINT,
1940         vk: UINT,
1941     ) -> BOOL;
UnregisterHotKey( hWnd: HWND, id: c_int, ) -> BOOL1942     pub fn UnregisterHotKey(
1943         hWnd: HWND,
1944         id: c_int,
1945     ) -> BOOL;
1946 }
1947 pub const MOD_ALT: LPARAM = 0x0001;
1948 pub const MOD_CONTROL: LPARAM = 0x0002;
1949 pub const MOD_SHIFT: LPARAM = 0x0004;
1950 pub const MOD_WIN: LPARAM = 0x0008;
1951 pub const MOD_NOREPEAT: LPARAM = 0x4000;
1952 pub const IDHOT_SNAPWINDOW: WPARAM = -1isize as usize;
1953 pub const IDHOT_SNAPDESKTOP: WPARAM = -2isize as usize;
1954 pub const ENDSESSION_CLOSEAPP: UINT = 0x00000001;
1955 pub const ENDSESSION_CRITICAL: UINT = 0x40000000;
1956 pub const ENDSESSION_LOGOFF: UINT = 0x80000000;
1957 pub const EWX_LOGOFF: UINT = 0x00000000;
1958 pub const EWX_SHUTDOWN: UINT = 0x00000001;
1959 pub const EWX_REBOOT: UINT = 0x00000002;
1960 pub const EWX_FORCE: UINT = 0x00000004;
1961 pub const EWX_POWEROFF: UINT = 0x00000008;
1962 pub const EWX_FORCEIFHUNG: UINT = 0x00000010;
1963 pub const EWX_QUICKRESOLVE: UINT = 0x00000020;
1964 pub const EWX_RESTARTAPPS: UINT = 0x00000040;
1965 pub const EWX_HYBRID_SHUTDOWN: UINT = 0x00400000;
1966 pub const EWX_BOOTOPTIONS: UINT = 0x01000000;
1967 // ExitWindows
1968 extern "system" {
ExitWindowsEx( uFlags: UINT, dwReason: DWORD, ) -> BOOL1969     pub fn ExitWindowsEx(
1970         uFlags: UINT,
1971         dwReason: DWORD,
1972     ) -> BOOL;
SwapMouseButton( fSwap: BOOL, ) -> BOOL1973     pub fn SwapMouseButton(
1974         fSwap: BOOL,
1975     ) -> BOOL;
GetMessagePos() -> DWORD1976     pub fn GetMessagePos() -> DWORD;
GetMessageTime() -> LONG1977     pub fn GetMessageTime() -> LONG;
GetMessageExtraInfo() -> LPARAM1978     pub fn GetMessageExtraInfo() -> LPARAM;
GetUnpredictedMessagePos() -> DWORD1979     pub fn GetUnpredictedMessagePos() -> DWORD;
IsWow64Message() -> BOOL1980     pub fn IsWow64Message() -> BOOL;
SetMessageExtraInfo( lParam: LPARAM, ) -> LPARAM1981     pub fn SetMessageExtraInfo(
1982         lParam: LPARAM,
1983     ) -> LPARAM;
SendMessageA( hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT1984     pub fn SendMessageA(
1985         hWnd: HWND,
1986         Msg: UINT,
1987         wParam: WPARAM,
1988         lParam: LPARAM,
1989     ) -> LRESULT;
SendMessageW( hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT1990     pub fn SendMessageW(
1991         hWnd: HWND,
1992         Msg: UINT,
1993         wParam: WPARAM,
1994         lParam: LPARAM,
1995     ) -> LRESULT;
SendMessageTimeoutA( hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, fuFlags: UINT, uTimeout: UINT, lpdwResult: PDWORD_PTR, ) -> LRESULT1996     pub fn SendMessageTimeoutA(
1997         hWnd: HWND,
1998         Msg: UINT,
1999         wParam: WPARAM,
2000         lParam: LPARAM,
2001         fuFlags: UINT,
2002         uTimeout: UINT,
2003         lpdwResult: PDWORD_PTR,
2004     ) -> LRESULT;
SendMessageTimeoutW( hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, fuFlags: UINT, uTimeout: UINT, lpdwResult: PDWORD_PTR, ) -> LRESULT2005     pub fn SendMessageTimeoutW(
2006         hWnd: HWND,
2007         Msg: UINT,
2008         wParam: WPARAM,
2009         lParam: LPARAM,
2010         fuFlags: UINT,
2011         uTimeout: UINT,
2012         lpdwResult: PDWORD_PTR,
2013     ) -> LRESULT;
SendNotifyMessageA( hWnd: HWND, msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> BOOL2014     pub fn SendNotifyMessageA(
2015         hWnd: HWND,
2016         msg: UINT,
2017         wParam: WPARAM,
2018         lParam: LPARAM,
2019     ) -> BOOL;
SendNotifyMessageW( hWnd: HWND, msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> BOOL2020     pub fn SendNotifyMessageW(
2021         hWnd: HWND,
2022         msg: UINT,
2023         wParam: WPARAM,
2024         lParam: LPARAM,
2025     ) -> BOOL;
SendMessageCallbackA( hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, lpResultCallBack: SENDASYNCPROC, dwData: ULONG_PTR, ) -> BOOL2026     pub fn SendMessageCallbackA(
2027         hWnd: HWND,
2028         Msg: UINT,
2029         wParam: WPARAM,
2030         lParam: LPARAM,
2031         lpResultCallBack: SENDASYNCPROC,
2032         dwData: ULONG_PTR,
2033     ) -> BOOL;
SendMessageCallbackW( hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, lpResultCallBack: SENDASYNCPROC, dwData: ULONG_PTR, ) -> BOOL2034     pub fn SendMessageCallbackW(
2035         hWnd: HWND,
2036         Msg: UINT,
2037         wParam: WPARAM,
2038         lParam: LPARAM,
2039         lpResultCallBack: SENDASYNCPROC,
2040         dwData: ULONG_PTR,
2041     ) -> BOOL;
2042 }
2043 STRUCT!{struct BSMINFO {
2044     cbSize: UINT,
2045     hdesk: HDESK,
2046     hwnd: HWND,
2047     luid: LUID,
2048 }}
2049 pub type PBSMINFO = *mut BSMINFO;
2050 extern "system" {
BroadcastSystemMessageExA( flags: DWORD, lpInfo: LPDWORD, Msg: UINT, wParam: WPARAM, lParam: LPARAM, pbsmInfo: PBSMINFO, ) -> c_long2051     pub fn BroadcastSystemMessageExA(
2052         flags: DWORD,
2053         lpInfo: LPDWORD,
2054         Msg: UINT,
2055         wParam: WPARAM,
2056         lParam: LPARAM,
2057         pbsmInfo: PBSMINFO,
2058     ) -> c_long;
BroadcastSystemMessageExW( flags: DWORD, lpInfo: LPDWORD, Msg: UINT, wParam: WPARAM, lParam: LPARAM, pbsmInfo: PBSMINFO, ) -> c_long2059     pub fn BroadcastSystemMessageExW(
2060         flags: DWORD,
2061         lpInfo: LPDWORD,
2062         Msg: UINT,
2063         wParam: WPARAM,
2064         lParam: LPARAM,
2065         pbsmInfo: PBSMINFO,
2066     ) -> c_long;
BroadcastSystemMessageA( flags: DWORD, lpInfo: LPDWORD, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LONG2067     pub fn BroadcastSystemMessageA(
2068         flags: DWORD,
2069         lpInfo: LPDWORD,
2070         Msg: UINT,
2071         wParam: WPARAM,
2072         lParam: LPARAM,
2073     ) -> LONG;
BroadcastSystemMessageW( flags: DWORD, lpInfo: LPDWORD, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LONG2074     pub fn BroadcastSystemMessageW(
2075         flags: DWORD,
2076         lpInfo: LPDWORD,
2077         Msg: UINT,
2078         wParam: WPARAM,
2079         lParam: LPARAM,
2080     ) -> LONG;
2081 }
2082 pub const BSM_ALLCOMPONENTS: DWORD = 0x00000000;
2083 pub const BSM_VXDS: DWORD = 0x00000001;
2084 pub const BSM_NETDRIVER: DWORD = 0x00000002;
2085 pub const BSM_INSTALLABLEDRIVERS: DWORD = 0x00000004;
2086 pub const BSM_APPLICATIONS: DWORD = 0x00000008;
2087 pub const BSM_ALLDESKTOPS: DWORD = 0x00000010;
2088 pub const BSF_QUERY: DWORD = 0x00000001;
2089 pub const BSF_IGNORECURRENTTASK: DWORD = 0x00000002;
2090 pub const BSF_FLUSHDISK: DWORD = 0x00000004;
2091 pub const BSF_NOHANG: DWORD = 0x00000008;
2092 pub const BSF_POSTMESSAGE: DWORD = 0x00000010;
2093 pub const BSF_FORCEIFHUNG: DWORD = 0x00000020;
2094 pub const BSF_NOTIMEOUTIFNOTHUNG: DWORD = 0x00000040;
2095 pub const BSF_ALLOWSFW: DWORD = 0x00000080;
2096 pub const BSF_SENDNOTIFYMESSAGE: DWORD = 0x00000100;
2097 pub const BSF_RETURNHDESK: DWORD = 0x00000200;
2098 pub const BSF_LUID: DWORD = 0x00000400;
2099 pub const BROADCAST_QUERY_DENY: DWORD = 0x424D5144;
2100 pub type HDEVNOTIFY = PVOID;
2101 pub type PHDEVNOTIFY = *mut HDEVNOTIFY;
2102 pub const DEVICE_NOTIFY_WINDOW_HANDLE: DWORD = 0x00000000;
2103 pub const DEVICE_NOTIFY_SERVICE_HANDLE: DWORD = 0x00000001;
2104 pub const DEVICE_NOTIFY_ALL_INTERFACE_CLASSES: DWORD = 0x00000004;
2105 extern "system" {
RegisterDeviceNotificationA( hRecipient: HANDLE, notificationFilter: LPVOID, flags: DWORD, ) -> HDEVNOTIFY2106     pub fn RegisterDeviceNotificationA(
2107         hRecipient: HANDLE,
2108         notificationFilter: LPVOID,
2109         flags: DWORD,
2110     ) -> HDEVNOTIFY;
RegisterDeviceNotificationW( hRecipient: HANDLE, notificationFilter: LPVOID, flags: DWORD, ) -> HDEVNOTIFY2111     pub fn RegisterDeviceNotificationW(
2112         hRecipient: HANDLE,
2113         notificationFilter: LPVOID,
2114         flags: DWORD,
2115     ) -> HDEVNOTIFY;
UnregisterDeviceNotification( Handle: HDEVNOTIFY, ) -> BOOL2116     pub fn UnregisterDeviceNotification(
2117         Handle: HDEVNOTIFY,
2118     ) -> BOOL;
2119 }
2120 pub type HPOWERNOTIFY = PVOID;
2121 pub type PHPOWERNOTIFY = *mut HPOWERNOTIFY;
2122 extern "system" {
RegisterPowerSettingNotification( hRecipient: HANDLE, PowerSettingGuid: LPCGUID, Flags: DWORD, ) -> HPOWERNOTIFY2123     pub fn RegisterPowerSettingNotification(
2124         hRecipient: HANDLE,
2125         PowerSettingGuid: LPCGUID,
2126         Flags: DWORD,
2127     ) -> HPOWERNOTIFY;
UnregisterPowerSettingNotification( Handle: HPOWERNOTIFY, ) -> BOOL2128     pub fn UnregisterPowerSettingNotification(
2129         Handle: HPOWERNOTIFY,
2130     ) -> BOOL;
RegisterSuspendResumeNotification( hRecipient: HANDLE, Flags: DWORD, ) -> HPOWERNOTIFY2131     pub fn RegisterSuspendResumeNotification(
2132         hRecipient: HANDLE,
2133         Flags: DWORD,
2134     ) -> HPOWERNOTIFY;
UnregisterSuspendResumeNotification( Handle: HPOWERNOTIFY, ) -> BOOL2135     pub fn UnregisterSuspendResumeNotification(
2136         Handle: HPOWERNOTIFY,
2137     ) -> BOOL;
PostMessageA( hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> BOOL2138     pub fn PostMessageA(
2139         hWnd: HWND,
2140         Msg: UINT,
2141         wParam: WPARAM,
2142         lParam: LPARAM,
2143     ) -> BOOL;
PostMessageW( hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> BOOL2144     pub fn PostMessageW(
2145         hWnd: HWND,
2146         Msg: UINT,
2147         wParam: WPARAM,
2148         lParam: LPARAM,
2149     ) -> BOOL;
PostThreadMessageA( idThread: DWORD, msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> BOOL2150     pub fn PostThreadMessageA(
2151         idThread: DWORD,
2152         msg: UINT,
2153         wParam: WPARAM,
2154         lParam: LPARAM,
2155     ) -> BOOL;
PostThreadMessageW( idThread: DWORD, msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> BOOL2156     pub fn PostThreadMessageW(
2157         idThread: DWORD,
2158         msg: UINT,
2159         wParam: WPARAM,
2160         lParam: LPARAM,
2161     ) -> BOOL;
2162 }
2163 // PostAppMessageA
2164 // PostAppMessageW
2165 pub const HWND_BROADCAST: HWND = 0xffff as HWND;
2166 pub const HWND_MESSAGE: HWND = -3isize as HWND;
2167 extern "system" {
AttachThreadInput( idAttach: DWORD, idAttachTo: DWORD, fAttach: BOOL, ) -> BOOL2168     pub fn AttachThreadInput(
2169         idAttach: DWORD,
2170         idAttachTo: DWORD,
2171         fAttach: BOOL,
2172     ) -> BOOL;
ReplyMessage( lResult: LRESULT, ) -> BOOL2173     pub fn ReplyMessage(
2174         lResult: LRESULT,
2175     ) -> BOOL;
WaitMessage() -> BOOL2176     pub fn WaitMessage() -> BOOL;
WaitForInputIdle( hProcess: HANDLE, dwMilliseconds: DWORD, ) -> DWORD2177     pub fn WaitForInputIdle(
2178         hProcess: HANDLE,
2179         dwMilliseconds: DWORD,
2180     ) -> DWORD;
DefWindowProcA( hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT2181     pub fn DefWindowProcA(
2182         hWnd: HWND,
2183         Msg: UINT,
2184         wParam: WPARAM,
2185         lParam: LPARAM,
2186     ) -> LRESULT;
DefWindowProcW( hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT2187     pub fn DefWindowProcW(
2188         hWnd: HWND,
2189         Msg: UINT,
2190         wParam: WPARAM,
2191         lParam: LPARAM,
2192     ) -> LRESULT;
PostQuitMessage( nExitCode: c_int, )2193     pub fn PostQuitMessage(
2194         nExitCode: c_int,
2195     );
CallWindowProcA( lpPrevWndFunc: WNDPROC, hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT2196     pub fn CallWindowProcA(
2197         lpPrevWndFunc: WNDPROC,
2198         hWnd: HWND,
2199         Msg: UINT,
2200         wParam: WPARAM,
2201         lParam: LPARAM,
2202     ) -> LRESULT;
CallWindowProcW( lpPrevWndFunc: WNDPROC, hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT2203     pub fn CallWindowProcW(
2204         lpPrevWndFunc: WNDPROC,
2205         hWnd: HWND,
2206         Msg: UINT,
2207         wParam: WPARAM,
2208         lParam: LPARAM,
2209     ) -> LRESULT;
InSendMessage() -> BOOL2210     pub fn InSendMessage() -> BOOL;
InSendMessageEx( lpReserved: LPVOID, ) -> DWORD2211     pub fn InSendMessageEx(
2212         lpReserved: LPVOID,
2213     ) -> DWORD;
2214 }
2215 pub const ISMEX_NOSEND: DWORD = 0x00000000;
2216 pub const ISMEX_SEND: DWORD = 0x00000001;
2217 pub const ISMEX_NOTIFY: DWORD = 0x00000002;
2218 pub const ISMEX_CALLBACK: DWORD = 0x00000004;
2219 pub const ISMEX_REPLIED: DWORD = 0x00000008;
2220 extern "system" {
GetDoubleClickTime() -> UINT2221     pub fn GetDoubleClickTime() -> UINT;
SetDoubleClickTime( uInterval: UINT, ) -> BOOL2222     pub fn SetDoubleClickTime(
2223         uInterval: UINT,
2224     ) -> BOOL;
RegisterClassA( lpWndClass: *const WNDCLASSA, ) -> ATOM2225     pub fn RegisterClassA(
2226         lpWndClass: *const WNDCLASSA,
2227     ) -> ATOM;
RegisterClassW( lpWndClass: *const WNDCLASSW, ) -> ATOM2228     pub fn RegisterClassW(
2229         lpWndClass: *const WNDCLASSW,
2230     ) -> ATOM;
UnregisterClassA( lpClassName: LPCSTR, hInstance: HINSTANCE, ) -> BOOL2231     pub fn UnregisterClassA(
2232         lpClassName: LPCSTR,
2233         hInstance: HINSTANCE,
2234     ) -> BOOL;
UnregisterClassW( lpClassName: LPCWSTR, hInstance: HINSTANCE, ) -> BOOL2235     pub fn UnregisterClassW(
2236         lpClassName: LPCWSTR,
2237         hInstance: HINSTANCE,
2238     ) -> BOOL;
GetClassInfoA( hInstance: HINSTANCE, lpClassName: LPCSTR, lpWndClass: LPWNDCLASSA, ) -> BOOL2239     pub fn GetClassInfoA(
2240         hInstance: HINSTANCE,
2241         lpClassName: LPCSTR,
2242         lpWndClass: LPWNDCLASSA,
2243     ) -> BOOL;
GetClassInfoW( hInstance: HINSTANCE, lpClassName: LPCWSTR, lpWndClass: LPWNDCLASSW, ) -> BOOL2244     pub fn GetClassInfoW(
2245         hInstance: HINSTANCE,
2246         lpClassName: LPCWSTR,
2247         lpWndClass: LPWNDCLASSW,
2248     ) -> BOOL;
RegisterClassExA( lpWndClass: *const WNDCLASSEXA, ) -> ATOM2249     pub fn RegisterClassExA(
2250         lpWndClass: *const WNDCLASSEXA,
2251     ) -> ATOM;
RegisterClassExW( lpWndClass: *const WNDCLASSEXW, ) -> ATOM2252     pub fn RegisterClassExW(
2253         lpWndClass: *const WNDCLASSEXW,
2254     ) -> ATOM;
GetClassInfoExA( hinst: HINSTANCE, lpszClass: LPCSTR, lpwcx: LPWNDCLASSEXA, ) -> BOOL2255     pub fn GetClassInfoExA(
2256         hinst: HINSTANCE,
2257         lpszClass: LPCSTR,
2258         lpwcx: LPWNDCLASSEXA,
2259     ) -> BOOL;
GetClassInfoExW( hinst: HINSTANCE, lpszClass: LPCWSTR, lpwcx: LPWNDCLASSEXW, ) -> BOOL2260     pub fn GetClassInfoExW(
2261         hinst: HINSTANCE,
2262         lpszClass: LPCWSTR,
2263         lpwcx: LPWNDCLASSEXW,
2264     ) -> BOOL;
2265 }
2266 pub const CW_USEDEFAULT: c_int = 0x80000000;
2267 pub const HWND_DESKTOP: HWND = 0 as HWND;
2268 FN!{stdcall PREGISTERCLASSNAMEW(
2269     LPCWSTR,
2270 ) -> BOOLEAN}
2271 extern "system" {
CreateWindowExA( dwExStyle: DWORD, lpClassName: LPCSTR, lpWindowName: LPCSTR, dwStyle: DWORD, x: c_int, y: c_int, nWidth: c_int, nHeight: c_int, hWndParent: HWND, hMenu: HMENU, hInstance: HINSTANCE, lpParam: LPVOID, ) -> HWND2272     pub fn CreateWindowExA(
2273         dwExStyle: DWORD,
2274         lpClassName: LPCSTR,
2275         lpWindowName: LPCSTR,
2276         dwStyle: DWORD,
2277         x: c_int,
2278         y: c_int,
2279         nWidth: c_int,
2280         nHeight: c_int,
2281         hWndParent: HWND,
2282         hMenu: HMENU,
2283         hInstance: HINSTANCE,
2284         lpParam: LPVOID,
2285     ) -> HWND;
CreateWindowExW( dwExStyle: DWORD, lpClassName: LPCWSTR, lpWindowName: LPCWSTR, dwStyle: DWORD, x: c_int, y: c_int, nWidth: c_int, nHeight: c_int, hWndParent: HWND, hMenu: HMENU, hInstance: HINSTANCE, lpParam: LPVOID, ) -> HWND2286     pub fn CreateWindowExW(
2287         dwExStyle: DWORD,
2288         lpClassName: LPCWSTR,
2289         lpWindowName: LPCWSTR,
2290         dwStyle: DWORD,
2291         x: c_int,
2292         y: c_int,
2293         nWidth: c_int,
2294         nHeight: c_int,
2295         hWndParent: HWND,
2296         hMenu: HMENU,
2297         hInstance: HINSTANCE,
2298         lpParam: LPVOID,
2299     ) -> HWND;
2300 }
2301 // CreateWindowA
2302 // CreateWindowW
2303 extern "system" {
IsWindow( hWnd: HWND, ) -> BOOL2304     pub fn IsWindow(
2305         hWnd: HWND,
2306     ) -> BOOL;
IsMenu( hMenu: HMENU, ) -> BOOL2307     pub fn IsMenu(
2308         hMenu: HMENU,
2309     ) -> BOOL;
IsChild( hWndParent: HWND, hWnd: HWND, ) -> BOOL2310     pub fn IsChild(
2311         hWndParent: HWND,
2312         hWnd: HWND,
2313     ) -> BOOL;
DestroyWindow( hWnd: HWND, ) -> BOOL2314     pub fn DestroyWindow(
2315         hWnd: HWND,
2316     ) -> BOOL;
ShowWindow( hWnd: HWND, nCmdShow: c_int, ) -> BOOL2317     pub fn ShowWindow(
2318         hWnd: HWND,
2319         nCmdShow: c_int,
2320     ) -> BOOL;
AnimateWindow( hWnd: HWND, dwTime: DWORD, dwFlags: DWORD, ) -> BOOL2321     pub fn AnimateWindow(
2322         hWnd: HWND,
2323         dwTime: DWORD,
2324         dwFlags: DWORD,
2325     ) -> BOOL;
UpdateLayeredWindow( hWnd: HWND, hdcDst: HDC, pptDst: *mut POINT, psize: *mut SIZE, hdcSrc: HDC, pptSrc: *mut POINT, crKey: COLORREF, pblend: *mut BLENDFUNCTION, dwFlags: DWORD, ) -> BOOL2326     pub fn UpdateLayeredWindow(
2327         hWnd: HWND,
2328         hdcDst: HDC,
2329         pptDst: *mut POINT,
2330         psize: *mut SIZE,
2331         hdcSrc: HDC,
2332         pptSrc: *mut POINT,
2333         crKey: COLORREF,
2334         pblend: *mut BLENDFUNCTION,
2335         dwFlags: DWORD,
2336     ) -> BOOL;
2337 }
2338 STRUCT!{struct UPDATELAYEREDWINDOWINFO {
2339     cbSize: DWORD,
2340     hdcDst: HDC,
2341     pptDst: *const POINT,
2342     psize: *const SIZE,
2343     hdcSrc: HDC,
2344     pptSrc: *const POINT,
2345     crKey: COLORREF,
2346     pblend: *const BLENDFUNCTION,
2347     dwFlags: DWORD,
2348     prcDirty: *const RECT,
2349 }}
2350 pub type PUPDATELAYEREDWINDOWINFO = *mut UPDATELAYEREDWINDOWINFO;
2351 extern "system" {
UpdateLayeredWindowIndirect( hWnd: HWND, pULWInfo: *mut UPDATELAYEREDWINDOWINFO, ) -> BOOL2352     pub fn UpdateLayeredWindowIndirect(
2353         hWnd: HWND,
2354         pULWInfo: *mut UPDATELAYEREDWINDOWINFO,
2355     ) -> BOOL;
GetLayeredWindowAttributes( hwnd: HWND, pcrKey: *mut COLORREF, pbAlpha: *mut BYTE, pdwFlags: *mut DWORD, ) -> BOOL2356     pub fn GetLayeredWindowAttributes(
2357         hwnd: HWND,
2358         pcrKey: *mut COLORREF,
2359         pbAlpha: *mut BYTE,
2360         pdwFlags: *mut DWORD,
2361     ) -> BOOL;
2362 }
2363 pub const PW_CLIENTONLY: DWORD = 0x00000001;
2364 pub const PW_RENDERFULLCONTENT: DWORD = 0x00000002;
2365 extern "system" {
PrintWindow( hwnd: HWND, hdcBlt: HDC, nFlags: UINT, ) -> BOOL2366     pub fn PrintWindow(
2367         hwnd: HWND,
2368         hdcBlt: HDC,
2369         nFlags: UINT,
2370     ) -> BOOL;
SetLayeredWindowAttributes( hwnd: HWND, crKey: COLORREF, bAlpha: BYTE, dwFlags: DWORD, ) -> BOOL2371     pub fn SetLayeredWindowAttributes(
2372         hwnd: HWND,
2373         crKey: COLORREF,
2374         bAlpha: BYTE,
2375         dwFlags: DWORD,
2376     ) -> BOOL;
2377 }
2378 pub const LWA_COLORKEY: DWORD = 0x00000001;
2379 pub const LWA_ALPHA: DWORD = 0x00000002;
2380 pub const ULW_COLORKEY: DWORD = 0x00000001;
2381 pub const ULW_ALPHA: DWORD = 0x00000002;
2382 pub const ULW_OPAQUE: DWORD = 0x00000004;
2383 pub const ULW_EX_NORESIZE: DWORD = 0x00000008;
2384 extern "system" {
ShowWindowAsync( hWnd: HWND, nCmdShow: c_int, ) -> BOOL2385     pub fn ShowWindowAsync(
2386         hWnd: HWND,
2387         nCmdShow: c_int,
2388     ) -> BOOL;
FlashWindow( hwnd: HWND, bInvert: BOOL, ) -> BOOL2389     pub fn FlashWindow(
2390         hwnd: HWND,
2391         bInvert: BOOL,
2392     ) -> BOOL;
2393 }
2394 STRUCT!{struct FLASHWINFO {
2395     cbSize: UINT,
2396     hwnd: HWND,
2397     dwFlags: DWORD,
2398     uCount: UINT,
2399     dwTimeout: DWORD,
2400 }}
2401 pub type PFLASHWINFO = *mut FLASHWINFO;
2402 extern "system" {
FlashWindowEx( pfwi: PFLASHWINFO, ) -> BOOL2403     pub fn FlashWindowEx(
2404         pfwi: PFLASHWINFO,
2405     ) -> BOOL;
2406 }
2407 pub const FLASHW_STOP: DWORD = 0;
2408 pub const FLASHW_CAPTION: DWORD = 0x00000001;
2409 pub const FLASHW_TRAY: DWORD = 0x00000002;
2410 pub const FLASHW_ALL: DWORD = FLASHW_CAPTION | FLASHW_TRAY;
2411 pub const FLASHW_TIMER: DWORD = 0x00000004;
2412 pub const FLASHW_TIMERNOFG: DWORD = 0x0000000C;
2413 extern "system" {
ShowOwnedPopups( hWnd: HWND, fShow: BOOL, ) -> BOOL2414     pub fn ShowOwnedPopups(
2415         hWnd: HWND,
2416         fShow: BOOL,
2417     ) -> BOOL;
OpenIcon( hWnd: HWND, ) -> BOOL2418     pub fn OpenIcon(
2419         hWnd: HWND,
2420     ) -> BOOL;
CloseWindow( hWnd: HWND, ) -> BOOL2421     pub fn CloseWindow(
2422         hWnd: HWND,
2423     ) -> BOOL;
MoveWindow( hWnd: HWND, X: c_int, Y: c_int, nWidth: c_int, nHeight: c_int, bRepaint: BOOL, ) -> BOOL2424     pub fn MoveWindow(
2425         hWnd: HWND,
2426         X: c_int,
2427         Y: c_int,
2428         nWidth: c_int,
2429         nHeight: c_int,
2430         bRepaint: BOOL,
2431     ) -> BOOL;
SetWindowPos( hWnd: HWND, hWndInsertAfter: HWND, X: c_int, Y: c_int, cx: c_int, cy: c_int, uFlags: UINT, ) -> BOOL2432     pub fn SetWindowPos(
2433         hWnd: HWND,
2434         hWndInsertAfter: HWND,
2435         X: c_int,
2436         Y: c_int,
2437         cx: c_int,
2438         cy: c_int,
2439         uFlags: UINT,
2440     ) -> BOOL;
GetWindowPlacement( hWnd: HWND, lpwndpl: *mut WINDOWPLACEMENT, ) -> BOOL2441     pub fn GetWindowPlacement(
2442         hWnd: HWND,
2443         lpwndpl: *mut WINDOWPLACEMENT,
2444     ) -> BOOL;
SetWindowPlacement( hWnd: HWND, lpwndpl: *const WINDOWPLACEMENT, ) -> BOOL2445     pub fn SetWindowPlacement(
2446         hWnd: HWND,
2447         lpwndpl: *const WINDOWPLACEMENT,
2448     ) -> BOOL;
2449 }
2450 pub const WDA_NONE: DWORD = 0x00000000;
2451 pub const WDA_MONITOR: DWORD = 0x00000001;
2452 extern "system" {
GetWindowDisplayAffinity( hWnd: HWND, pdwAffinity: *mut DWORD, ) -> BOOL2453     pub fn GetWindowDisplayAffinity(
2454         hWnd: HWND,
2455         pdwAffinity: *mut DWORD,
2456     ) -> BOOL;
SetWindowDisplayAffinity( hWnd: HWND, dwAffinity: DWORD, ) -> BOOL2457     pub fn SetWindowDisplayAffinity(
2458         hWnd: HWND,
2459         dwAffinity: DWORD,
2460     ) -> BOOL;
BeginDeferWindowPos( nNumWindows: c_int, ) -> HDWP2461     pub fn BeginDeferWindowPos(
2462         nNumWindows: c_int,
2463     ) -> HDWP;
DeferWindowPos( hWinPosInfo: HDWP, hWnd: HWND, hWndInserAfter: HWND, x: c_int, y: c_int, cx: c_int, cy: c_int, uFlags: UINT, ) -> HDWP2464     pub fn DeferWindowPos(
2465         hWinPosInfo: HDWP,
2466         hWnd: HWND,
2467         hWndInserAfter: HWND,
2468         x: c_int,
2469         y: c_int,
2470         cx: c_int,
2471         cy: c_int,
2472         uFlags: UINT,
2473     ) -> HDWP;
EndDeferWindowPos( hWinPosInfo: HDWP, ) -> BOOL2474     pub fn EndDeferWindowPos(
2475         hWinPosInfo: HDWP,
2476     ) -> BOOL;
IsWindowVisible( hWnd: HWND, ) -> BOOL2477     pub fn IsWindowVisible(
2478         hWnd: HWND,
2479     ) -> BOOL;
IsIconic( hWnd: HWND, ) -> BOOL2480     pub fn IsIconic(
2481         hWnd: HWND,
2482     ) -> BOOL;
AnyPopup() -> BOOL2483     pub fn AnyPopup() -> BOOL;
BringWindowToTop( hWnd: HWND, ) -> BOOL2484     pub fn BringWindowToTop(
2485         hWnd: HWND,
2486     ) -> BOOL;
IsZoomed( hwnd: HWND, ) -> BOOL2487     pub fn IsZoomed(
2488         hwnd: HWND,
2489     ) -> BOOL;
2490 }
2491 pub const SWP_NOSIZE: UINT = 0x0001;
2492 pub const SWP_NOMOVE: UINT = 0x0002;
2493 pub const SWP_NOZORDER: UINT = 0x0004;
2494 pub const SWP_NOREDRAW: UINT = 0x0008;
2495 pub const SWP_NOACTIVATE: UINT = 0x0010;
2496 pub const SWP_FRAMECHANGED: UINT = 0x0020;
2497 pub const SWP_SHOWWINDOW: UINT = 0x0040;
2498 pub const SWP_HIDEWINDOW: UINT = 0x0080;
2499 pub const SWP_NOCOPYBITS: UINT = 0x0100;
2500 pub const SWP_NOOWNERZORDER: UINT = 0x0200;
2501 pub const SWP_NOSENDCHANGING: UINT = 0x0400;
2502 pub const SWP_DRAWFRAME: UINT = SWP_FRAMECHANGED;
2503 pub const SWP_NOREPOSITION: UINT = SWP_NOOWNERZORDER;
2504 pub const SWP_DEFERERASE: UINT = 0x2000;
2505 pub const SWP_ASYNCWINDOWPOS: UINT = 0x4000;
2506 pub const HWND_TOP: HWND = 0 as HWND;
2507 pub const HWND_BOTTOM: HWND = 1 as HWND;
2508 pub const HWND_TOPMOST: HWND = -1isize as HWND;
2509 pub const HWND_NOTOPMOST: HWND = -2isize as HWND;
2510 STRUCT!{struct DLGTEMPLATE {
2511     style: DWORD,
2512     dwExtendedStyle: DWORD,
2513     cdit: WORD,
2514     x: c_short,
2515     y: c_short,
2516     cx: c_short,
2517     cy: c_short,
2518 }}
2519 pub type LPDLGTEMPLATEA = *mut DLGTEMPLATE;
2520 pub type LPDLGTEMPLATEW = *mut DLGTEMPLATE;
2521 pub type LPCDLGTEMPLATEA = *const DLGTEMPLATE;
2522 pub type LPCDLGTEMPLATEW = *const DLGTEMPLATE;
2523 STRUCT!{struct DLGITEMTEMPLATE {
2524     style: DWORD,
2525     dwExtendedStyle: DWORD,
2526     x: c_short,
2527     y: c_short,
2528     cx: c_short,
2529     cy: c_short,
2530     id: WORD,
2531 }}
2532 pub type PDLGITEMTEMPLATEA = *mut DLGITEMTEMPLATE;
2533 pub type PDLGITEMTEMPLATEW = *mut DLGITEMTEMPLATE;
2534 pub type LPDLGITEMTEMPLATEA = *mut DLGITEMTEMPLATE;
2535 pub type LPDLGITEMTEMPLATEW = *mut DLGITEMTEMPLATE;
2536 extern "system" {
CreateDialogParamA( hInstance: HINSTANCE, lpTemplateName: LPCSTR, hWndParent: HWND, lpDialogFunc: DLGPROC, dwInitParam: LPARAM, ) -> HWND2537     pub fn CreateDialogParamA(
2538         hInstance: HINSTANCE,
2539         lpTemplateName: LPCSTR,
2540         hWndParent: HWND,
2541         lpDialogFunc: DLGPROC,
2542         dwInitParam: LPARAM,
2543     ) -> HWND;
CreateDialogParamW( hInstance: HINSTANCE, lpTemplateName: LPCWSTR, hWndParent: HWND, lpDialogFunc: DLGPROC, dwInitParam: LPARAM, ) -> HWND2544     pub fn CreateDialogParamW(
2545         hInstance: HINSTANCE,
2546         lpTemplateName: LPCWSTR,
2547         hWndParent: HWND,
2548         lpDialogFunc: DLGPROC,
2549         dwInitParam: LPARAM,
2550     ) -> HWND;
CreateDialogIndirectParamA( hInstance: HINSTANCE, lpTemplate: LPCDLGTEMPLATEA, hWndParent: HWND, lpDialogFunc: DLGPROC, dwInitParam: LPARAM, ) -> HWND2551     pub fn CreateDialogIndirectParamA(
2552         hInstance: HINSTANCE,
2553         lpTemplate: LPCDLGTEMPLATEA,
2554         hWndParent: HWND,
2555         lpDialogFunc: DLGPROC,
2556         dwInitParam: LPARAM,
2557     ) -> HWND;
CreateDialogIndirectParamW( hInstance: HINSTANCE, lpTemplate: LPCDLGTEMPLATEW, hWndParent: HWND, lpDialogFunc: DLGPROC, dwInitParam: LPARAM, ) -> HWND2558     pub fn CreateDialogIndirectParamW(
2559         hInstance: HINSTANCE,
2560         lpTemplate: LPCDLGTEMPLATEW,
2561         hWndParent: HWND,
2562         lpDialogFunc: DLGPROC,
2563         dwInitParam: LPARAM,
2564     ) -> HWND;
2565 }
2566 // CreateDialogA
2567 // CreateDialogW
2568 // CreateDialogIndirectA
2569 // CreateDialogIndirectW
2570 extern "system" {
DialogBoxParamA( hInstance: HINSTANCE, lpTemplateName: LPCSTR, hWndParent: HWND, lpDialogFunc: DLGPROC, dwInitParam: LPARAM, ) -> INT_PTR2571     pub fn DialogBoxParamA(
2572         hInstance: HINSTANCE,
2573         lpTemplateName: LPCSTR,
2574         hWndParent: HWND,
2575         lpDialogFunc: DLGPROC,
2576         dwInitParam: LPARAM,
2577     ) -> INT_PTR;
DialogBoxParamW( hInstance: HINSTANCE, lpTemplateName: LPCWSTR, hWndParent: HWND, lpDialogFunc: DLGPROC, dwInitParam: LPARAM, ) -> INT_PTR2578     pub fn DialogBoxParamW(
2579         hInstance: HINSTANCE,
2580         lpTemplateName: LPCWSTR,
2581         hWndParent: HWND,
2582         lpDialogFunc: DLGPROC,
2583         dwInitParam: LPARAM,
2584     ) -> INT_PTR;
DialogBoxIndirectParamA( hInstance: HINSTANCE, hDialogTemplate: LPCDLGTEMPLATEA, hWndParent: HWND, lpDialogFunc: DLGPROC, dwInitParam: LPARAM, ) -> INT_PTR2585     pub fn DialogBoxIndirectParamA(
2586         hInstance: HINSTANCE,
2587         hDialogTemplate: LPCDLGTEMPLATEA,
2588         hWndParent: HWND,
2589         lpDialogFunc: DLGPROC,
2590         dwInitParam: LPARAM,
2591     ) -> INT_PTR;
DialogBoxIndirectParamW( hInstance: HINSTANCE, hDialogTemplate: LPCDLGTEMPLATEW, hWndParent: HWND, lpDialogFunc: DLGPROC, dwInitParam: LPARAM, ) -> INT_PTR2592     pub fn DialogBoxIndirectParamW(
2593         hInstance: HINSTANCE,
2594         hDialogTemplate: LPCDLGTEMPLATEW,
2595         hWndParent: HWND,
2596         lpDialogFunc: DLGPROC,
2597         dwInitParam: LPARAM,
2598     ) -> INT_PTR;
2599 }
2600 // DialogBoxA
2601 // DialogBoxW
2602 // DialogBoxIndirectA
2603 // DialogBoxIndirectW
2604 extern "system" {
EndDialog( hDlg: HWND, nResult: INT_PTR, ) -> BOOL2605     pub fn EndDialog(
2606         hDlg: HWND,
2607         nResult: INT_PTR,
2608     ) -> BOOL;
GetDlgItem( hDlg: HWND, nIDDlgItem: c_int, ) -> HWND2609     pub fn GetDlgItem(
2610         hDlg: HWND,
2611         nIDDlgItem: c_int,
2612     ) -> HWND;
SetDlgItemInt( hDlg: HWND, nIDDlgItem: c_int, uValue: UINT, bSigned: BOOL, ) -> BOOL2613     pub fn SetDlgItemInt(
2614         hDlg: HWND,
2615         nIDDlgItem: c_int,
2616         uValue: UINT,
2617         bSigned: BOOL,
2618     ) -> BOOL;
GetDlgItemInt( hDlg: HWND, nIDDlgItem: c_int, lpTranslated: *mut BOOL, bSigned: BOOL, ) -> UINT2619     pub fn GetDlgItemInt(
2620         hDlg: HWND,
2621         nIDDlgItem: c_int,
2622         lpTranslated: *mut BOOL,
2623         bSigned: BOOL,
2624     ) -> UINT;
SetDlgItemTextA( hDlg: HWND, nIDDlgItem: c_int, lpString: LPCSTR, ) -> BOOL2625     pub fn SetDlgItemTextA(
2626         hDlg: HWND,
2627         nIDDlgItem: c_int,
2628         lpString: LPCSTR,
2629     ) -> BOOL;
SetDlgItemTextW( hDlg: HWND, nIDDlgItem: c_int, lpString: LPCWSTR, ) -> BOOL2630     pub fn SetDlgItemTextW(
2631         hDlg: HWND,
2632         nIDDlgItem: c_int,
2633         lpString: LPCWSTR,
2634     ) -> BOOL;
GetDlgItemTextA( hDlg: HWND, nIDDlgItem: c_int, lpString: LPSTR, nMaxCount: c_int, ) -> UINT2635     pub fn GetDlgItemTextA(
2636         hDlg: HWND,
2637         nIDDlgItem: c_int,
2638         lpString: LPSTR,
2639         nMaxCount: c_int,
2640     ) -> UINT;
GetDlgItemTextW( hDlg: HWND, nIDDlgItem: c_int, lpString: LPWSTR, nMaxCount: c_int, ) -> UINT2641     pub fn GetDlgItemTextW(
2642         hDlg: HWND,
2643         nIDDlgItem: c_int,
2644         lpString: LPWSTR,
2645         nMaxCount: c_int,
2646     ) -> UINT;
CheckDlgButton( hDlg: HWND, nIDButton: c_int, uCheck: UINT, ) -> BOOL2647     pub fn CheckDlgButton(
2648         hDlg: HWND,
2649         nIDButton: c_int,
2650         uCheck: UINT,
2651     ) -> BOOL;
CheckRadioButton( hDlg: HWND, nIDFirstButton: c_int, nIDLasatButton: c_int, nIDCheckButton: c_int, ) -> BOOL2652     pub fn CheckRadioButton(
2653         hDlg: HWND,
2654         nIDFirstButton: c_int,
2655         nIDLasatButton: c_int,
2656         nIDCheckButton: c_int,
2657     ) -> BOOL;
IsDlgButtonChecked( hDlg: HWND, nIDButton: c_int, ) -> UINT2658     pub fn IsDlgButtonChecked(
2659         hDlg: HWND,
2660         nIDButton: c_int,
2661     ) -> UINT;
SendDlgItemMessageA( hDlg: HWND, nIDDlgItem: c_int, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT2662     pub fn SendDlgItemMessageA(
2663         hDlg: HWND,
2664         nIDDlgItem: c_int,
2665         Msg: UINT,
2666         wParam: WPARAM,
2667         lParam: LPARAM,
2668     ) -> LRESULT;
SendDlgItemMessageW( hDlg: HWND, nIDDlgItem: c_int, Msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT2669     pub fn SendDlgItemMessageW(
2670         hDlg: HWND,
2671         nIDDlgItem: c_int,
2672         Msg: UINT,
2673         wParam: WPARAM,
2674         lParam: LPARAM,
2675     ) -> LRESULT;
GetNextDlgGroupItem( hDlg: HWND, hCtl: HWND, bPrevious: BOOL, ) -> HWND2676     pub fn GetNextDlgGroupItem(
2677         hDlg: HWND,
2678         hCtl: HWND,
2679         bPrevious: BOOL,
2680     ) -> HWND;
GetNextDlgTabItem( hDlg: HWND, hCtl: HWND, bPrevious: BOOL, ) -> HWND2681     pub fn GetNextDlgTabItem(
2682         hDlg: HWND,
2683         hCtl: HWND,
2684         bPrevious: BOOL,
2685     ) -> HWND;
GetDlgCtrlID( hwnd: HWND, ) -> c_int2686     pub fn GetDlgCtrlID(
2687         hwnd: HWND,
2688     ) -> c_int;
GetDialogBaseUnits() -> LONG2689     pub fn GetDialogBaseUnits() -> LONG;
DefDlgProcA( hDlg: HWND, msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT2690     pub fn DefDlgProcA(
2691         hDlg: HWND,
2692         msg: UINT,
2693         wParam: WPARAM,
2694         lParam: LPARAM,
2695     ) -> LRESULT;
DefDlgProcW( hDlg: HWND, msg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT2696     pub fn DefDlgProcW(
2697         hDlg: HWND,
2698         msg: UINT,
2699         wParam: WPARAM,
2700         lParam: LPARAM,
2701     ) -> LRESULT;
CallMsgFilterA( lpMsg: LPMSG, nCode: c_int, ) -> BOOL2702     pub fn CallMsgFilterA(
2703         lpMsg: LPMSG,
2704         nCode: c_int,
2705     ) -> BOOL;
CallMsgFilterW( lpMsg: LPMSG, nCode: c_int, ) -> BOOL2706     pub fn CallMsgFilterW(
2707         lpMsg: LPMSG,
2708         nCode: c_int,
2709     ) -> BOOL;
OpenClipboard( hWnd: HWND, ) -> BOOL2710     pub fn OpenClipboard(
2711         hWnd: HWND,
2712     ) -> BOOL;
CloseClipboard() -> BOOL2713     pub fn CloseClipboard() -> BOOL;
GetClipboardSequenceNumber() -> DWORD2714     pub fn GetClipboardSequenceNumber() -> DWORD;
GetClipboardOwner() -> HWND2715     pub fn GetClipboardOwner() -> HWND;
SetClipboardViewer( hWndNewViewer: HWND, ) -> HWND2716     pub fn SetClipboardViewer(
2717         hWndNewViewer: HWND,
2718     ) -> HWND;
GetClipboardViewer() -> HWND2719     pub fn GetClipboardViewer() -> HWND;
ChangeClipboardChain( hwndRemove: HWND, hwndNewNext: HWND, ) -> BOOL2720     pub fn ChangeClipboardChain(
2721         hwndRemove: HWND,
2722         hwndNewNext: HWND,
2723     ) -> BOOL;
SetClipboardData( uFormat: UINT, hMem: HANDLE, ) -> HANDLE2724     pub fn SetClipboardData(
2725         uFormat: UINT,
2726         hMem: HANDLE,
2727     ) -> HANDLE;
GetClipboardData( uFormat: UINT, ) -> HANDLE2728     pub fn GetClipboardData(
2729         uFormat: UINT,
2730     ) -> HANDLE;
RegisterClipboardFormatA( lpszFormat: LPCSTR, ) -> UINT2731     pub fn RegisterClipboardFormatA(
2732         lpszFormat: LPCSTR,
2733     ) -> UINT;
RegisterClipboardFormatW( lpszFormat: LPCWSTR, ) -> UINT2734     pub fn RegisterClipboardFormatW(
2735         lpszFormat: LPCWSTR,
2736     ) -> UINT;
CountClipboardFormats() -> c_int2737     pub fn CountClipboardFormats() -> c_int;
EnumClipboardFormats( format: UINT, ) -> UINT2738     pub fn EnumClipboardFormats(
2739         format: UINT,
2740     ) -> UINT;
GetClipboardFormatNameA( format: UINT, lpszFormatName: LPSTR, cchMaxCount: c_int, ) -> c_int2741     pub fn GetClipboardFormatNameA(
2742         format: UINT,
2743         lpszFormatName: LPSTR,
2744         cchMaxCount: c_int,
2745     ) -> c_int;
GetClipboardFormatNameW( format: UINT, lpszFormatName: LPWSTR, cchMaxCount: c_int, ) -> c_int2746     pub fn GetClipboardFormatNameW(
2747         format: UINT,
2748         lpszFormatName: LPWSTR,
2749         cchMaxCount: c_int,
2750     ) -> c_int;
EmptyClipboard() -> BOOL2751     pub fn EmptyClipboard() -> BOOL;
IsClipboardFormatAvailable( format: UINT, ) -> BOOL2752     pub fn IsClipboardFormatAvailable(
2753         format: UINT,
2754     ) -> BOOL;
GetPriorityClipboardFormat( paFormatPriorityList: *mut UINT, cFormats: c_int, ) -> c_int2755     pub fn GetPriorityClipboardFormat(
2756         paFormatPriorityList: *mut UINT,
2757         cFormats: c_int,
2758     ) -> c_int;
GetOpenClipboardWindow() -> HWND2759     pub fn GetOpenClipboardWindow() -> HWND;
AddClipboardFormatListener( hWnd: HWND, ) -> BOOL2760     pub fn AddClipboardFormatListener(
2761         hWnd: HWND,
2762     ) -> BOOL;
RemoveClipboardFormatListener( hWnd: HWND, ) -> BOOL2763     pub fn RemoveClipboardFormatListener(
2764         hWnd: HWND,
2765     ) -> BOOL;
GetUpdatedClipboardFormats( lpuiFormats: PUINT, cFormats: UINT, pcFormatsOUT: PUINT, ) -> BOOL2766     pub fn GetUpdatedClipboardFormats(
2767         lpuiFormats: PUINT,
2768         cFormats: UINT,
2769         pcFormatsOUT: PUINT,
2770     ) -> BOOL;
CharToOemA( pSrc: LPCSTR, pDst: LPSTR, ) -> BOOL2771     pub fn CharToOemA(
2772         pSrc: LPCSTR,
2773         pDst: LPSTR,
2774     ) -> BOOL;
CharToOemW( pSrc: LPCWSTR, pDst: LPSTR, ) -> BOOL2775     pub fn CharToOemW(
2776         pSrc: LPCWSTR,
2777         pDst: LPSTR,
2778     ) -> BOOL;
OemToCharA( pSrc: LPCSTR, pDst: LPSTR, ) -> BOOL2779     pub fn OemToCharA(
2780         pSrc: LPCSTR,
2781         pDst: LPSTR,
2782     ) -> BOOL;
OemToCharW( pSrc: LPCSTR, pDst: LPWSTR, ) -> BOOL2783     pub fn OemToCharW(
2784         pSrc: LPCSTR,
2785         pDst: LPWSTR,
2786     ) -> BOOL;
CharToOemBuffA( lpszSrc: LPCSTR, lpszDst: LPSTR, cchDstLength: DWORD, ) -> BOOL2787     pub fn CharToOemBuffA(
2788         lpszSrc: LPCSTR,
2789         lpszDst: LPSTR,
2790         cchDstLength: DWORD,
2791     ) -> BOOL;
CharToOemBuffW( lpszSrc: LPCWSTR, lpszDst: LPSTR, cchDstLength: DWORD, ) -> BOOL2792     pub fn CharToOemBuffW(
2793         lpszSrc: LPCWSTR,
2794         lpszDst: LPSTR,
2795         cchDstLength: DWORD,
2796     ) -> BOOL;
OemToCharBuffA( lpszSrc: LPCSTR, lpszDst: LPSTR, cchDstLength: DWORD, ) -> BOOL2797     pub fn OemToCharBuffA(
2798         lpszSrc: LPCSTR,
2799         lpszDst: LPSTR,
2800         cchDstLength: DWORD,
2801     ) -> BOOL;
OemToCharBuffW( lpszSrc: LPCSTR, lpszDst: LPWSTR, cchDstLength: DWORD, ) -> BOOL2802     pub fn OemToCharBuffW(
2803         lpszSrc: LPCSTR,
2804         lpszDst: LPWSTR,
2805         cchDstLength: DWORD,
2806     ) -> BOOL;
CharUpperA( lpsz: LPSTR, ) -> LPSTR2807     pub fn CharUpperA(
2808         lpsz: LPSTR,
2809     ) -> LPSTR;
CharUpperW( lpsz: LPWSTR, ) -> LPWSTR2810     pub fn CharUpperW(
2811         lpsz: LPWSTR,
2812     ) -> LPWSTR;
CharUpperBuffA( lpsz: LPSTR, cchLength: DWORD, ) -> DWORD2813     pub fn CharUpperBuffA(
2814         lpsz: LPSTR,
2815         cchLength: DWORD,
2816     ) -> DWORD;
CharUpperBuffW( lpsz: LPWSTR, cchLength: DWORD, ) -> DWORD2817     pub fn CharUpperBuffW(
2818         lpsz: LPWSTR,
2819         cchLength: DWORD,
2820     ) -> DWORD;
CharLowerA( lpsz: LPSTR, ) -> LPSTR2821     pub fn CharLowerA(
2822         lpsz: LPSTR,
2823     ) -> LPSTR;
CharLowerW( lpsz: LPWSTR, ) -> LPWSTR2824     pub fn CharLowerW(
2825         lpsz: LPWSTR,
2826     ) -> LPWSTR;
CharLowerBuffA( lpsz: LPSTR, cchLength: DWORD, ) -> DWORD2827     pub fn CharLowerBuffA(
2828         lpsz: LPSTR,
2829         cchLength: DWORD,
2830     ) -> DWORD;
CharLowerBuffW( lpsz: LPWSTR, cchLength: DWORD, ) -> DWORD2831     pub fn CharLowerBuffW(
2832         lpsz: LPWSTR,
2833         cchLength: DWORD,
2834     ) -> DWORD;
CharNextA( lpsz: LPCSTR, ) -> LPSTR2835     pub fn CharNextA(
2836         lpsz: LPCSTR,
2837     ) -> LPSTR;
CharNextW( lpsz: LPCWSTR, ) -> LPWSTR2838     pub fn CharNextW(
2839         lpsz: LPCWSTR,
2840     ) -> LPWSTR;
CharPrevA( lpszStart: LPCSTR, lpszCurrent: LPCSTR, ) -> LPSTR2841     pub fn CharPrevA(
2842         lpszStart: LPCSTR,
2843         lpszCurrent: LPCSTR,
2844     ) -> LPSTR;
CharPrevW( lpszStart: LPCWSTR, lpszCurrent: LPCWSTR, ) -> LPWSTR2845     pub fn CharPrevW(
2846         lpszStart: LPCWSTR,
2847         lpszCurrent: LPCWSTR,
2848     ) -> LPWSTR;
CharNextExA( codePage: WORD, lpCurrentChar: LPSTR, dwFlags: DWORD, ) -> LPSTR2849     pub fn CharNextExA(
2850         codePage: WORD,
2851         lpCurrentChar: LPSTR,
2852         dwFlags: DWORD,
2853     ) -> LPSTR;
CharPrevExA( codePage: WORD, lpStart: LPCSTR, lpCurrentChar: LPCSTR, dwFlags: DWORD, ) -> LPSTR2854     pub fn CharPrevExA(
2855         codePage: WORD,
2856         lpStart: LPCSTR,
2857         lpCurrentChar: LPCSTR,
2858         dwFlags: DWORD,
2859     ) -> LPSTR;
2860 }
2861 // AnsiToOem
2862 // OemToAnsi
2863 // AnsiToOemBuff
2864 // OemToAnsiBuff
2865 // AnsiUpper
2866 // AnsiUpperBuff
2867 // AnsiLower
2868 // AnsiLowerBuff
2869 // AnsiNext
2870 // AnsiPrev
2871 extern "system" {
IsCharAlphaA( ch: CHAR, ) -> BOOL2872     pub fn IsCharAlphaA(
2873         ch: CHAR,
2874     ) -> BOOL;
IsCharAlphaW( ch: WCHAR, ) -> BOOL2875     pub fn IsCharAlphaW(
2876         ch: WCHAR,
2877     ) -> BOOL;
IsCharAlphaNumericA( ch: CHAR, ) -> BOOL2878     pub fn IsCharAlphaNumericA(
2879         ch: CHAR,
2880     ) -> BOOL;
IsCharAlphaNumericW( ch: WCHAR, ) -> BOOL2881     pub fn IsCharAlphaNumericW(
2882         ch: WCHAR,
2883     ) -> BOOL;
IsCharUpperA( ch: CHAR, ) -> BOOL2884     pub fn IsCharUpperA(
2885         ch: CHAR,
2886     ) -> BOOL;
IsCharUpperW( ch: WCHAR, ) -> BOOL2887     pub fn IsCharUpperW(
2888         ch: WCHAR,
2889     ) -> BOOL;
IsCharLowerA( ch: CHAR, ) -> BOOL2890     pub fn IsCharLowerA(
2891         ch: CHAR,
2892     ) -> BOOL;
IsCharLowerW( ch: WCHAR, ) -> BOOL2893     pub fn IsCharLowerW(
2894         ch: WCHAR,
2895     ) -> BOOL;
SetFocus( hWnd: HWND, ) -> HWND2896     pub fn SetFocus(
2897         hWnd: HWND,
2898     ) -> HWND;
GetActiveWindow() -> HWND2899     pub fn GetActiveWindow() -> HWND;
GetFocus() -> HWND2900     pub fn GetFocus() -> HWND;
GetKBCodePage() -> UINT2901     pub fn GetKBCodePage() -> UINT;
GetKeyState( nVirtKey: c_int, ) -> SHORT2902     pub fn GetKeyState(
2903         nVirtKey: c_int,
2904     ) -> SHORT;
GetAsyncKeyState( vKey: c_int, ) -> SHORT2905     pub fn GetAsyncKeyState(
2906         vKey: c_int,
2907     ) -> SHORT;
GetKeyboardState( lpKeyState: PBYTE, ) -> BOOL2908     pub fn GetKeyboardState(
2909         lpKeyState: PBYTE,
2910     ) -> BOOL;
SetKeyboardState( lpKeyState: LPBYTE, ) -> BOOL2911     pub fn SetKeyboardState(
2912         lpKeyState: LPBYTE,
2913     ) -> BOOL;
GetKeyNameTextA( lparam: LONG, lpString: LPSTR, cchSize: c_int, ) -> c_int2914     pub fn GetKeyNameTextA(
2915         lparam: LONG,
2916         lpString: LPSTR,
2917         cchSize: c_int,
2918     ) -> c_int;
GetKeyNameTextW( lParam: LONG, lpString: LPWSTR, cchSize: c_int, ) -> c_int2919     pub fn GetKeyNameTextW(
2920         lParam: LONG,
2921         lpString: LPWSTR,
2922         cchSize: c_int,
2923     ) -> c_int;
GetKeyboardType( nTypeFlag: c_int, ) -> c_int2924     pub fn GetKeyboardType(
2925         nTypeFlag: c_int,
2926     ) -> c_int;
ToAscii( uVirtKey: UINT, uScanCode: UINT, lpKeyState: *const BYTE, lpChar: LPWORD, uFlags: UINT, ) -> c_int2927     pub fn ToAscii(
2928         uVirtKey: UINT,
2929         uScanCode: UINT,
2930         lpKeyState: *const BYTE,
2931         lpChar: LPWORD,
2932         uFlags: UINT,
2933     ) -> c_int;
ToAsciiEx( uVirtKey: UINT, uScanCode: UINT, lpKeyState: *const BYTE, lpChar: LPWORD, uFlags: UINT, dwhkl: HKL, ) -> c_int2934     pub fn ToAsciiEx(
2935         uVirtKey: UINT,
2936         uScanCode: UINT,
2937         lpKeyState: *const BYTE,
2938         lpChar: LPWORD,
2939         uFlags: UINT,
2940         dwhkl: HKL,
2941     ) -> c_int;
ToUnicode( wVirtKey: UINT, wScanCode: UINT, lpKeyState: *const BYTE, lwszBuff: LPWSTR, cchBuff: c_int, wFlags: UINT, ) -> c_int2942     pub fn ToUnicode(
2943         wVirtKey: UINT,
2944         wScanCode: UINT,
2945         lpKeyState: *const BYTE,
2946         lwszBuff: LPWSTR,
2947         cchBuff: c_int,
2948         wFlags: UINT,
2949     ) -> c_int;
OemKeyScan( wOemChar: WORD, ) -> DWORD2950     pub fn OemKeyScan(
2951         wOemChar: WORD,
2952     ) -> DWORD;
VkKeyScanA( ch: CHAR, ) -> SHORT2953     pub fn VkKeyScanA(
2954         ch: CHAR,
2955     ) -> SHORT;
VkKeyScanW( ch: WCHAR, ) -> SHORT2956     pub fn VkKeyScanW(
2957         ch: WCHAR,
2958     ) -> SHORT;
VkKeyScanExA( ch: CHAR, dwhkl: HKL, ) -> SHORT2959     pub fn VkKeyScanExA(
2960         ch: CHAR,
2961         dwhkl: HKL,
2962     ) -> SHORT;
VkKeyScanExW( ch: WCHAR, dwhkl: HKL, ) -> SHORT2963     pub fn VkKeyScanExW(
2964         ch: WCHAR,
2965         dwhkl: HKL,
2966     ) -> SHORT;
2967 }
2968 pub const KEYEVENTF_EXTENDEDKEY: DWORD = 0x0001;
2969 pub const KEYEVENTF_KEYUP: DWORD = 0x0002;
2970 pub const KEYEVENTF_UNICODE: DWORD = 0x0004;
2971 pub const KEYEVENTF_SCANCODE: DWORD = 0x0008;
2972 extern "system" {
keybd_event( bVk: BYTE, bScan: BYTE, dwFlags: DWORD, dwExtraInfo: ULONG_PTR, )2973     pub fn keybd_event(
2974         bVk: BYTE,
2975         bScan: BYTE,
2976         dwFlags: DWORD,
2977         dwExtraInfo: ULONG_PTR,
2978     );
2979 }
2980 pub const MOUSEEVENTF_MOVE: DWORD = 0x0001;
2981 pub const MOUSEEVENTF_LEFTDOWN: DWORD = 0x0002;
2982 pub const MOUSEEVENTF_LEFTUP: DWORD = 0x0004;
2983 pub const MOUSEEVENTF_RIGHTDOWN: DWORD = 0x0008;
2984 pub const MOUSEEVENTF_RIGHTUP: DWORD = 0x0010;
2985 pub const MOUSEEVENTF_MIDDLEDOWN: DWORD = 0x0020;
2986 pub const MOUSEEVENTF_MIDDLEUP: DWORD = 0x0040;
2987 pub const MOUSEEVENTF_XDOWN: DWORD = 0x0080;
2988 pub const MOUSEEVENTF_XUP: DWORD = 0x0100;
2989 pub const MOUSEEVENTF_WHEEL: DWORD = 0x0800;
2990 pub const MOUSEEVENTF_HWHEEL: DWORD = 0x01000;
2991 pub const MOUSEEVENTF_MOVE_NOCOALESCE: DWORD = 0x2000;
2992 pub const MOUSEEVENTF_VIRTUALDESK: DWORD = 0x4000;
2993 pub const MOUSEEVENTF_ABSOLUTE: DWORD = 0x8000;
2994 extern "system" {
mouse_event( dwFlags: DWORD, dx: DWORD, dy: DWORD, dwData: DWORD, dwExtraInfo: ULONG_PTR, )2995     pub fn mouse_event(
2996         dwFlags: DWORD,
2997         dx: DWORD,
2998         dy: DWORD,
2999         dwData: DWORD,
3000         dwExtraInfo: ULONG_PTR,
3001     );
3002 }
3003 STRUCT!{struct MOUSEINPUT {
3004     dx: LONG,
3005     dy: LONG,
3006     mouseData: DWORD,
3007     dwFlags: DWORD,
3008     time: DWORD,
3009     dwExtraInfo: ULONG_PTR,
3010 }}
3011 pub type PMOUSEINPUT = *mut MOUSEINPUT;
3012 pub type LPMOUSEINPUT = *mut MOUSEINPUT;
3013 STRUCT!{struct KEYBDINPUT {
3014     wVk: WORD,
3015     wScan: WORD,
3016     dwFlags: DWORD,
3017     time: DWORD,
3018     dwExtraInfo: ULONG_PTR,
3019 }}
3020 pub type PKEYBDINPUT = *mut KEYBDINPUT;
3021 pub type LPKEYBDINPUT = *mut KEYBDINPUT;
3022 STRUCT!{struct HARDWAREINPUT {
3023     uMsg: DWORD,
3024     wParamL: WORD,
3025     wParamH: WORD,
3026 }}
3027 pub type PHARDWAREINPUT = *mut HARDWAREINPUT;
3028 pub type LPHARDWAREINPUT= *mut HARDWAREINPUT;
3029 pub const INPUT_MOUSE: DWORD = 0;
3030 pub const INPUT_KEYBOARD: DWORD = 1;
3031 pub const INPUT_HARDWARE: DWORD = 2;
3032 UNION!{union INPUT_u {
3033     [u32; 6] [u64; 4],
3034     mi mi_mut: MOUSEINPUT,
3035     ki ki_mut: KEYBDINPUT,
3036     hi hi_mut: HARDWAREINPUT,
3037 }}
3038 STRUCT!{struct INPUT {
3039     type_: DWORD,
3040     u: INPUT_u,
3041 }}
3042 pub type PINPUT = *mut INPUT;
3043 pub type LPINPUT = *mut INPUT;
3044 extern "system" {
SendInput( cInputs: UINT, pInputs: LPINPUT, cbSize: c_int, ) -> UINT3045     pub fn SendInput(
3046         cInputs: UINT,
3047         pInputs: LPINPUT,
3048         cbSize: c_int,
3049     ) -> UINT;
3050 }
3051 DECLARE_HANDLE!{HTOUCHINPUT, HTOUCHINPUT__}
3052 STRUCT!{struct TOUCHINPUT {
3053     x: LONG,
3054     y: LONG,
3055     hSource: HANDLE,
3056     dwID: DWORD,
3057     dwFlags: DWORD,
3058     dwMask: DWORD,
3059     dwTime: DWORD,
3060     dwExtraInfo: ULONG_PTR,
3061     cxContact: DWORD,
3062     cyContact: DWORD,
3063 }}
3064 pub type PTOUCHINPUT = *mut TOUCHINPUT;
3065 pub type PCTOUCHINPUT = *const TOUCHINPUT;
3066 // TOUCH_COORD_TO_PIXEL
3067 pub const TOUCHEVENTF_MOVE: DWORD = 0x0001;
3068 pub const TOUCHEVENTF_DOWN: DWORD = 0x0002;
3069 pub const TOUCHEVENTF_UP: DWORD = 0x0004;
3070 pub const TOUCHEVENTF_INRANGE: DWORD = 0x0008;
3071 pub const TOUCHEVENTF_PRIMARY: DWORD = 0x0010;
3072 pub const TOUCHEVENTF_NOCOALESCE: DWORD = 0x0020;
3073 pub const TOUCHEVENTF_PEN: DWORD = 0x0040;
3074 pub const TOUCHEVENTF_PALM: DWORD = 0x0080;
3075 pub const TOUCHINPUTMASKF_TIMEFROMSYSTEM: DWORD = 0x0001;
3076 pub const TOUCHINPUTMASKF_EXTRAINFO: DWORD = 0x0002;
3077 pub const TOUCHINPUTMASKF_CONTACTAREA: DWORD = 0x0004;
3078 extern "system" {
GetTouchInputInfo( hTouchInput: HTOUCHINPUT, cInputs: c_uint, pInputs: PTOUCHINPUT, cbSize: c_int, ) -> BOOL3079     pub fn GetTouchInputInfo(
3080         hTouchInput: HTOUCHINPUT,
3081         cInputs: c_uint,
3082         pInputs: PTOUCHINPUT,
3083         cbSize: c_int,
3084     ) -> BOOL;
CloseTouchInputHandle( hTouchInput: HTOUCHINPUT, ) -> BOOL3085     pub fn CloseTouchInputHandle(
3086         hTouchInput: HTOUCHINPUT,
3087     ) -> BOOL;
3088 }
3089 pub const TWF_FINETOUCH: DWORD = 0x00000001;
3090 pub const TWF_WANTPALM: DWORD = 0x00000002;
3091 extern "system" {
RegisterTouchWindow( hWnd: HWND, flags: ULONG, ) -> BOOL3092     pub fn RegisterTouchWindow(
3093         hWnd: HWND,
3094         flags: ULONG,
3095     ) -> BOOL;
UnregisterTouchWindow( hwnd: HWND, ) -> BOOL3096     pub fn UnregisterTouchWindow(
3097         hwnd: HWND,
3098     ) -> BOOL;
IsTouchWindow( hwnd: HWND, pulFlags: PULONG, ) -> BOOL3099     pub fn IsTouchWindow(
3100         hwnd: HWND,
3101         pulFlags: PULONG,
3102     ) -> BOOL;
3103 }
3104 ENUM!{enum POINTER_INPUT_TYPE {
3105     PT_POINTER = 0x00000001,
3106     PT_TOUCH = 0x00000002,
3107     PT_PEN = 0x00000003,
3108     PT_MOUSE = 0x00000004,
3109     PT_TOUCHPAD = 0x00000005,
3110 }}
3111 ENUM!{enum POINTER_FLAGS {
3112     POINTER_FLAG_NONE = 0x00000000,
3113     POINTER_FLAG_NEW = 0x00000001,
3114     POINTER_FLAG_INRANGE = 0x00000002,
3115     POINTER_FLAG_INCONTACT = 0x00000004,
3116     POINTER_FLAG_FIRSTBUTTON = 0x00000010,
3117     POINTER_FLAG_SECONDBUTTON = 0x00000020,
3118     POINTER_FLAG_THIRDBUTTON = 0x00000040,
3119     POINTER_FLAG_FOURTHBUTTON = 0x00000080,
3120     POINTER_FLAG_FIFTHBUTTON = 0x00000100,
3121     POINTER_FLAG_PRIMARY = 0x00002000,
3122     POINTER_FLAG_CONFIDENCE = 0x00004000,
3123     POINTER_FLAG_CANCELED = 0x00008000,
3124     POINTER_FLAG_DOWN = 0x00010000,
3125     POINTER_FLAG_UPDATE = 0x00020000,
3126     POINTER_FLAG_UP = 0x00040000,
3127     POINTER_FLAG_WHEEL = 0x00080000,
3128     POINTER_FLAG_HWHEEL = 0x00100000,
3129     POINTER_FLAG_CAPTURECHANGED = 0x00200000,
3130     POINTER_FLAG_HASTRANSFORM = 0x00400000,
3131 }}
3132 pub const POINTER_MOD_SHIFT: DWORD = 0x0004;
3133 pub const POINTER_MOD_CTRL: DWORD = 0x0008;
3134 ENUM!{enum POINTER_BUTTON_CHANGE_TYPE {
3135     POINTER_CHANGE_NONE,
3136     POINTER_CHANGE_FIRSTBUTTON_DOWN,
3137     POINTER_CHANGE_FIRSTBUTTON_UP,
3138     POINTER_CHANGE_SECONDBUTTON_DOWN,
3139     POINTER_CHANGE_SECONDBUTTON_UP,
3140     POINTER_CHANGE_THIRDBUTTON_DOWN,
3141     POINTER_CHANGE_THIRDBUTTON_UP,
3142     POINTER_CHANGE_FOURTHBUTTON_DOWN,
3143     POINTER_CHANGE_FOURTHBUTTON_UP,
3144     POINTER_CHANGE_FIFTHBUTTON_DOWN,
3145     POINTER_CHANGE_FIFTHBUTTON_UP,
3146 }}
3147 STRUCT!{struct POINTER_INFO {
3148     pointerType: POINTER_INPUT_TYPE,
3149     pointerId: UINT32,
3150     frameId: UINT32,
3151     pointerFlags: POINTER_FLAGS,
3152     sourceDevice: HANDLE,
3153     hwndTarget: HWND,
3154     ptPixelLocation: POINT,
3155     ptHimetricLocation: POINT,
3156     ptPixelLocationRaw: POINT,
3157     ptHimetricLocationRaw: POINT,
3158     dwTime: DWORD,
3159     historyCount: UINT32,
3160     InputData: INT32,
3161     dwKeyStates: DWORD,
3162     PerformanceCount: UINT64,
3163     ButtonChangeType: POINTER_BUTTON_CHANGE_TYPE,
3164 }}
3165 ENUM!{enum TOUCH_FLAGS {
3166     TOUCH_FLAG_NONE = 0x00000000,
3167 }}
3168 ENUM!{enum TOUCH_MASK {
3169     TOUCH_MASK_NONE = 0x00000000,
3170     TOUCH_MASK_CONTACTAREA = 0x00000001,
3171     TOUCH_MASK_ORIENTATION = 0x00000002,
3172     TOUCH_MASK_PRESSURE = 0x00000004,
3173 }}
3174 STRUCT!{struct POINTER_TOUCH_INFO {
3175     pointerInfo: POINTER_INFO,
3176     touchFlags: TOUCH_FLAGS,
3177     touchMask: TOUCH_MASK,
3178     rcContact: RECT,
3179     rcContactRaw: RECT,
3180     orientation: UINT32,
3181     pressure: UINT32,
3182 }}
3183 ENUM!{enum PEN_FLAGS {
3184     PEN_FLAG_NONE = 0x00000000,
3185     PEN_FLAG_BARREL = 0x00000001,
3186     PEN_FLAG_INVERTED = 0x00000002,
3187     PEN_FLAG_ERASER = 0x00000004,
3188 }}
3189 ENUM!{enum PEN_MASK {
3190     PEN_MASK_NONE = 0x00000000,
3191     PEN_MASK_PRESSURE = 0x00000001,
3192     PEN_MASK_ROTATION = 0x00000002,
3193     PEN_MASK_TILT_X = 0x00000004,
3194     PEN_MASK_TILT_Y = 0x00000008,
3195 }}
3196 STRUCT!{struct POINTER_PEN_INFO {
3197     pointerInfo: POINTER_INFO,
3198     penFlags: PEN_FLAGS,
3199     penMask: PEN_MASK,
3200     pressure: UINT32,
3201     rotation: UINT32,
3202     tiltX: INT32,
3203     tiltY: INT32,
3204 }}
3205 pub const POINTER_MESSAGE_FLAG_NEW: DWORD = 0x00000001;
3206 pub const POINTER_MESSAGE_FLAG_INRANGE: DWORD = 0x00000002;
3207 pub const POINTER_MESSAGE_FLAG_INCONTACT: DWORD = 0x00000004;
3208 pub const POINTER_MESSAGE_FLAG_FIRSTBUTTON: DWORD = 0x00000010;
3209 pub const POINTER_MESSAGE_FLAG_SECONDBUTTON: DWORD = 0x00000020;
3210 pub const POINTER_MESSAGE_FLAG_THIRDBUTTON: DWORD = 0x00000040;
3211 pub const POINTER_MESSAGE_FLAG_FOURTHBUTTON: DWORD = 0x00000080;
3212 pub const POINTER_MESSAGE_FLAG_FIFTHBUTTON: DWORD = 0x00000100;
3213 pub const POINTER_MESSAGE_FLAG_PRIMARY: DWORD = 0x00002000;
3214 pub const POINTER_MESSAGE_FLAG_CONFIDENCE: DWORD = 0x00004000;
3215 pub const POINTER_MESSAGE_FLAG_CANCELED: DWORD = 0x00008000;
3216 pub const PA_ACTIVATE: UINT = MA_ACTIVATE;
3217 pub const PA_NOACTIVATE: UINT = MA_NOACTIVATE;
3218 pub const MAX_TOUCH_COUNT: UINT32 = 256;
3219 pub const TOUCH_FEEDBACK_DEFAULT: DWORD = 0x1;
3220 pub const TOUCH_FEEDBACK_INDIRECT: DWORD = 0x2;
3221 pub const TOUCH_FEEDBACK_NONE: DWORD = 0x3;
3222 extern "system" {
InitializeTouchInjection( maxCount: UINT32, dwMode: DWORD, ) -> BOOL3223     pub fn InitializeTouchInjection(
3224         maxCount: UINT32,
3225         dwMode: DWORD,
3226     ) -> BOOL;
InjectTouchInput( count: UINT32, contacts: *const POINTER_TOUCH_INFO, ) -> BOOL3227     pub fn InjectTouchInput(
3228         count: UINT32,
3229         contacts: *const POINTER_TOUCH_INFO,
3230     ) -> BOOL;
3231 }
3232 STRUCT!{struct USAGE_PROPERTIES {
3233     level: USHORT,
3234     page: USHORT,
3235     usage: USHORT,
3236     logicalMinimum: INT32,
3237     logicalMaximum: INT32,
3238     unit: USHORT,
3239     exponent: USHORT,
3240     count: BYTE,
3241     physicalMinimum: INT32,
3242     physicalMaximum: INT32,
3243 }}
3244 pub type PUSAGE_PROPERTIES = *mut USAGE_PROPERTIES;
3245 UNION!{union POINTER_TYPE_INFO_u {
3246     [u64; 17] [u64; 18],
3247     touchInfo touchInfo_mut: POINTER_TOUCH_INFO,
3248     penInfo penInfo_mut: POINTER_PEN_INFO,
3249 }}
3250 STRUCT!{struct POINTER_TYPE_INFO {
3251     type_: POINTER_INPUT_TYPE,
3252     u: POINTER_TYPE_INFO_u,
3253 }}
3254 pub type PPOINTER_TYPE_INFO = *mut POINTER_TYPE_INFO;
3255 STRUCT!{struct INPUT_INJECTION_VALUE {
3256     page: USHORT,
3257     usage: USHORT,
3258     value: INT32,
3259     index: USHORT,
3260 }}
3261 pub type PINPUT_INJECTION_VALUE = *mut INPUT_INJECTION_VALUE;
3262 extern "system" {
GetPointerType( pointerId: UINT32, pointerType: *mut POINTER_INPUT_TYPE, ) -> BOOL3263     pub fn GetPointerType(
3264         pointerId: UINT32,
3265         pointerType: *mut POINTER_INPUT_TYPE,
3266     ) -> BOOL;
GetPointerCursorId( pointerId: UINT32, cursorId: *mut UINT32, ) -> BOOL3267     pub fn GetPointerCursorId(
3268         pointerId: UINT32,
3269         cursorId: *mut UINT32,
3270     ) -> BOOL;
GetPointerInfo( pointerId: UINT32, pointerInfo: *mut POINTER_INFO, ) -> BOOL3271     pub fn GetPointerInfo(
3272         pointerId: UINT32,
3273         pointerInfo: *mut POINTER_INFO,
3274     ) -> BOOL;
GetPointerInfoHistory( pointerId: UINT32, entriesCount: *mut UINT32, pointerInfo: *mut POINTER_INFO, ) -> BOOL3275     pub fn GetPointerInfoHistory(
3276         pointerId: UINT32,
3277         entriesCount: *mut UINT32,
3278         pointerInfo: *mut POINTER_INFO,
3279     ) -> BOOL;
GetPointerFrameInfo( pointerId: UINT32, pointerCount: *mut UINT32, pointerInfo: *mut POINTER_INFO, ) -> BOOL3280     pub fn GetPointerFrameInfo(
3281         pointerId: UINT32,
3282         pointerCount: *mut UINT32,
3283         pointerInfo: *mut POINTER_INFO,
3284     ) -> BOOL;
GetPointerFrameInfoHistory( pointerId: UINT32, entriesCount: *mut UINT32, pointerCount: *mut UINT32, pointerInfo: *mut POINTER_INFO, ) -> BOOL3285     pub fn GetPointerFrameInfoHistory(
3286         pointerId: UINT32,
3287         entriesCount: *mut UINT32,
3288         pointerCount: *mut UINT32,
3289         pointerInfo: *mut POINTER_INFO,
3290     ) -> BOOL;
GetPointerTouchInfo( pointerId: UINT32, touchInfo: *mut POINTER_TOUCH_INFO, ) -> BOOL3291     pub fn GetPointerTouchInfo(
3292         pointerId: UINT32,
3293         touchInfo: *mut POINTER_TOUCH_INFO,
3294     ) -> BOOL;
GetPointerTouchInfoHistory( pointerId: UINT32, entriesCount: *mut UINT32, touchInfo: *mut POINTER_TOUCH_INFO, ) -> BOOL3295     pub fn GetPointerTouchInfoHistory(
3296         pointerId: UINT32,
3297         entriesCount: *mut UINT32,
3298         touchInfo: *mut POINTER_TOUCH_INFO,
3299     ) -> BOOL;
GetPointerFrameTouchInfo( pointerId: UINT32, pointerCount: *mut UINT32, touchInfo: *mut POINTER_TOUCH_INFO, ) -> BOOL3300     pub fn GetPointerFrameTouchInfo(
3301         pointerId: UINT32,
3302         pointerCount: *mut UINT32,
3303         touchInfo: *mut POINTER_TOUCH_INFO,
3304     ) -> BOOL;
GetPointerFrameTouchInfoHistory( pointerId: UINT32, entriesCount: *mut UINT32, pointerCount: *mut UINT32, touchInfo: *mut POINTER_TOUCH_INFO, ) -> BOOL3305     pub fn GetPointerFrameTouchInfoHistory(
3306         pointerId: UINT32,
3307         entriesCount: *mut UINT32,
3308         pointerCount: *mut UINT32,
3309         touchInfo: *mut POINTER_TOUCH_INFO,
3310     ) -> BOOL;
GetPointerPenInfo( pointerId: UINT32, penInfo: *mut POINTER_PEN_INFO, ) -> BOOL3311     pub fn GetPointerPenInfo(
3312         pointerId: UINT32,
3313         penInfo: *mut POINTER_PEN_INFO,
3314     ) -> BOOL;
GetPointerPenInfoHistory( pointerId: UINT32, entriesCount: *mut UINT32, penInfo: *mut POINTER_PEN_INFO, ) -> BOOL3315     pub fn GetPointerPenInfoHistory(
3316         pointerId: UINT32,
3317         entriesCount: *mut UINT32,
3318         penInfo: *mut POINTER_PEN_INFO,
3319     ) -> BOOL;
GetPointerFramePenInfo( pointerId: UINT32, pointerCount: *mut UINT32, penInfo: *mut POINTER_PEN_INFO, ) -> BOOL3320     pub fn GetPointerFramePenInfo(
3321         pointerId: UINT32,
3322         pointerCount: *mut UINT32,
3323         penInfo: *mut POINTER_PEN_INFO,
3324     ) -> BOOL;
GetPointerFramePenInfoHistory( pointerId: UINT32, entriesCount: *mut UINT32, pointerCount: *mut UINT32, penInfo: *mut POINTER_PEN_INFO, ) -> BOOL3325     pub fn GetPointerFramePenInfoHistory(
3326         pointerId: UINT32,
3327         entriesCount: *mut UINT32,
3328         pointerCount: *mut UINT32,
3329         penInfo: *mut POINTER_PEN_INFO,
3330     ) -> BOOL;
SkipPointerFrameMessages( pointerId: UINT32, ) -> BOOL3331     pub fn SkipPointerFrameMessages(
3332         pointerId: UINT32,
3333     ) -> BOOL;
RegisterPointerInputTarget( hwnd: HWND, pointerType: POINTER_INPUT_TYPE, ) -> BOOL3334     pub fn RegisterPointerInputTarget(
3335         hwnd: HWND,
3336         pointerType: POINTER_INPUT_TYPE,
3337     ) -> BOOL;
UnregisterPointerInputTarget( hwnd: HWND, pointerType: POINTER_INPUT_TYPE, ) -> BOOL3338     pub fn UnregisterPointerInputTarget(
3339         hwnd: HWND,
3340         pointerType: POINTER_INPUT_TYPE,
3341     ) -> BOOL;
RegisterPointerInputTargetEx( hwnd: HWND, pointerType: POINTER_INPUT_TYPE, fObserve: BOOL, ) -> BOOL3342     pub fn RegisterPointerInputTargetEx(
3343         hwnd: HWND,
3344         pointerType: POINTER_INPUT_TYPE,
3345         fObserve: BOOL,
3346     ) -> BOOL;
UnregisterPointerInputTargetEx( hwnd: HWND, pointerType: POINTER_INPUT_TYPE, ) -> BOOL3347     pub fn UnregisterPointerInputTargetEx(
3348         hwnd: HWND,
3349         pointerType: POINTER_INPUT_TYPE,
3350     ) -> BOOL;
EnableMouseInPointer( fEnable: BOOL, ) -> BOOL3351     pub fn EnableMouseInPointer(
3352         fEnable: BOOL,
3353     ) -> BOOL;
IsMouseInPointerEnabled() -> BOOL3354     pub fn IsMouseInPointerEnabled() -> BOOL;
3355 }
3356 pub const TOUCH_HIT_TESTING_DEFAULT: ULONG = 0x0;
3357 pub const TOUCH_HIT_TESTING_CLIENT: ULONG = 0x1;
3358 pub const TOUCH_HIT_TESTING_NONE: ULONG = 0x2;
3359 extern "system" {
RegisterTouchHitTestingWindow( hwnd: HWND, value: ULONG, ) -> BOOL3360     pub fn RegisterTouchHitTestingWindow(
3361         hwnd: HWND,
3362         value: ULONG,
3363     ) -> BOOL;
3364 }
3365 STRUCT!{struct TOUCH_HIT_TESTING_PROXIMITY_EVALUATION {
3366     score: UINT16,
3367     adjustedPoint: POINT,
3368 }}
3369 pub type PTOUCH_HIT_TESTING_PROXIMITY_EVALUATION = *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION;
3370 STRUCT!{struct TOUCH_HIT_TESTING_INPUT {
3371     pointerId: UINT32,
3372     point: POINT,
3373     boundingBox: RECT,
3374     nonOccludedBoundingBox: RECT,
3375     orientation: UINT32,
3376 }}
3377 pub type PTOUCH_HIT_TESTING_INPUT = *mut TOUCH_HIT_TESTING_INPUT;
3378 pub const TOUCH_HIT_TESTING_PROXIMITY_CLOSEST: UINT16 = 0x0;
3379 pub const TOUCH_HIT_TESTING_PROXIMITY_FARTHEST: UINT16 = 0xFFF;
3380 extern "system" {
EvaluateProximityToRect( controlBoundingBox: *const RECT, pHitTestingInput: *const TOUCH_HIT_TESTING_INPUT, pProximityEval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION, ) -> BOOL3381     pub fn EvaluateProximityToRect(
3382         controlBoundingBox: *const RECT,
3383         pHitTestingInput: *const TOUCH_HIT_TESTING_INPUT,
3384         pProximityEval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION,
3385     ) -> BOOL;
EvaluateProximityToPolygon( numVertices: UINT32, controlPolygon: *const POINT, pHitTestingInput: *const TOUCH_HIT_TESTING_INPUT, pProximityEval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION, ) -> BOOL3386     pub fn EvaluateProximityToPolygon(
3387         numVertices: UINT32,
3388         controlPolygon: *const POINT,
3389         pHitTestingInput: *const TOUCH_HIT_TESTING_INPUT,
3390         pProximityEval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION,
3391     ) -> BOOL;
PackTouchHitTestingProximityEvaluation( pHitTestingInput: *const TOUCH_HIT_TESTING_INPUT, pProximityEval: *const TOUCH_HIT_TESTING_PROXIMITY_EVALUATION, ) -> LRESULT3392     pub fn PackTouchHitTestingProximityEvaluation(
3393         pHitTestingInput: *const TOUCH_HIT_TESTING_INPUT,
3394         pProximityEval: *const TOUCH_HIT_TESTING_PROXIMITY_EVALUATION,
3395     ) -> LRESULT;
3396 }
3397 ENUM!{enum FEEDBACK_TYPE {
3398     FEEDBACK_TOUCH_CONTACTVISUALIZATION = 1,
3399     FEEDBACK_PEN_BARRELVISUALIZATION = 2,
3400     FEEDBACK_PEN_TAP = 3,
3401     FEEDBACK_PEN_DOUBLETAP = 4,
3402     FEEDBACK_PEN_PRESSANDHOLD = 5,
3403     FEEDBACK_PEN_RIGHTTAP = 6,
3404     FEEDBACK_TOUCH_TAP = 7,
3405     FEEDBACK_TOUCH_DOUBLETAP = 8,
3406     FEEDBACK_TOUCH_PRESSANDHOLD = 9,
3407     FEEDBACK_TOUCH_RIGHTTAP = 10,
3408     FEEDBACK_GESTURE_PRESSANDTAP = 11,
3409     FEEDBACK_MAX = 0xFFFFFFFF,
3410 }}
3411 pub const GWFS_INCLUDE_ANCESTORS: DWORD = 0x00000001;
3412 extern "system" {
GetWindowFeedbackSetting( hwnd: HWND, feedback: FEEDBACK_TYPE, dwFlags: DWORD, pSize: *mut UINT32, config: *mut VOID, ) -> BOOL3413     pub fn GetWindowFeedbackSetting(
3414         hwnd: HWND,
3415         feedback: FEEDBACK_TYPE,
3416         dwFlags: DWORD,
3417         pSize: *mut UINT32,
3418         config: *mut VOID,
3419     ) -> BOOL;
SetWindowFeedbackSetting( hwnd: HWND, feedback: FEEDBACK_TYPE, dwFlags: DWORD, size: UINT32, configuration: *const VOID, ) -> BOOL3420     pub fn SetWindowFeedbackSetting(
3421         hwnd: HWND,
3422         feedback: FEEDBACK_TYPE,
3423         dwFlags: DWORD,
3424         size: UINT32,
3425         configuration: *const VOID,
3426     ) -> BOOL;
3427 }
3428 STRUCT!{struct INPUT_TRANSFORM {
3429     m: [[f32; 4]; 4],
3430 }}
3431 extern "system" {
GetPointerInputTransform( pointerId: UINT32, historyCount: UINT32, inputTransform: *mut INPUT_TRANSFORM, ) -> BOOL3432     pub fn GetPointerInputTransform(
3433         pointerId: UINT32,
3434         historyCount: UINT32,
3435         inputTransform: *mut INPUT_TRANSFORM,
3436     ) -> BOOL;
3437 }
3438 STRUCT!{struct LASTINPUTINFO {
3439     cbSize: UINT,
3440     dwTime: DWORD,
3441 }}
3442 pub type PLASTINPUTINFO = *mut LASTINPUTINFO;
3443 extern "system" {
GetLastInputInfo( plii: PLASTINPUTINFO, ) -> BOOL3444     pub fn GetLastInputInfo(
3445         plii: PLASTINPUTINFO,
3446     ) -> BOOL;
MapVirtualKeyA( nCode: UINT, uMapType: UINT, ) -> UINT3447     pub fn MapVirtualKeyA(
3448         nCode: UINT,
3449         uMapType: UINT,
3450     ) -> UINT;
MapVirtualKeyW( nCode: UINT, uMapType: UINT, ) -> UINT3451     pub fn MapVirtualKeyW(
3452         nCode: UINT,
3453         uMapType: UINT,
3454     ) -> UINT;
MapVirtualKeyExA( nCode: UINT, uMapType: UINT, dwhkl: HKL, ) -> UINT3455     pub fn MapVirtualKeyExA(
3456         nCode: UINT,
3457         uMapType: UINT,
3458         dwhkl: HKL,
3459     ) -> UINT;
MapVirtualKeyExW( nCode: UINT, uMapType: UINT, dwhkl: HKL, ) -> UINT3460     pub fn MapVirtualKeyExW(
3461         nCode: UINT,
3462         uMapType: UINT,
3463         dwhkl: HKL,
3464     ) -> UINT;
3465 }
3466 pub const MAPVK_VK_TO_VSC: UINT = 0;
3467 pub const MAPVK_VSC_TO_VK: UINT = 1;
3468 pub const MAPVK_VK_TO_CHAR: UINT = 2;
3469 pub const MAPVK_VSC_TO_VK_EX: UINT = 3;
3470 pub const MAPVK_VK_TO_VSC_EX: UINT = 4;
3471 extern "system" {
GetInputState() -> BOOL3472     pub fn GetInputState() -> BOOL;
GetQueueStatus( flags: UINT, ) -> DWORD3473     pub fn GetQueueStatus(
3474         flags: UINT,
3475     ) -> DWORD;
GetCapture() -> HWND3476     pub fn GetCapture() -> HWND;
SetCapture( hWnd: HWND, ) -> HWND3477     pub fn SetCapture(
3478         hWnd: HWND,
3479     ) -> HWND;
ReleaseCapture() -> BOOL3480     pub fn ReleaseCapture() -> BOOL;
MsgWaitForMultipleObjects( nCount: DWORD, pHandles: *const HANDLE, fWaitAll: BOOL, dwMilliseconds: DWORD, dwWakeMask: DWORD, ) -> DWORD3481     pub fn MsgWaitForMultipleObjects(
3482         nCount: DWORD,
3483         pHandles: *const HANDLE,
3484         fWaitAll: BOOL,
3485         dwMilliseconds: DWORD,
3486         dwWakeMask: DWORD,
3487     ) -> DWORD;
MsgWaitForMultipleObjectsEx( nCount: DWORD, pHandles: *const HANDLE, dwMilliseconds: DWORD, dwWakeMask: DWORD, dwFlags: DWORD, ) -> DWORD3488     pub fn MsgWaitForMultipleObjectsEx(
3489         nCount: DWORD,
3490         pHandles: *const HANDLE,
3491         dwMilliseconds: DWORD,
3492         dwWakeMask: DWORD,
3493         dwFlags: DWORD,
3494     ) -> DWORD;
3495 }
3496 pub const MWMO_WAITALL: UINT = 0x0001;
3497 pub const MWMO_ALERTABLE: UINT = 0x0002;
3498 pub const MWMO_INPUTAVAILABLE: UINT = 0x0004;
3499 pub const QS_KEY: UINT = 0x0001;
3500 pub const QS_MOUSEMOVE: UINT = 0x0002;
3501 pub const QS_MOUSEBUTTON: UINT = 0x0004;
3502 pub const QS_POSTMESSAGE: UINT = 0x0008;
3503 pub const QS_TIMER: UINT = 0x0010;
3504 pub const QS_PAINT: UINT = 0x0020;
3505 pub const QS_SENDMESSAGE: UINT = 0x0040;
3506 pub const QS_HOTKEY: UINT = 0x0080;
3507 pub const QS_ALLPOSTMESSAGE: UINT = 0x0100;
3508 pub const QS_RAWINPUT: UINT = 0x0400;
3509 pub const QS_TOUCH: UINT = 0x0800;
3510 pub const QS_POINTER: UINT = 0x1000;
3511 pub const QS_MOUSE: UINT = QS_MOUSEMOVE | QS_MOUSEBUTTON;
3512 pub const QS_INPUT: UINT = QS_MOUSE | QS_KEY | QS_RAWINPUT | QS_TOUCH | QS_POINTER;
3513 pub const QS_ALLEVENTS: UINT = QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY;
3514 pub const QS_ALLINPUT: UINT = QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY
3515     | QS_SENDMESSAGE;
3516 pub const USER_TIMER_MAXIMUM: UINT = 0x7FFFFFFF;
3517 pub const USER_TIMER_MINIMUM: UINT = 0x0000000A;
3518 extern "system" {
SetTimer( hWnd: HWND, nIDEvent: UINT_PTR, uElapse: UINT, lpTimerFunc: TIMERPROC, ) -> UINT_PTR3519     pub fn SetTimer(
3520         hWnd: HWND,
3521         nIDEvent: UINT_PTR,
3522         uElapse: UINT,
3523         lpTimerFunc: TIMERPROC,
3524     ) -> UINT_PTR;
3525 }
3526 pub const TIMERV_DEFAULT_COALESCING: ULONG = 0;
3527 pub const TIMERV_NO_COALESCING: ULONG = 0xFFFFFFFF;
3528 pub const TIMERV_COALESCING_MIN: ULONG = 1;
3529 pub const TIMERV_COALESCING_MAX: ULONG = 0x7FFFFFF5;
3530 extern "system" {
SetCoalescableTimer( hWnd: HWND, nIDEvent: UINT_PTR, uElapse: UINT, lpTimerFunc: TIMERPROC, uToleranceDelay: ULONG, ) -> UINT_PTR3531     pub fn SetCoalescableTimer(
3532         hWnd: HWND,
3533         nIDEvent: UINT_PTR,
3534         uElapse: UINT,
3535         lpTimerFunc: TIMERPROC,
3536         uToleranceDelay: ULONG,
3537     ) -> UINT_PTR;
KillTimer( hWnd: HWND, uIDEvent: UINT_PTR, ) -> BOOL3538     pub fn KillTimer(
3539         hWnd: HWND,
3540         uIDEvent: UINT_PTR,
3541     ) -> BOOL;
IsWindowUnicode( hWnd: HWND, ) -> BOOL3542     pub fn IsWindowUnicode(
3543         hWnd: HWND,
3544     ) -> BOOL;
EnableWindow( hWnd: HWND, bEnable: BOOL, ) -> BOOL3545     pub fn EnableWindow(
3546         hWnd: HWND,
3547         bEnable: BOOL,
3548     ) -> BOOL;
IsWindowEnabled( hWnd: HWND, ) -> BOOL3549     pub fn IsWindowEnabled(
3550         hWnd: HWND,
3551     ) -> BOOL;
LoadAcceleratorsA( hInstance: HINSTANCE, lpTableName: LPCSTR, ) -> HACCEL3552     pub fn LoadAcceleratorsA(
3553         hInstance: HINSTANCE,
3554         lpTableName: LPCSTR,
3555     ) -> HACCEL;
LoadAcceleratorsW( hInstance: HINSTANCE, lpTableName: LPCWSTR, ) -> HACCEL3556     pub fn LoadAcceleratorsW(
3557         hInstance: HINSTANCE,
3558         lpTableName: LPCWSTR,
3559     ) -> HACCEL;
CreateAcceleratorTableA( paccel: LPACCEL, cAccel: c_int, ) -> HACCEL3560     pub fn CreateAcceleratorTableA(
3561         paccel: LPACCEL,
3562         cAccel: c_int,
3563     ) -> HACCEL;
CreateAcceleratorTableW( paccel: LPACCEL, cAccel: c_int, ) -> HACCEL3564     pub fn CreateAcceleratorTableW(
3565         paccel: LPACCEL,
3566         cAccel: c_int,
3567     ) -> HACCEL;
DestroyAcceleratorTable( hAccel: HACCEL, ) -> BOOL3568     pub fn DestroyAcceleratorTable(
3569         hAccel: HACCEL,
3570     ) -> BOOL;
CopyAcceleratorTableA( hAccelSrc: HACCEL, lpAccelDst: LPACCEL, cAccelEntries: c_int, ) -> c_int3571     pub fn CopyAcceleratorTableA(
3572         hAccelSrc: HACCEL,
3573         lpAccelDst: LPACCEL,
3574         cAccelEntries: c_int,
3575     ) -> c_int;
CopyAcceleratorTableW( hAccelSrc: HACCEL, lpAccelDst: LPACCEL, cAccelEntries: c_int, ) -> c_int3576     pub fn CopyAcceleratorTableW(
3577         hAccelSrc: HACCEL,
3578         lpAccelDst: LPACCEL,
3579         cAccelEntries: c_int,
3580     ) -> c_int;
TranslateAcceleratorA( hWnd: HWND, hAccTable: HACCEL, lpMsg: LPMSG, ) -> c_int3581     pub fn TranslateAcceleratorA(
3582         hWnd: HWND,
3583         hAccTable: HACCEL,
3584         lpMsg: LPMSG,
3585     ) -> c_int;
TranslateAcceleratorW( hWnd: HWND, hAccTable: HACCEL, lpMsg: LPMSG, ) -> c_int3586     pub fn TranslateAcceleratorW(
3587         hWnd: HWND,
3588         hAccTable: HACCEL,
3589         lpMsg: LPMSG,
3590     ) -> c_int;
3591 }
3592 pub const SM_CXSCREEN: c_int = 0;
3593 pub const SM_CYSCREEN: c_int = 1;
3594 pub const SM_CXVSCROLL: c_int = 2;
3595 pub const SM_CYHSCROLL: c_int = 3;
3596 pub const SM_CYCAPTION: c_int = 4;
3597 pub const SM_CXBORDER: c_int = 5;
3598 pub const SM_CYBORDER: c_int = 6;
3599 pub const SM_CXDLGFRAME: c_int = 7;
3600 pub const SM_CYDLGFRAME: c_int = 8;
3601 pub const SM_CYVTHUMB: c_int = 9;
3602 pub const SM_CXHTHUMB: c_int = 10;
3603 pub const SM_CXICON: c_int = 11;
3604 pub const SM_CYICON: c_int = 12;
3605 pub const SM_CXCURSOR: c_int = 13;
3606 pub const SM_CYCURSOR: c_int = 14;
3607 pub const SM_CYMENU: c_int = 15;
3608 pub const SM_CXFULLSCREEN: c_int = 16;
3609 pub const SM_CYFULLSCREEN: c_int = 17;
3610 pub const SM_CYKANJIWINDOW: c_int = 18;
3611 pub const SM_MOUSEPRESENT: c_int = 19;
3612 pub const SM_CYVSCROLL: c_int = 20;
3613 pub const SM_CXHSCROLL: c_int = 21;
3614 pub const SM_DEBUG: c_int = 22;
3615 pub const SM_SWAPBUTTON: c_int = 23;
3616 pub const SM_RESERVED1: c_int = 24;
3617 pub const SM_RESERVED2: c_int = 25;
3618 pub const SM_RESERVED3: c_int = 26;
3619 pub const SM_RESERVED4: c_int = 27;
3620 pub const SM_CXMIN: c_int = 28;
3621 pub const SM_CYMIN: c_int = 29;
3622 pub const SM_CXSIZE: c_int = 30;
3623 pub const SM_CYSIZE: c_int = 31;
3624 pub const SM_CXFRAME: c_int = 32;
3625 pub const SM_CYFRAME: c_int = 33;
3626 pub const SM_CXMINTRACK: c_int = 34;
3627 pub const SM_CYMINTRACK: c_int = 35;
3628 pub const SM_CXDOUBLECLK: c_int = 36;
3629 pub const SM_CYDOUBLECLK: c_int = 37;
3630 pub const SM_CXICONSPACING: c_int = 38;
3631 pub const SM_CYICONSPACING: c_int = 39;
3632 pub const SM_MENUDROPALIGNMENT: c_int = 40;
3633 pub const SM_PENWINDOWS: c_int = 41;
3634 pub const SM_DBCSENABLED: c_int = 42;
3635 pub const SM_CMOUSEBUTTONS: c_int = 43;
3636 pub const SM_CXFIXEDFRAME: c_int = SM_CXDLGFRAME;
3637 pub const SM_CYFIXEDFRAME: c_int = SM_CYDLGFRAME;
3638 pub const SM_CXSIZEFRAME: c_int = SM_CXFRAME;
3639 pub const SM_CYSIZEFRAME: c_int = SM_CYFRAME;
3640 pub const SM_SECURE: c_int = 44;
3641 pub const SM_CXEDGE: c_int = 45;
3642 pub const SM_CYEDGE: c_int = 46;
3643 pub const SM_CXMINSPACING: c_int = 47;
3644 pub const SM_CYMINSPACING: c_int = 48;
3645 pub const SM_CXSMICON: c_int = 49;
3646 pub const SM_CYSMICON: c_int = 50;
3647 pub const SM_CYSMCAPTION: c_int = 51;
3648 pub const SM_CXSMSIZE: c_int = 52;
3649 pub const SM_CYSMSIZE: c_int = 53;
3650 pub const SM_CXMENUSIZE: c_int = 54;
3651 pub const SM_CYMENUSIZE: c_int = 55;
3652 pub const SM_ARRANGE: c_int = 56;
3653 pub const SM_CXMINIMIZED: c_int = 57;
3654 pub const SM_CYMINIMIZED: c_int = 58;
3655 pub const SM_CXMAXTRACK: c_int = 59;
3656 pub const SM_CYMAXTRACK: c_int = 60;
3657 pub const SM_CXMAXIMIZED: c_int = 61;
3658 pub const SM_CYMAXIMIZED: c_int = 62;
3659 pub const SM_NETWORK: c_int = 63;
3660 pub const SM_CLEANBOOT: c_int = 67;
3661 pub const SM_CXDRAG: c_int = 68;
3662 pub const SM_CYDRAG: c_int = 69;
3663 pub const SM_SHOWSOUNDS: c_int = 70;
3664 pub const SM_CXMENUCHECK: c_int = 71;
3665 pub const SM_CYMENUCHECK: c_int = 72;
3666 pub const SM_SLOWMACHINE: c_int = 73;
3667 pub const SM_MIDEASTENABLED: c_int = 74;
3668 pub const SM_MOUSEWHEELPRESENT: c_int = 75;
3669 pub const SM_XVIRTUALSCREEN: c_int = 76;
3670 pub const SM_YVIRTUALSCREEN: c_int = 77;
3671 pub const SM_CXVIRTUALSCREEN: c_int = 78;
3672 pub const SM_CYVIRTUALSCREEN: c_int = 79;
3673 pub const SM_CMONITORS: c_int = 80;
3674 pub const SM_SAMEDISPLAYFORMAT: c_int = 81;
3675 pub const SM_IMMENABLED: c_int = 82;
3676 pub const SM_CXFOCUSBORDER: c_int = 83;
3677 pub const SM_CYFOCUSBORDER: c_int = 84;
3678 pub const SM_TABLETPC: c_int = 86;
3679 pub const SM_MEDIACENTER: c_int = 87;
3680 pub const SM_STARTER: c_int = 88;
3681 pub const SM_SERVERR2: c_int = 89;
3682 pub const SM_MOUSEHORIZONTALWHEELPRESENT: c_int = 91;
3683 pub const SM_CXPADDEDBORDER: c_int = 92;
3684 pub const SM_DIGITIZER: c_int = 94;
3685 pub const SM_MAXIMUMTOUCHES: c_int = 95;
3686 pub const SM_CMETRICS: c_int = 97;
3687 pub const SM_REMOTESESSION: c_int = 0x1000;
3688 pub const SM_SHUTTINGDOWN: c_int = 0x2000;
3689 pub const SM_REMOTECONTROL: c_int = 0x2001;
3690 pub const SM_CARETBLINKINGENABLED: c_int = 0x2002;
3691 pub const SM_CONVERTIBLESLATEMODE: c_int = 0x2003;
3692 pub const SM_SYSTEMDOCKED: c_int = 0x2004;
3693 extern "system" {
GetSystemMetrics( nIndex: c_int, ) -> c_int3694     pub fn GetSystemMetrics(
3695         nIndex: c_int,
3696     ) -> c_int;
GetSystemMetricsForDpi( nIndex: c_int, dpi: UINT, ) -> c_int3697     pub fn GetSystemMetricsForDpi(
3698         nIndex: c_int,
3699         dpi: UINT,
3700     ) -> c_int;
LoadMenuA( hInstance: HINSTANCE, lpMenuName: LPCSTR, ) -> HMENU3701     pub fn LoadMenuA(
3702         hInstance: HINSTANCE,
3703         lpMenuName: LPCSTR,
3704     ) -> HMENU;
LoadMenuW( hInstance: HINSTANCE, lpMenuName: LPCWSTR, ) -> HMENU3705     pub fn LoadMenuW(
3706         hInstance: HINSTANCE,
3707         lpMenuName: LPCWSTR,
3708     ) -> HMENU;
LoadMenuIndirectA( lpMenuTemplate: *const MENUTEMPLATEA, ) -> HMENU3709     pub fn LoadMenuIndirectA(
3710         lpMenuTemplate: *const MENUTEMPLATEA,
3711     ) -> HMENU;
LoadMenuIndirectW( lpMenuTemplate: *const MENUTEMPLATEW, ) -> HMENU3712     pub fn LoadMenuIndirectW(
3713         lpMenuTemplate: *const MENUTEMPLATEW,
3714     ) -> HMENU;
GetMenu( hWnd: HWND, ) -> HMENU3715     pub fn GetMenu(
3716         hWnd: HWND,
3717     ) -> HMENU;
SetMenu( hWnd: HWND, hMenu: HMENU, ) -> BOOL3718     pub fn SetMenu(
3719         hWnd: HWND,
3720         hMenu: HMENU,
3721     ) -> BOOL;
ChangeMenuA( hMenu: HMENU, cmd: UINT, lpszNewItem: LPCSTR, cmdInsert: UINT, flags: UINT, ) -> BOOL3722     pub fn ChangeMenuA(
3723         hMenu: HMENU,
3724         cmd: UINT,
3725         lpszNewItem: LPCSTR,
3726         cmdInsert: UINT,
3727         flags: UINT,
3728     ) -> BOOL;
ChangeMenuW( hMenu: HMENU, cmd: UINT, lpszNewItem: LPCWSTR, cmdInsert: UINT, flags: UINT, ) -> BOOL3729     pub fn ChangeMenuW(
3730         hMenu: HMENU,
3731         cmd: UINT,
3732         lpszNewItem: LPCWSTR,
3733         cmdInsert: UINT,
3734         flags: UINT,
3735     ) -> BOOL;
HiliteMenuItem( hWnd: HWND, hMenu: HMENU, uIDHiliteItem: UINT, uHilite: UINT, ) -> BOOL3736     pub fn HiliteMenuItem(
3737         hWnd: HWND,
3738         hMenu: HMENU,
3739         uIDHiliteItem: UINT,
3740         uHilite: UINT,
3741     ) -> BOOL;
GetMenuStringA( hMenu: HMENU, uIDItem: UINT, lpString: LPSTR, cchMax: c_int, flags: UINT, ) -> c_int3742     pub fn GetMenuStringA(
3743         hMenu: HMENU,
3744         uIDItem: UINT,
3745         lpString: LPSTR,
3746         cchMax: c_int,
3747         flags: UINT,
3748     ) -> c_int;
GetMenuStringW( hMenu: HMENU, uIDItem: UINT, lpString: LPWSTR, cchMax: c_int, flags: UINT, ) -> c_int3749     pub fn GetMenuStringW(
3750         hMenu: HMENU,
3751         uIDItem: UINT,
3752         lpString: LPWSTR,
3753         cchMax: c_int,
3754         flags: UINT,
3755     ) -> c_int;
GetMenuState( hMenu: HMENU, uId: UINT, uFlags: UINT, ) -> UINT3756     pub fn GetMenuState(
3757         hMenu: HMENU,
3758         uId: UINT,
3759         uFlags: UINT,
3760     ) -> UINT;
DrawMenuBar( hwnd: HWND, ) -> BOOL3761     pub fn DrawMenuBar(
3762         hwnd: HWND,
3763     ) -> BOOL;
3764 }
3765 pub const PMB_ACTIVE: DWORD = 0x00000001;
3766 extern "system" {
GetSystemMenu( hWnd: HWND, bRevert: BOOL, ) -> HMENU3767     pub fn GetSystemMenu(
3768         hWnd: HWND,
3769         bRevert: BOOL,
3770     ) -> HMENU;
CreateMenu() -> HMENU3771     pub fn CreateMenu() -> HMENU;
CreatePopupMenu() ->HMENU3772     pub fn CreatePopupMenu() ->HMENU;
DestroyMenu( hMenu: HMENU, ) -> BOOL3773     pub fn DestroyMenu(
3774         hMenu: HMENU,
3775     ) -> BOOL;
CheckMenuItem( hMenu: HMENU, uIDCheckItem: UINT, uCheck: UINT, ) -> DWORD3776     pub fn CheckMenuItem(
3777         hMenu: HMENU,
3778         uIDCheckItem: UINT,
3779         uCheck: UINT,
3780     ) -> DWORD;
EnableMenuItem( hMenu: HMENU, uIDEnableItem: UINT, uEnable: UINT, ) -> BOOL3781     pub fn EnableMenuItem(
3782         hMenu: HMENU,
3783         uIDEnableItem: UINT,
3784         uEnable: UINT,
3785     ) -> BOOL;
GetSubMenu( hMenu: HMENU, nPos: c_int, ) -> HMENU3786     pub fn GetSubMenu(
3787         hMenu: HMENU,
3788         nPos: c_int,
3789     ) -> HMENU;
GetMenuItemID( hMenu: HMENU, nPos: c_int, ) -> UINT3790     pub fn GetMenuItemID(
3791         hMenu: HMENU,
3792         nPos: c_int,
3793     ) -> UINT;
GetMenuItemCount( hMenu: HMENU, ) -> c_int3794     pub fn GetMenuItemCount(
3795         hMenu: HMENU,
3796     ) -> c_int;
InsertMenuA( hMenu: HMENU, uPosition: UINT, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCSTR, ) -> BOOL3797     pub fn InsertMenuA(
3798         hMenu: HMENU,
3799         uPosition: UINT,
3800         uFlags: UINT,
3801         uIDNewItem: UINT_PTR,
3802         lpNewItem: LPCSTR,
3803     ) -> BOOL;
InsertMenuW( hMenu: HMENU, uPosition: UINT, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCWSTR, ) -> BOOL3804     pub fn InsertMenuW(
3805         hMenu: HMENU,
3806         uPosition: UINT,
3807         uFlags: UINT,
3808         uIDNewItem: UINT_PTR,
3809         lpNewItem: LPCWSTR,
3810     ) -> BOOL;
AppendMenuA( hMenu: HMENU, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCSTR, ) -> BOOL3811     pub fn AppendMenuA(
3812         hMenu: HMENU,
3813         uFlags: UINT,
3814         uIDNewItem: UINT_PTR,
3815         lpNewItem: LPCSTR,
3816     ) -> BOOL;
AppendMenuW( hMenu: HMENU, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCWSTR, ) -> BOOL3817     pub fn AppendMenuW(
3818         hMenu: HMENU,
3819         uFlags: UINT,
3820         uIDNewItem: UINT_PTR,
3821         lpNewItem: LPCWSTR,
3822     ) -> BOOL;
ModifyMenuA( hMnu: HMENU, uPosition: UINT, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCSTR, ) -> BOOL3823     pub fn ModifyMenuA(
3824         hMnu: HMENU,
3825         uPosition: UINT,
3826         uFlags: UINT,
3827         uIDNewItem: UINT_PTR,
3828         lpNewItem: LPCSTR,
3829     ) -> BOOL;
ModifyMenuW( hMnu: HMENU, uPosition: UINT, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCWSTR, ) -> BOOL3830     pub fn ModifyMenuW(
3831         hMnu: HMENU,
3832         uPosition: UINT,
3833         uFlags: UINT,
3834         uIDNewItem: UINT_PTR,
3835         lpNewItem: LPCWSTR,
3836     ) -> BOOL;
RemoveMenu( hMenu: HMENU, uPosition: UINT, uFlags: UINT, ) -> BOOL3837     pub fn RemoveMenu(
3838         hMenu: HMENU,
3839         uPosition: UINT,
3840         uFlags: UINT,
3841     ) -> BOOL;
DeleteMenu( hMenu: HMENU, uPosition: UINT, uFlags: UINT, ) -> BOOL3842     pub fn DeleteMenu(
3843         hMenu: HMENU,
3844         uPosition: UINT,
3845         uFlags: UINT,
3846     ) -> BOOL;
SetMenuItemBitmaps( hMenu: HMENU, uPosition: UINT, uFlags: UINT, hBitmapUnchecked: HBITMAP, hBitmapChecked: HBITMAP, ) -> BOOL3847     pub fn SetMenuItemBitmaps(
3848         hMenu: HMENU,
3849         uPosition: UINT,
3850         uFlags: UINT,
3851         hBitmapUnchecked: HBITMAP,
3852         hBitmapChecked: HBITMAP,
3853     ) -> BOOL;
GetMenuCheckMarkDimensions() -> LONG3854     pub fn GetMenuCheckMarkDimensions() -> LONG;
TrackPopupMenu( hMenu: HMENU, uFlags: UINT, x: c_int, y: c_int, nReserved: c_int, hWnd: HWND, prcRect: *const RECT, ) -> BOOL3855     pub fn TrackPopupMenu(
3856         hMenu: HMENU,
3857         uFlags: UINT,
3858         x: c_int,
3859         y: c_int,
3860         nReserved: c_int,
3861         hWnd: HWND,
3862         prcRect: *const RECT,
3863     ) -> BOOL;
3864 }
3865 pub const MNC_IGNORE: DWORD = 0;
3866 pub const MNC_CLOSE: DWORD = 1;
3867 pub const MNC_EXECUTE: DWORD = 2;
3868 pub const MNC_SELECT: DWORD = 3;
3869 STRUCT!{struct TPMPARAMS {
3870     cbSize: UINT,
3871     rcExclude: RECT,
3872 }}
3873 pub type LPTPMPARAMS = *mut TPMPARAMS;
3874 extern "system" {
TrackPopupMenuEx( hMenu: HMENU, uFlags: UINT, x: INT, y: INT, hwnd: HWND, lptpm: LPTPMPARAMS, ) -> BOOL3875     pub fn TrackPopupMenuEx(
3876         hMenu: HMENU,
3877         uFlags: UINT,
3878         x: INT,
3879         y: INT,
3880         hwnd: HWND,
3881         lptpm: LPTPMPARAMS,
3882     ) -> BOOL;
CalculatePopupWindowPosition( anchorPoint: *const POINT, windowSize: *const SIZE, flags: UINT, excludeRect: *mut RECT, popupWindowPosition: *mut RECT, ) -> BOOL3883     pub fn CalculatePopupWindowPosition(
3884         anchorPoint: *const POINT,
3885         windowSize: *const SIZE,
3886         flags: UINT,
3887         excludeRect: *mut RECT,
3888         popupWindowPosition: *mut RECT,
3889     ) -> BOOL;
3890 }
3891 pub const MNS_NOCHECK: DWORD = 0x80000000;
3892 pub const MNS_MODELESS: DWORD = 0x40000000;
3893 pub const MNS_DRAGDROP: DWORD = 0x20000000;
3894 pub const MNS_AUTODISMISS: DWORD = 0x10000000;
3895 pub const MNS_NOTIFYBYPOS: DWORD = 0x08000000;
3896 pub const MNS_CHECKORBMP: DWORD = 0x04000000;
3897 pub const MIM_MAXHEIGHT: DWORD = 0x00000001;
3898 pub const MIM_BACKGROUND: DWORD = 0x00000002;
3899 pub const MIM_HELPID: DWORD = 0x00000004;
3900 pub const MIM_MENUDATA: DWORD = 0x00000008;
3901 pub const MIM_STYLE: DWORD = 0x00000010;
3902 pub const MIM_APPLYTOSUBMENUS: DWORD = 0x80000000;
3903 STRUCT!{struct MENUINFO {
3904     cbSize: DWORD,
3905     fMask: DWORD,
3906     dwStyle: DWORD,
3907     cyMax: UINT,
3908     hbrBack: HBRUSH,
3909     dwContextHelpID: DWORD,
3910     dwMenuData: ULONG_PTR,
3911 }}
3912 pub type LPMENUINFO = *mut MENUINFO;
3913 pub type LPCMENUINFO = *const MENUINFO;
3914 extern "system" {
GetMenuInfo( hMenu: HMENU, lpcmi: LPMENUINFO, ) -> BOOL3915     pub fn GetMenuInfo(
3916         hMenu: HMENU,
3917         lpcmi: LPMENUINFO,
3918     ) -> BOOL;
SetMenuInfo( hMenu: HMENU, lpcmi: LPCMENUINFO, ) -> BOOL3919     pub fn SetMenuInfo(
3920         hMenu: HMENU,
3921         lpcmi: LPCMENUINFO,
3922     ) -> BOOL;
EndMenu( hMenu: HMENU, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCSTR, ) -> BOOL3923     pub fn EndMenu(
3924         hMenu: HMENU,
3925         uFlags: UINT,
3926         uIDNewItem: UINT_PTR,
3927         lpNewItem: LPCSTR,
3928     ) -> BOOL;
3929 }
3930 pub const MND_CONTINUE: DWORD = 0;
3931 pub const MND_ENDMENU: DWORD = 1;
3932 STRUCT!{struct MENUGETOBJECTINFO {
3933     dwFlags: DWORD,
3934     uPos: UINT,
3935     hmenu: HMENU,
3936     riid: PVOID,
3937     pvObj: PVOID,
3938 }}
3939 pub type PMENUGETOBJECTINFO = *mut MENUGETOBJECTINFO;
3940 pub const MNGOF_TOPGAP: DWORD = 0x00000001;
3941 pub const MNGOF_BOTTOMGAP: DWORD = 0x00000002;
3942 pub const MNGO_NOINTERFACE: DWORD = 0x00000000;
3943 pub const MNGO_NOERROR: DWORD = 0x00000001;
3944 pub const MIIM_STATE: DWORD = 0x00000001;
3945 pub const MIIM_ID: DWORD = 0x00000002;
3946 pub const MIIM_SUBMENU: DWORD = 0x00000004;
3947 pub const MIIM_CHECKMARKS: DWORD = 0x00000008;
3948 pub const MIIM_TYPE: DWORD = 0x00000010;
3949 pub const MIIM_DATA: DWORD = 0x00000020;
3950 pub const MIIM_STRING: DWORD = 0x00000040;
3951 pub const MIIM_BITMAP: DWORD = 0x00000080;
3952 pub const MIIM_FTYPE: DWORD = 0x00000100;
3953 pub const HBMMENU_CALLBACK: HBITMAP = -1isize as HBITMAP;
3954 pub const HBMMENU_SYSTEM: HBITMAP = 1 as HBITMAP;
3955 pub const HBMMENU_MBAR_RESTORE: HBITMAP = 2 as HBITMAP;
3956 pub const HBMMENU_MBAR_MINIMIZE: HBITMAP = 3 as HBITMAP;
3957 pub const HBMMENU_MBAR_CLOSE: HBITMAP = 5 as HBITMAP;
3958 pub const HBMMENU_MBAR_CLOSE_D: HBITMAP = 6 as HBITMAP;
3959 pub const HBMMENU_MBAR_MINIMIZE_D: HBITMAP = 7 as HBITMAP;
3960 pub const HBMMENU_POPUP_CLOSE: HBITMAP = 8 as HBITMAP;
3961 pub const HBMMENU_POPUP_RESTORE: HBITMAP = 9 as HBITMAP;
3962 pub const HBMMENU_POPUP_MAXIMIZE: HBITMAP = 10 as HBITMAP;
3963 pub const HBMMENU_POPUP_MINIMIZE: HBITMAP = 11 as HBITMAP;
3964 STRUCT!{struct MENUITEMINFOA {
3965     cbSize: UINT,
3966     fMask: UINT,
3967     fType: UINT,
3968     fState: UINT,
3969     wID: UINT,
3970     hSubMenu: HMENU,
3971     hbmpChecked: HBITMAP,
3972     hbmpUnchecked: HBITMAP,
3973     dwItemData: ULONG_PTR,
3974     dwTypeData: LPSTR,
3975     cch: UINT,
3976     hbmpItem: HBITMAP,
3977 }}
3978 pub type LPMENUITEMINFOA = *mut MENUITEMINFOA;
3979 pub type LPCMENUITEMINFOA = *const MENUITEMINFOA;
3980 STRUCT!{struct MENUITEMINFOW {
3981     cbSize: UINT,
3982     fMask: UINT,
3983     fType: UINT,
3984     fState: UINT,
3985     wID: UINT,
3986     hSubMenu: HMENU,
3987     hbmpChecked: HBITMAP,
3988     hbmpUnchecked: HBITMAP,
3989     dwItemData: ULONG_PTR,
3990     dwTypeData: LPWSTR,
3991     cch: UINT,
3992     hbmpItem: HBITMAP,
3993 }}
3994 pub type LPMENUITEMINFOW = *mut MENUITEMINFOW;
3995 pub type LPCMENUITEMINFOW = *const MENUITEMINFOW;
3996 extern "system" {
InsertMenuItemA( hmenu: HMENU, item: UINT, fByPosition: BOOL, lpmi: LPCMENUITEMINFOA, ) -> BOOL3997     pub fn InsertMenuItemA(
3998         hmenu: HMENU,
3999         item: UINT,
4000         fByPosition: BOOL,
4001         lpmi: LPCMENUITEMINFOA,
4002     ) -> BOOL;
InsertMenuItemW( hmenu: HMENU, item: UINT, fByPosition: BOOL, lpmi: LPCMENUITEMINFOW, ) -> BOOL4003     pub fn InsertMenuItemW(
4004         hmenu: HMENU,
4005         item: UINT,
4006         fByPosition: BOOL,
4007         lpmi: LPCMENUITEMINFOW,
4008     ) -> BOOL;
GetMenuItemInfoA( hMenu: HMENU, uItem: UINT, fByPosition: BOOL, lpmii: LPMENUITEMINFOA ) -> BOOL4009     pub fn GetMenuItemInfoA(
4010         hMenu: HMENU,
4011         uItem: UINT,
4012         fByPosition: BOOL,
4013         lpmii: LPMENUITEMINFOA
4014     ) -> BOOL;
GetMenuItemInfoW( hMenu: HMENU, uItem: UINT, fByPosition: BOOL, lpmii: LPMENUITEMINFOW ) -> BOOL4015     pub fn GetMenuItemInfoW(
4016         hMenu: HMENU,
4017         uItem: UINT,
4018         fByPosition: BOOL,
4019         lpmii: LPMENUITEMINFOW
4020     ) -> BOOL;
SetMenuItemInfoA( hmenu: HMENU, item: UINT, fByPositon: BOOL, lpmii: LPCMENUITEMINFOA, ) -> BOOL4021     pub fn SetMenuItemInfoA(
4022         hmenu: HMENU,
4023         item: UINT,
4024         fByPositon: BOOL,
4025         lpmii: LPCMENUITEMINFOA,
4026     ) -> BOOL;
SetMenuItemInfoW( hmenu: HMENU, item: UINT, fByPositon: BOOL, lpmii: LPCMENUITEMINFOW, ) -> BOOL4027     pub fn SetMenuItemInfoW(
4028         hmenu: HMENU,
4029         item: UINT,
4030         fByPositon: BOOL,
4031         lpmii: LPCMENUITEMINFOW,
4032     ) -> BOOL;
4033 }
4034 pub const GMDI_USEDISABLED: DWORD = 0x0001;
4035 pub const GMDI_GOINTOPOPUPS: DWORD = 0x0002;
4036 extern "system" {
GetMenuDefaultItem( hMenu: HMENU, fByPos: UINT, gmdiFlags: UINT, ) -> UINT4037     pub fn GetMenuDefaultItem(
4038         hMenu: HMENU,
4039         fByPos: UINT,
4040         gmdiFlags: UINT,
4041     ) -> UINT;
SetMenuDefaultItem( hMenu: HMENU, uItem: UINT, fByPos: UINT, ) -> BOOL4042     pub fn SetMenuDefaultItem(
4043         hMenu: HMENU,
4044         uItem: UINT,
4045         fByPos: UINT,
4046     ) -> BOOL;
GetMenuItemRect( hWnd: HWND, hMenu: HMENU, uItem: UINT, lprcItem: LPRECT, ) -> BOOL4047     pub fn GetMenuItemRect(
4048         hWnd: HWND,
4049         hMenu: HMENU,
4050         uItem: UINT,
4051         lprcItem: LPRECT,
4052     ) -> BOOL;
MenuItemFromPoint( hWnd: HWND, hMenu: HMENU, ptScreen: POINT, ) -> c_int4053     pub fn MenuItemFromPoint(
4054         hWnd: HWND,
4055         hMenu: HMENU,
4056         ptScreen: POINT,
4057     ) -> c_int;
4058 }
4059 pub const TPM_LEFTBUTTON: UINT = 0x0000;
4060 pub const TPM_RIGHTBUTTON: UINT = 0x0002;
4061 pub const TPM_LEFTALIGN: UINT = 0x0000;
4062 pub const TPM_CENTERALIGN: UINT = 0x0004;
4063 pub const TPM_RIGHTALIGN: UINT = 0x0008;
4064 pub const TPM_TOPALIGN: UINT = 0x0000;
4065 pub const TPM_VCENTERALIGN: UINT = 0x0010;
4066 pub const TPM_BOTTOMALIGN: UINT = 0x0020;
4067 pub const TPM_HORIZONTAL: UINT = 0x0000;
4068 pub const TPM_VERTICAL: UINT = 0x0040;
4069 pub const TPM_NONOTIFY: UINT = 0x0080;
4070 pub const TPM_RETURNCMD: UINT = 0x0100;
4071 pub const TPM_RECURSE: UINT = 0x0001;
4072 pub const TPM_HORPOSANIMATION: UINT = 0x0400;
4073 pub const TPM_HORNEGANIMATION: UINT = 0x0800;
4074 pub const TPM_VERPOSANIMATION: UINT = 0x1000;
4075 pub const TPM_VERNEGANIMATION: UINT = 0x2000;
4076 pub const TPM_NOANIMATION: UINT = 0x4000;
4077 pub const TPM_LAYOUTRTL: UINT = 0x8000;
4078 pub const TPM_WORKAREA: UINT = 0x10000;
4079 STRUCT!{struct DROPSTRUCT {
4080     hwndSource: HWND,
4081     hwndSink: HWND,
4082     wFmt: DWORD,
4083     dwData: ULONG_PTR,
4084     ptDrop: POINT,
4085     dwControlData: DWORD,
4086 }}
4087 pub type PDROPSTRUCT = *mut DROPSTRUCT;
4088 pub type LPDROPSTRUCT = *mut DROPSTRUCT;
4089 pub const DOF_EXECUTABLE: DWORD = 0x8001;
4090 pub const DOF_DOCUMENT: DWORD = 0x8002;
4091 pub const DOF_DIRECTORY: DWORD = 0x8003;
4092 pub const DOF_MULTIPLE: DWORD = 0x8004;
4093 pub const DOF_PROGMAN: DWORD = 0x0001;
4094 pub const DOF_SHELLDATA: DWORD = 0x0002;
4095 pub const DO_DROPFILE: DWORD = 0x454C4946;
4096 pub const DO_PRINTFILE: DWORD = 0x544E5250;
4097 extern "system" {
DragObject( hwndParent: HWND, hwndFrom: HWND, fmt: UINT, data: ULONG_PTR, hcur: HCURSOR, ) -> DWORD4098     pub fn DragObject(
4099         hwndParent: HWND,
4100         hwndFrom: HWND,
4101         fmt: UINT,
4102         data: ULONG_PTR,
4103         hcur: HCURSOR,
4104     ) -> DWORD;
DragDetect( hwnd: HWND, pt: POINT, ) -> BOOL4105     pub fn DragDetect(
4106         hwnd: HWND,
4107         pt: POINT,
4108     ) -> BOOL;
DrawIcon( hDC: HDC, x: c_int, y: c_int, hIcon: HICON, ) -> BOOL4109     pub fn DrawIcon(
4110         hDC: HDC,
4111         x: c_int,
4112         y: c_int,
4113         hIcon: HICON,
4114     ) -> BOOL;
4115 }
4116 pub const DT_TOP: UINT = 0x00000000;
4117 pub const DT_LEFT: UINT = 0x00000000;
4118 pub const DT_CENTER: UINT = 0x00000001;
4119 pub const DT_RIGHT: UINT = 0x00000002;
4120 pub const DT_VCENTER: UINT = 0x00000004;
4121 pub const DT_BOTTOM: UINT = 0x00000008;
4122 pub const DT_WORDBREAK: UINT = 0x00000010;
4123 pub const DT_SINGLELINE: UINT = 0x00000020;
4124 pub const DT_EXPANDTABS: UINT = 0x00000040;
4125 pub const DT_TABSTOP: UINT = 0x00000080;
4126 pub const DT_NOCLIP: UINT = 0x00000100;
4127 pub const DT_EXTERNALLEADING: UINT = 0x00000200;
4128 pub const DT_CALCRECT: UINT = 0x00000400;
4129 pub const DT_NOPREFIX: UINT = 0x00000800;
4130 pub const DT_INTERNAL: UINT = 0x00001000;
4131 pub const DT_EDITCONTROL: UINT = 0x00002000;
4132 pub const DT_PATH_ELLIPSIS: UINT = 0x00004000;
4133 pub const DT_END_ELLIPSIS: UINT = 0x00008000;
4134 pub const DT_MODIFYSTRING: UINT = 0x00010000;
4135 pub const DT_RTLREADING: UINT = 0x00020000;
4136 pub const DT_WORD_ELLIPSIS: UINT = 0x00040000;
4137 pub const DT_NOFULLWIDTHCHARBREAK: UINT = 0x00080000;
4138 pub const DT_HIDEPREFIX: UINT = 0x00100000;
4139 pub const DT_PREFIXONLY: UINT = 0x00200000;
4140 STRUCT!{struct DRAWTEXTPARAMS {
4141     cbSize: UINT,
4142     iTabLength: c_int,
4143     iLeftMargin: c_int,
4144     iRightMargin: c_int,
4145     uiLengthDrawn: UINT,
4146 }}
4147 pub type LPDRAWTEXTPARAMS = *mut DRAWTEXTPARAMS;
4148 extern "system" {
DrawTextA( hdc: HDC, lpchText: LPCSTR, cchText: c_int, lprc: LPRECT, format: UINT, ) -> c_int4149     pub fn DrawTextA(
4150         hdc: HDC,
4151         lpchText: LPCSTR,
4152         cchText: c_int,
4153         lprc: LPRECT,
4154         format: UINT,
4155     ) -> c_int;
DrawTextW( hdc: HDC, lpchText: LPCWSTR, cchText: c_int, lprc: LPRECT, format: UINT, ) -> c_int4156     pub fn DrawTextW(
4157         hdc: HDC,
4158         lpchText: LPCWSTR,
4159         cchText: c_int,
4160         lprc: LPRECT,
4161         format: UINT,
4162     ) -> c_int;
DrawTextExA( hdc: HDC, lpchText: LPCSTR, cchText: c_int, lprc: LPRECT, format: UINT, lpdtp: LPDRAWTEXTPARAMS, ) -> c_int4163     pub fn DrawTextExA(
4164         hdc: HDC,
4165         lpchText: LPCSTR,
4166         cchText: c_int,
4167         lprc: LPRECT,
4168         format: UINT,
4169         lpdtp: LPDRAWTEXTPARAMS,
4170     ) -> c_int;
DrawTextExW( hdc: HDC, lpchText: LPCWSTR, cchText: c_int, lprc: LPRECT, format: UINT, lpdtp: LPDRAWTEXTPARAMS, ) -> c_int4171     pub fn DrawTextExW(
4172         hdc: HDC,
4173         lpchText: LPCWSTR,
4174         cchText: c_int,
4175         lprc: LPRECT,
4176         format: UINT,
4177         lpdtp: LPDRAWTEXTPARAMS,
4178     ) -> c_int;
GrayStringA( hDC: HDC, hBrush: HBRUSH, lpOutputFunc: GRAYSTRINGPROC, lpData: LPARAM, nCount: c_int, X: c_int, Y: c_int, nWidth: c_int, nHeight: c_int, ) -> BOOL4179     pub fn GrayStringA(
4180         hDC: HDC,
4181         hBrush: HBRUSH,
4182         lpOutputFunc: GRAYSTRINGPROC,
4183         lpData: LPARAM,
4184         nCount: c_int,
4185         X: c_int,
4186         Y: c_int,
4187         nWidth: c_int,
4188         nHeight: c_int,
4189     ) -> BOOL;
GrayStringW( hDC: HDC, hBrush: HBRUSH, lpOutputFunc: GRAYSTRINGPROC, lpData: LPARAM, nCount: c_int, X: c_int, Y: c_int, nWidth: c_int, nHeight: c_int, ) -> BOOL4190     pub fn GrayStringW(
4191         hDC: HDC,
4192         hBrush: HBRUSH,
4193         lpOutputFunc: GRAYSTRINGPROC,
4194         lpData: LPARAM,
4195         nCount: c_int,
4196         X: c_int,
4197         Y: c_int,
4198         nWidth: c_int,
4199         nHeight: c_int,
4200     ) -> BOOL;
4201 }
4202 pub const DST_COMPLEX: UINT = 0x0000;
4203 pub const DST_TEXT: UINT = 0x0001;
4204 pub const DST_PREFIXTEXT: UINT = 0x0002;
4205 pub const DST_ICON: UINT = 0x0003;
4206 pub const DST_BITMAP: UINT = 0x0004;
4207 pub const DSS_NORMAL: UINT = 0x0000;
4208 pub const DSS_UNION: UINT = 0x0010;
4209 pub const DSS_DISABLED: UINT = 0x0020;
4210 pub const DSS_MONO: UINT = 0x0080;
4211 pub const DSS_HIDEPREFIX: UINT = 0x0200;
4212 pub const DSS_PREFIXONLY: UINT = 0x0400;
4213 pub const DSS_RIGHT: UINT = 0x8000;
4214 extern "system" {
DrawStateA( hdc: HDC, hbrFore: HBRUSH, qfnCallBack: DRAWSTATEPROC, lData: LPARAM, wData: WPARAM, x: c_int, y: c_int, cx: c_int, cy: c_int, uFlags: UINT, ) -> BOOL4215     pub fn DrawStateA(
4216         hdc: HDC,
4217         hbrFore: HBRUSH,
4218         qfnCallBack: DRAWSTATEPROC,
4219         lData: LPARAM,
4220         wData: WPARAM,
4221         x: c_int,
4222         y: c_int,
4223         cx: c_int,
4224         cy: c_int,
4225         uFlags: UINT,
4226     ) -> BOOL;
DrawStateW( hdc: HDC, hbrFore: HBRUSH, qfnCallBack: DRAWSTATEPROC, lData: LPARAM, wData: WPARAM, x: c_int, y: c_int, cx: c_int, cy: c_int, uFlags: UINT, ) -> BOOL4227     pub fn DrawStateW(
4228         hdc: HDC,
4229         hbrFore: HBRUSH,
4230         qfnCallBack: DRAWSTATEPROC,
4231         lData: LPARAM,
4232         wData: WPARAM,
4233         x: c_int,
4234         y: c_int,
4235         cx: c_int,
4236         cy: c_int,
4237         uFlags: UINT,
4238     ) -> BOOL;
TabbedTextOutA( hdc: HDC, x: c_int, y: c_int, lpString: LPCSTR, chCount: c_int, nTabPositions: c_int, lpnTabStopPositions: *const INT, nTabOrigin: c_int, ) -> LONG4239     pub fn TabbedTextOutA(
4240         hdc: HDC,
4241         x: c_int,
4242         y: c_int,
4243         lpString: LPCSTR,
4244         chCount: c_int,
4245         nTabPositions: c_int,
4246         lpnTabStopPositions: *const INT,
4247         nTabOrigin: c_int,
4248     ) -> LONG;
TabbedTextOutW( hdc: HDC, x: c_int, y: c_int, lpString: LPCWSTR, chCount: c_int, nTabPositions: c_int, lpnTabStopPositions: *const INT, nTabOrigin: c_int, ) -> LONG4249     pub fn TabbedTextOutW(
4250         hdc: HDC,
4251         x: c_int,
4252         y: c_int,
4253         lpString: LPCWSTR,
4254         chCount: c_int,
4255         nTabPositions: c_int,
4256         lpnTabStopPositions: *const INT,
4257         nTabOrigin: c_int,
4258     ) -> LONG;
GetTabbedTextExtentA( hdc: HDC, lpString: LPCSTR, chCount: c_int, nTabPositions: c_int, lpnTabStopPositions: *const INT, ) -> DWORD4259     pub fn GetTabbedTextExtentA(
4260         hdc: HDC,
4261         lpString: LPCSTR,
4262         chCount: c_int,
4263         nTabPositions: c_int,
4264         lpnTabStopPositions: *const INT,
4265     ) -> DWORD;
GetTabbedTextExtentW( hdc: HDC, lpString: LPCWSTR, chCount: c_int, nTabPositions: c_int, lpnTabStopPositions: *const INT, ) -> DWORD4266     pub fn GetTabbedTextExtentW(
4267         hdc: HDC,
4268         lpString: LPCWSTR,
4269         chCount: c_int,
4270         nTabPositions: c_int,
4271         lpnTabStopPositions: *const INT,
4272     ) -> DWORD;
UpdateWindow( hWnd: HWND, ) -> BOOL4273     pub fn UpdateWindow(
4274         hWnd: HWND,
4275     ) -> BOOL;
SetActiveWindow( hWnd: HWND, ) -> HWND4276     pub fn SetActiveWindow(
4277         hWnd: HWND,
4278     ) -> HWND;
GetForegroundWindow() -> HWND4279     pub fn GetForegroundWindow() -> HWND;
PaintDesktop( hdc: HDC, ) -> BOOL4280     pub fn PaintDesktop(
4281         hdc: HDC,
4282     ) -> BOOL;
SwitchToThisWindow( hwnd: HWND, fUnknown: BOOL, )4283     pub fn SwitchToThisWindow(
4284         hwnd: HWND,
4285         fUnknown: BOOL,
4286     );
SetForegroundWindow( hWnd: HWND, ) -> BOOL4287     pub fn SetForegroundWindow(
4288         hWnd: HWND,
4289     ) -> BOOL;
AllowSetForegroundWindow( dwProcessId: DWORD, ) -> BOOL4290     pub fn AllowSetForegroundWindow(
4291         dwProcessId: DWORD,
4292     ) -> BOOL;
4293 }
4294 pub const ASFW_ANY: DWORD = -1i32 as u32;
4295 extern "system" {
LockSetForegroundWindow( uLockCode: UINT, ) -> BOOL4296     pub fn LockSetForegroundWindow(
4297         uLockCode: UINT,
4298     ) -> BOOL;
4299 }
4300 pub const LSFW_LOCK: UINT = 1;
4301 pub const LSFW_UNLOCK: UINT = 2;
4302 extern "system" {
WindowFromDC( hDC: HDC, ) -> HWND4303     pub fn WindowFromDC(
4304         hDC: HDC,
4305     ) -> HWND;
GetDC( hWnd: HWND, ) -> HDC4306     pub fn GetDC(
4307         hWnd: HWND,
4308     ) -> HDC;
GetDCEx( hWnd: HWND, hrgnClip: HRGN, flags: DWORD, ) -> HDC4309     pub fn GetDCEx(
4310         hWnd: HWND,
4311         hrgnClip: HRGN,
4312         flags: DWORD,
4313     ) -> HDC;
4314 }
4315 pub const DCX_WINDOW: DWORD = 0x00000001;
4316 pub const DCX_CACHE: DWORD = 0x00000002;
4317 pub const DCX_NORESETATTRS: DWORD = 0x00000004;
4318 pub const DCX_CLIPCHILDREN: DWORD = 0x00000008;
4319 pub const DCX_CLIPSIBLINGS: DWORD = 0x00000010;
4320 pub const DCX_PARENTCLIP: DWORD = 0x00000020;
4321 pub const DCX_EXCLUDERGN: DWORD = 0x00000040;
4322 pub const DCX_INTERSECTRGN: DWORD = 0x00000080;
4323 pub const DCX_EXCLUDEUPDATE: DWORD = 0x00000100;
4324 pub const DCX_INTERSECTUPDATE: DWORD = 0x00000200;
4325 pub const DCX_LOCKWINDOWUPDATE: DWORD = 0x00000400;
4326 pub const DCX_VALIDATE: DWORD = 0x00200000;
4327 extern "system" {
GetWindowDC( hWnd: HWND, ) -> HDC4328     pub fn GetWindowDC(
4329         hWnd: HWND,
4330     ) -> HDC;
ReleaseDC( hWnd: HWND, hDC: HDC, ) -> c_int4331     pub fn ReleaseDC(
4332         hWnd: HWND,
4333         hDC: HDC,
4334     ) -> c_int;
BeginPaint( hwnd: HWND, lpPaint: LPPAINTSTRUCT, ) -> HDC4335     pub fn BeginPaint(
4336         hwnd: HWND,
4337         lpPaint: LPPAINTSTRUCT,
4338     ) -> HDC;
EndPaint( hWnd: HWND, lpPaint: *const PAINTSTRUCT, ) -> BOOL4339     pub fn EndPaint(
4340         hWnd: HWND,
4341         lpPaint: *const PAINTSTRUCT,
4342     ) -> BOOL;
GetUpdateRect( hWnd: HWND, lpRect: LPRECT, bErase: BOOL, ) -> BOOL4343     pub fn GetUpdateRect(
4344         hWnd: HWND,
4345         lpRect: LPRECT,
4346         bErase: BOOL,
4347     ) -> BOOL;
GetUpdateRgn( hWnd: HWND, hRgn: HRGN, bErase: BOOL, ) -> c_int4348     pub fn GetUpdateRgn(
4349         hWnd: HWND,
4350         hRgn: HRGN,
4351         bErase: BOOL,
4352     ) -> c_int;
SetWindowRgn( hWnd: HWND, hRgn: HRGN, bRedraw: BOOL, ) -> c_int4353     pub fn SetWindowRgn(
4354         hWnd: HWND,
4355         hRgn: HRGN,
4356         bRedraw: BOOL,
4357     ) -> c_int;
GetWindowRgn( hWnd: HWND, hRgn: HRGN, ) -> c_int4358     pub fn GetWindowRgn(
4359         hWnd: HWND,
4360         hRgn: HRGN,
4361     ) -> c_int;
GetWindowRgnBox( hWnd: HWND, lprc: LPRECT, ) -> c_int4362     pub fn GetWindowRgnBox(
4363         hWnd: HWND,
4364         lprc: LPRECT,
4365     ) -> c_int;
ExcludeUpdateRgn( hDC: HDC, hWnd: HWND, ) -> c_int4366     pub fn ExcludeUpdateRgn(
4367         hDC: HDC,
4368         hWnd: HWND,
4369     ) -> c_int;
InvalidateRect( hWnd: HWND, lpRect: *const RECT, bErase: BOOL, ) -> BOOL4370     pub fn InvalidateRect(
4371         hWnd: HWND,
4372         lpRect: *const RECT,
4373         bErase: BOOL,
4374     ) -> BOOL;
ValidateRect( hWnd: HWND, lpRect: *const RECT, ) -> BOOL4375     pub fn ValidateRect(
4376         hWnd: HWND,
4377         lpRect: *const RECT,
4378     ) -> BOOL;
InvalidateRgn( hWnd: HWND, hRgn: HRGN, bErase: BOOL, ) -> BOOL4379     pub fn InvalidateRgn(
4380         hWnd: HWND,
4381         hRgn: HRGN,
4382         bErase: BOOL,
4383     ) -> BOOL;
ValidateRgn( hWnd: HWND, hRgn: HRGN, ) -> BOOL4384     pub fn ValidateRgn(
4385         hWnd: HWND,
4386         hRgn: HRGN,
4387     ) -> BOOL;
RedrawWindow( hwnd: HWND, lprcUpdate: *const RECT, hrgnUpdate: HRGN, flags: UINT, ) -> BOOL4388     pub fn RedrawWindow(
4389         hwnd: HWND,
4390         lprcUpdate: *const RECT,
4391         hrgnUpdate: HRGN,
4392         flags: UINT,
4393     ) -> BOOL;
4394 }
4395 pub const RDW_INVALIDATE: UINT = 0x0001;
4396 pub const RDW_INTERNALPAINT: UINT = 0x0002;
4397 pub const RDW_ERASE: UINT = 0x0004;
4398 pub const RDW_VALIDATE: UINT = 0x0008;
4399 pub const RDW_NOINTERNALPAINT: UINT = 0x0010;
4400 pub const RDW_NOERASE: UINT = 0x0020;
4401 pub const RDW_NOCHILDREN: UINT = 0x0040;
4402 pub const RDW_ALLCHILDREN: UINT = 0x0080;
4403 pub const RDW_UPDATENOW: UINT = 0x0100;
4404 pub const RDW_ERASENOW: UINT = 0x0200;
4405 pub const RDW_FRAME: UINT = 0x0400;
4406 pub const RDW_NOFRAME: UINT = 0x0800;
4407 extern "system" {
LockWindowUpdate( hWndLock: HWND, ) -> BOOL4408     pub fn LockWindowUpdate(
4409         hWndLock: HWND,
4410     ) -> BOOL;
ScrollWindow( hWnd: HWND, xAmount: c_int, yAmount: c_int, lpRect: *const RECT, lpClipRect: *const RECT, ) -> BOOL4411     pub fn ScrollWindow(
4412         hWnd: HWND,
4413         xAmount: c_int,
4414         yAmount: c_int,
4415         lpRect: *const RECT,
4416         lpClipRect: *const RECT,
4417     ) -> BOOL;
ScrollDC( hDC: HDC, dx: c_int, dy: c_int, lprcScroll: *const RECT, lprcClip: *const RECT, hrgnUpdate: HRGN, lprcUpdate: LPRECT, ) -> BOOL4418     pub fn ScrollDC(
4419         hDC: HDC,
4420         dx: c_int,
4421         dy: c_int,
4422         lprcScroll: *const RECT,
4423         lprcClip: *const RECT,
4424         hrgnUpdate: HRGN,
4425         lprcUpdate: LPRECT,
4426     ) -> BOOL;
ScrollWindowEx( hWnd: HWND, dx: c_int, dy: c_int, prcScroll: *const RECT, prcClip: *const RECT, hrgnUpdate: HRGN, prcUpdate: LPRECT, flags: UINT, ) -> c_int4427     pub fn ScrollWindowEx(
4428         hWnd: HWND,
4429         dx: c_int,
4430         dy: c_int,
4431         prcScroll: *const RECT,
4432         prcClip: *const RECT,
4433         hrgnUpdate: HRGN,
4434         prcUpdate: LPRECT,
4435         flags: UINT,
4436     ) -> c_int;
4437 }
4438 pub const SW_SCROLLCHILDREN: UINT = 0x0001;
4439 pub const SW_INVALIDATE: UINT = 0x0002;
4440 pub const SW_ERASE: UINT = 0x0004;
4441 pub const SW_SMOOTHSCROLL: UINT = 0x0010;
4442 extern "system" {
SetScrollPos( hWnd: HWND, nBar: c_int, nPos: c_int, bRedraw: BOOL, ) -> c_int4443     pub fn SetScrollPos(
4444         hWnd: HWND,
4445         nBar: c_int,
4446         nPos: c_int,
4447         bRedraw: BOOL,
4448     ) -> c_int;
GetScrollPos( hWnd: HWND, nBar: c_int, ) -> c_int4449     pub fn GetScrollPos(
4450         hWnd: HWND,
4451         nBar: c_int,
4452     ) -> c_int;
SetScrollRange( hWnd: HWND, nBar: c_int, nMinPos: c_int, nMaxPos: c_int, bRedraw: BOOL, ) -> BOOL4453     pub fn SetScrollRange(
4454         hWnd: HWND,
4455         nBar: c_int,
4456         nMinPos: c_int,
4457         nMaxPos: c_int,
4458         bRedraw: BOOL,
4459     ) -> BOOL;
GetScrollRange( hWnd: HWND, nBar: c_int, lpMinPos: LPINT, lpMaxPos: LPINT, ) -> BOOL4460     pub fn GetScrollRange(
4461         hWnd: HWND,
4462         nBar: c_int,
4463         lpMinPos: LPINT,
4464         lpMaxPos: LPINT,
4465     ) -> BOOL;
ShowScrollBar( hWnd: HWND, wBar: c_int, bShow: BOOL, ) -> BOOL4466     pub fn ShowScrollBar(
4467         hWnd: HWND,
4468         wBar: c_int,
4469         bShow: BOOL,
4470     ) -> BOOL;
EnableScrollBar( hWnd: HWND, wSBflags: UINT, wArrows: UINT, ) -> BOOL4471     pub fn EnableScrollBar(
4472         hWnd: HWND,
4473         wSBflags: UINT,
4474         wArrows: UINT,
4475     ) -> BOOL;
4476 }
4477 pub const ESB_ENABLE_BOTH: UINT = 0x0000;
4478 pub const ESB_DISABLE_BOTH: UINT = 0x0003;
4479 pub const ESB_DISABLE_LEFT: UINT = 0x0001;
4480 pub const ESB_DISABLE_RIGHT: UINT = 0x0002;
4481 pub const ESB_DISABLE_UP: UINT = 0x0001;
4482 pub const ESB_DISABLE_DOWN: UINT = 0x0002;
4483 pub const ESB_DISABLE_LTUP: UINT = ESB_DISABLE_LEFT;
4484 pub const ESB_DISABLE_RTDN: UINT = ESB_DISABLE_RIGHT;
4485 extern "system" {
SetPropA( hWnd: HWND, lpString: LPCSTR, hData: HANDLE, ) -> BOOL4486     pub fn SetPropA(
4487         hWnd: HWND,
4488         lpString: LPCSTR,
4489         hData: HANDLE,
4490     ) -> BOOL;
SetPropW( hWnd: HWND, lpString: LPCWSTR, hData: HANDLE, ) -> BOOL4491     pub fn SetPropW(
4492         hWnd: HWND,
4493         lpString: LPCWSTR,
4494         hData: HANDLE,
4495     ) -> BOOL;
GetPropA( hwnd: HWND, lpString: LPCSTR, ) -> HANDLE4496     pub fn GetPropA(
4497         hwnd: HWND,
4498         lpString: LPCSTR,
4499     ) -> HANDLE;
GetPropW( hwnd: HWND, lpString: LPCWSTR, ) -> HANDLE4500     pub fn GetPropW(
4501         hwnd: HWND,
4502         lpString: LPCWSTR,
4503     ) -> HANDLE;
RemovePropA( hWnd: HWND, lpStr: LPCSTR, ) -> HANDLE4504     pub fn RemovePropA(
4505         hWnd: HWND,
4506         lpStr: LPCSTR,
4507     ) -> HANDLE;
RemovePropW( hWnd: HWND, lpStr: LPCWSTR, ) -> HANDLE4508     pub fn RemovePropW(
4509         hWnd: HWND,
4510         lpStr: LPCWSTR,
4511     ) -> HANDLE;
EnumPropsExA( hWnd: HWND, lpEnumFunc: PROPENUMPROCA, lParam: LPARAM, ) -> c_int4512     pub fn EnumPropsExA(
4513         hWnd: HWND,
4514         lpEnumFunc: PROPENUMPROCA,
4515         lParam: LPARAM,
4516     ) -> c_int;
EnumPropsExW( hWnd: HWND, lpEnumFunc: PROPENUMPROCW, lParam: LPARAM, ) -> c_int4517     pub fn EnumPropsExW(
4518         hWnd: HWND,
4519         lpEnumFunc: PROPENUMPROCW,
4520         lParam: LPARAM,
4521     ) -> c_int;
EnumPropsA( hWnd: HWND, lpEnumFunc: PROPENUMPROCA, ) -> c_int4522     pub fn EnumPropsA(
4523         hWnd: HWND,
4524         lpEnumFunc: PROPENUMPROCA,
4525     ) -> c_int;
EnumPropsW( hWnd: HWND, lpEnumFunc: PROPENUMPROCW, ) -> c_int4526     pub fn EnumPropsW(
4527         hWnd: HWND,
4528         lpEnumFunc: PROPENUMPROCW,
4529     ) -> c_int;
SetWindowTextA( hWnd: HWND, lpString: LPCSTR, ) -> BOOL4530     pub fn SetWindowTextA(
4531         hWnd: HWND,
4532         lpString: LPCSTR,
4533     ) -> BOOL;
SetWindowTextW( hWnd: HWND, lpString: LPCWSTR, ) -> BOOL4534     pub fn SetWindowTextW(
4535         hWnd: HWND,
4536         lpString: LPCWSTR,
4537     ) -> BOOL;
GetWindowTextA( hWnd: HWND, lpString: LPSTR, nMaxCount: c_int, ) -> c_int4538     pub fn GetWindowTextA(
4539         hWnd: HWND,
4540         lpString: LPSTR,
4541         nMaxCount: c_int,
4542     ) -> c_int;
GetWindowTextW( hWnd: HWND, lpString: LPWSTR, nMaxCount: c_int, ) -> c_int4543     pub fn GetWindowTextW(
4544         hWnd: HWND,
4545         lpString: LPWSTR,
4546         nMaxCount: c_int,
4547     ) -> c_int;
GetWindowTextLengthA( hWnd: HWND, ) -> c_int4548     pub fn GetWindowTextLengthA(
4549         hWnd: HWND,
4550     ) -> c_int;
GetWindowTextLengthW( hWnd: HWND, ) -> c_int4551     pub fn GetWindowTextLengthW(
4552         hWnd: HWND,
4553     ) -> c_int;
GetClientRect( hWnd: HWND, lpRect: LPRECT, ) -> BOOL4554     pub fn GetClientRect(
4555         hWnd: HWND,
4556         lpRect: LPRECT,
4557     ) -> BOOL;
GetWindowRect( hWnd: HWND, lpRect: LPRECT, ) -> BOOL4558     pub fn GetWindowRect(
4559         hWnd: HWND,
4560         lpRect: LPRECT,
4561     ) -> BOOL;
AdjustWindowRect( lpRect: LPRECT, dwStyle: DWORD, bMenu: BOOL, ) -> BOOL4562     pub fn AdjustWindowRect(
4563         lpRect: LPRECT,
4564         dwStyle: DWORD,
4565         bMenu: BOOL,
4566     ) -> BOOL;
AdjustWindowRectEx( lpRect: LPRECT, dwStyle: DWORD, bMenu: BOOL, dwExStyle: DWORD, ) -> BOOL4567     pub fn AdjustWindowRectEx(
4568         lpRect: LPRECT,
4569         dwStyle: DWORD,
4570         bMenu: BOOL,
4571         dwExStyle: DWORD,
4572     ) -> BOOL;
AdjustWindowRectExForDpi( lpRect: LPRECT, dwStyle: DWORD, bMenu: BOOL, dwExStyle: DWORD, dpi: UINT, ) -> BOOL4573     pub fn AdjustWindowRectExForDpi(
4574         lpRect: LPRECT,
4575         dwStyle: DWORD,
4576         bMenu: BOOL,
4577         dwExStyle: DWORD,
4578         dpi: UINT,
4579     ) -> BOOL;
4580 }
4581 pub const HELPINFO_WINDOW: UINT = 0x0001;
4582 pub const HELPINFO_MENUITEM: UINT = 0x0002;
4583 STRUCT!{struct HELPINFO {
4584     cbSize: UINT,
4585     iContextType: c_int,
4586     iCtrlId: c_int,
4587     hItemHandle: HANDLE,
4588     dwContextId: DWORD,
4589     MousePos: POINT,
4590 }}
4591 pub type LPHELPINFO = *mut HELPINFO;
4592 extern "system" {
SetWindowContextHelpId( _: HWND, _: DWORD, ) -> BOOL4593     pub fn SetWindowContextHelpId(
4594         _: HWND,
4595         _: DWORD,
4596     ) -> BOOL;
GetWindowContextHelpId( _: HWND, ) -> DWORD4597     pub fn GetWindowContextHelpId(
4598         _: HWND,
4599     ) -> DWORD;
SetMenuContextHelpId( _: HMENU, _: DWORD, ) -> BOOL4600     pub fn SetMenuContextHelpId(
4601         _: HMENU,
4602         _: DWORD,
4603     ) -> BOOL;
GetMenuContextHelpId( _: HMENU, ) -> DWORD4604     pub fn GetMenuContextHelpId(
4605         _: HMENU,
4606     ) -> DWORD;
4607 }
4608 pub const MB_OK: UINT = 0x00000000;
4609 pub const MB_OKCANCEL: UINT = 0x00000001;
4610 pub const MB_ABORTRETRYIGNORE: UINT = 0x00000002;
4611 pub const MB_YESNOCANCEL: UINT = 0x00000003;
4612 pub const MB_YESNO: UINT = 0x00000004;
4613 pub const MB_RETRYCANCEL: UINT = 0x00000005;
4614 pub const MB_CANCELTRYCONTINUE: UINT = 0x00000006;
4615 pub const MB_ICONHAND: UINT = 0x00000010;
4616 pub const MB_ICONQUESTION: UINT = 0x00000020;
4617 pub const MB_ICONEXCLAMATION: UINT = 0x00000030;
4618 pub const MB_ICONASTERISK: UINT = 0x00000040;
4619 pub const MB_USERICON: UINT = 0x00000080;
4620 pub const MB_ICONWARNING: UINT = MB_ICONEXCLAMATION;
4621 pub const MB_ICONERROR: UINT = MB_ICONHAND;
4622 pub const MB_ICONINFORMATION: UINT = MB_ICONASTERISK;
4623 pub const MB_ICONSTOP: UINT = MB_ICONHAND;
4624 pub const MB_DEFBUTTON1: UINT = 0x00000000;
4625 pub const MB_DEFBUTTON2: UINT = 0x00000100;
4626 pub const MB_DEFBUTTON3: UINT = 0x00000200;
4627 pub const MB_DEFBUTTON4: UINT = 0x00000300;
4628 pub const MB_APPLMODAL: UINT = 0x00000000;
4629 pub const MB_SYSTEMMODAL: UINT = 0x00001000;
4630 pub const MB_TASKMODAL: UINT = 0x00002000;
4631 pub const MB_HELP: UINT = 0x00004000;
4632 pub const MB_NOFOCUS: UINT = 0x00008000;
4633 pub const MB_SETFOREGROUND: UINT = 0x00010000;
4634 pub const MB_DEFAULT_DESKTOP_ONLY: UINT = 0x00020000;
4635 pub const MB_TOPMOST: UINT = 0x00040000;
4636 pub const MB_RIGHT: UINT = 0x00080000;
4637 pub const MB_RTLREADING: UINT = 0x00100000;
4638 pub const MB_SERVICE_NOTIFICATION: UINT = 0x00200000;
4639 pub const MB_SERVICE_NOTIFICATION_NT3X: UINT = 0x00040000;
4640 pub const MB_TYPEMASK: UINT = 0x0000000F;
4641 pub const MB_ICONMASK: UINT = 0x000000F0;
4642 pub const MB_DEFMASK: UINT = 0x00000F00;
4643 pub const MB_MODEMASK: UINT = 0x00003000;
4644 pub const MB_MISCMASK: UINT = 0x0000C000;
4645 extern "system" {
MessageBoxA( hWnd: HWND, lpText: LPCSTR, lpCaption: LPCSTR, uType: UINT, ) -> c_int4646     pub fn MessageBoxA(
4647         hWnd: HWND,
4648         lpText: LPCSTR,
4649         lpCaption: LPCSTR,
4650         uType: UINT,
4651     ) -> c_int;
MessageBoxW( hWnd: HWND, lpText: LPCWSTR, lpCaption: LPCWSTR, uType: UINT, ) -> c_int4652     pub fn MessageBoxW(
4653         hWnd: HWND,
4654         lpText: LPCWSTR,
4655         lpCaption: LPCWSTR,
4656         uType: UINT,
4657     ) -> c_int;
MessageBoxExA( hWnd: HWND, lpText: LPCSTR, lpCaption: LPCSTR, uType: UINT, wLanguageId: WORD, ) -> c_int4658     pub fn MessageBoxExA(
4659         hWnd: HWND,
4660         lpText: LPCSTR,
4661         lpCaption: LPCSTR,
4662         uType: UINT,
4663         wLanguageId: WORD,
4664     ) -> c_int;
MessageBoxExW( hWnd: HWND, lpText: LPCWSTR, lpCaption: LPCWSTR, uType: UINT, wLanguageId: WORD, ) -> c_int4665     pub fn MessageBoxExW(
4666         hWnd: HWND,
4667         lpText: LPCWSTR,
4668         lpCaption: LPCWSTR,
4669         uType: UINT,
4670         wLanguageId: WORD,
4671     ) -> c_int;
4672 }
4673 STRUCT!{struct MSGBOXPARAMSA {
4674     cbSize: UINT,
4675     hwndOwner: HWND,
4676     hInstance: HINSTANCE,
4677     lpszText: LPCSTR,
4678     lpszCaption: LPCSTR,
4679     dwStyle: DWORD,
4680     lpszIcon: LPCSTR,
4681     dwContextHelpId: DWORD_PTR,
4682     lpfnMsgBoxCallback: MSGBOXCALLBACK,
4683     dwLanguageId: DWORD,
4684 }}
4685 pub type PMSGBOXPARAMSA = *mut MSGBOXPARAMSA;
4686 pub type LPMSGBOXPARAMSA = *mut MSGBOXPARAMSA;
4687 STRUCT!{struct MSGBOXPARAMSW {
4688     cbSize: UINT,
4689     hwndOwner: HWND,
4690     hInstance: HINSTANCE,
4691     lpszText: LPCWSTR,
4692     lpszCaption: LPCWSTR,
4693     dwStyle: DWORD,
4694     lpszIcon: LPCWSTR,
4695     dwContextHelpId: DWORD_PTR,
4696     lpfnMsgBoxCallback: MSGBOXCALLBACK,
4697     dwLanguageId: DWORD,
4698 }}
4699 pub type PMSGBOXPARAMSW = *mut MSGBOXPARAMSW;
4700 pub type LPMSGBOXPARAMSW = *mut MSGBOXPARAMSW;
4701 extern "system" {
MessageBoxIndirectA( lpmbp: *const MSGBOXPARAMSA, ) -> c_int4702     pub fn MessageBoxIndirectA(
4703         lpmbp: *const MSGBOXPARAMSA,
4704     ) -> c_int;
MessageBoxIndirectW( lpmbp: *const MSGBOXPARAMSW, ) -> c_int4705     pub fn MessageBoxIndirectW(
4706         lpmbp: *const MSGBOXPARAMSW,
4707     ) -> c_int;
MessageBeep( uType: UINT, ) -> BOOL4708     pub fn MessageBeep(
4709         uType: UINT,
4710     ) -> BOOL;
ShowCursor( bShow: BOOL, ) -> c_int4711     pub fn ShowCursor(
4712         bShow: BOOL,
4713     ) -> c_int;
SetCursorPos( X: c_int, Y: c_int, ) -> BOOL4714     pub fn SetCursorPos(
4715         X: c_int,
4716         Y: c_int,
4717     ) -> BOOL;
SetPhysicalCursorPos( X: c_int, Y: c_int, ) -> BOOL4718     pub fn SetPhysicalCursorPos(
4719         X: c_int,
4720         Y: c_int,
4721     ) -> BOOL;
SetCursor( hCursor: HCURSOR, ) -> HCURSOR4722     pub fn SetCursor(
4723         hCursor: HCURSOR,
4724     ) -> HCURSOR;
GetCursorPos( lpPoint: LPPOINT, ) -> BOOL4725     pub fn GetCursorPos(
4726         lpPoint: LPPOINT,
4727     ) -> BOOL;
GetPhysicalCursorPos( lpPoint: LPPOINT, ) -> BOOL4728     pub fn GetPhysicalCursorPos(
4729         lpPoint: LPPOINT,
4730     ) -> BOOL;
GetClipCursor( lpRect: LPRECT, ) -> BOOL4731     pub fn GetClipCursor(
4732         lpRect: LPRECT,
4733     ) -> BOOL;
GetCursor() -> HCURSOR4734     pub fn GetCursor() -> HCURSOR;
CreateCaret( hWnd: HWND, hBitmap: HBITMAP, nWidth: c_int, nHeight: c_int, ) -> BOOL4735     pub fn CreateCaret(
4736         hWnd: HWND,
4737         hBitmap: HBITMAP,
4738         nWidth: c_int,
4739         nHeight: c_int,
4740     ) -> BOOL;
GetCaretBlinkTime() -> UINT4741     pub fn GetCaretBlinkTime() -> UINT;
SetCaretBlinkTime( uMSeconds: UINT, ) -> BOOL4742     pub fn SetCaretBlinkTime(
4743         uMSeconds: UINT,
4744     ) -> BOOL;
DestroyCaret() -> BOOL4745     pub fn DestroyCaret() -> BOOL;
HideCaret( hWnd: HWND, ) -> BOOL4746     pub fn HideCaret(
4747         hWnd: HWND,
4748     ) -> BOOL;
ShowCaret( hWnd: HWND, ) -> BOOL4749     pub fn ShowCaret(
4750         hWnd: HWND,
4751     ) -> BOOL;
SetCaretPos( X: c_int, Y: c_int, ) -> BOOL4752     pub fn SetCaretPos(
4753         X: c_int,
4754         Y: c_int,
4755     ) -> BOOL;
GetCaretPos( lpPoint: LPPOINT, ) -> BOOL4756     pub fn GetCaretPos(
4757         lpPoint: LPPOINT,
4758     ) -> BOOL;
ClientToScreen( hWnd: HWND, lpPoint: LPPOINT, ) -> BOOL4759     pub fn ClientToScreen(
4760         hWnd: HWND,
4761         lpPoint: LPPOINT,
4762     ) -> BOOL;
ScreenToClient( hWnd: HWND, lpPoint: LPPOINT, ) -> BOOL4763     pub fn ScreenToClient(
4764         hWnd: HWND,
4765         lpPoint: LPPOINT,
4766     ) -> BOOL;
LogicalToPhysicalPoint( hWnd: HWND, lpPoint: LPPOINT, ) -> BOOL4767     pub fn LogicalToPhysicalPoint(
4768         hWnd: HWND,
4769         lpPoint: LPPOINT,
4770     ) -> BOOL;
PhysicalToLogicalPoint( hWnd: HWND, lpPoint: LPPOINT, ) -> BOOL4771     pub fn PhysicalToLogicalPoint(
4772         hWnd: HWND,
4773         lpPoint: LPPOINT,
4774     ) -> BOOL;
LogicalToPhysicalPointForPerMonitorDPI( hWnd: HWND, lpPoint: LPPOINT, ) -> BOOL4775     pub fn LogicalToPhysicalPointForPerMonitorDPI(
4776         hWnd: HWND,
4777         lpPoint: LPPOINT,
4778     ) -> BOOL;
PhysicalToLogicalPointForPerMonitorDPI( hWnd: HWND, lpPoint: LPPOINT, ) -> BOOL4779     pub fn PhysicalToLogicalPointForPerMonitorDPI(
4780         hWnd: HWND,
4781         lpPoint: LPPOINT,
4782     ) -> BOOL;
MapWindowPoints( hWndFrom: HWND, hWndTo: HWND, lpPoints: LPPOINT, cPoints: UINT, ) -> c_int4783     pub fn MapWindowPoints(
4784         hWndFrom: HWND,
4785         hWndTo: HWND,
4786         lpPoints: LPPOINT,
4787         cPoints: UINT,
4788     ) -> c_int;
WindowFromPoint( Point: POINT, ) -> HWND4789     pub fn WindowFromPoint(
4790         Point: POINT,
4791     ) -> HWND;
WindowFromPhysicalPoint( Point: POINT, ) -> HWND4792     pub fn WindowFromPhysicalPoint(
4793         Point: POINT,
4794     ) -> HWND;
ChildWindowFromPoint( hWndParent: HWND, point: POINT, ) -> HWND4795     pub fn ChildWindowFromPoint(
4796         hWndParent: HWND,
4797         point: POINT,
4798     ) -> HWND;
ClipCursor( lpRect: *const RECT, ) -> BOOL4799     pub fn ClipCursor(
4800         lpRect: *const RECT,
4801     ) -> BOOL;
4802 }
4803 pub const CWP_ALL: UINT = 0x0000;
4804 pub const CWP_SKIPINVISIBLE: UINT = 0x0001;
4805 pub const CWP_SKIPDISABLED: UINT = 0x0002;
4806 pub const CWP_SKIPTRANSPARENT: UINT = 0x0004;
4807 extern "system" {
ChildWindowFromPointEx( hwnd: HWND, pt: POINT, flags: UINT, ) -> HWND4808     pub fn ChildWindowFromPointEx(
4809         hwnd: HWND,
4810         pt: POINT,
4811         flags: UINT,
4812     ) -> HWND;
4813 }
4814 pub const CTLCOLOR_MSGBOX: c_int = 0;
4815 pub const CTLCOLOR_EDIT: c_int = 1;
4816 pub const CTLCOLOR_LISTBOX: c_int = 2;
4817 pub const CTLCOLOR_BTN: c_int = 3;
4818 pub const CTLCOLOR_DLG: c_int = 4;
4819 pub const CTLCOLOR_SCROLLBAR: c_int = 5;
4820 pub const CTLCOLOR_STATIC: c_int = 6;
4821 pub const CTLCOLOR_MAX: c_int = 7;
4822 pub const COLOR_SCROLLBAR: c_int = 0;
4823 pub const COLOR_BACKGROUND: c_int = 1;
4824 pub const COLOR_ACTIVECAPTION: c_int = 2;
4825 pub const COLOR_INACTIVECAPTION: c_int = 3;
4826 pub const COLOR_MENU: c_int = 4;
4827 pub const COLOR_WINDOW: c_int = 5;
4828 pub const COLOR_WINDOWFRAME: c_int = 6;
4829 pub const COLOR_MENUTEXT: c_int = 7;
4830 pub const COLOR_WINDOWTEXT: c_int = 8;
4831 pub const COLOR_CAPTIONTEXT: c_int = 9;
4832 pub const COLOR_ACTIVEBORDER: c_int = 10;
4833 pub const COLOR_INACTIVEBORDER: c_int = 11;
4834 pub const COLOR_APPWORKSPACE: c_int = 12;
4835 pub const COLOR_HIGHLIGHT: c_int = 13;
4836 pub const COLOR_HIGHLIGHTTEXT: c_int = 14;
4837 pub const COLOR_BTNFACE: c_int = 15;
4838 pub const COLOR_BTNSHADOW: c_int = 16;
4839 pub const COLOR_GRAYTEXT: c_int = 17;
4840 pub const COLOR_BTNTEXT: c_int = 18;
4841 pub const COLOR_INACTIVECAPTIONTEXT: c_int = 19;
4842 pub const COLOR_BTNHIGHLIGHT: c_int = 20;
4843 pub const COLOR_3DDKSHADOW: c_int = 21;
4844 pub const COLOR_3DLIGHT: c_int = 22;
4845 pub const COLOR_INFOTEXT: c_int = 23;
4846 pub const COLOR_INFOBK: c_int = 24;
4847 pub const COLOR_HOTLIGHT: c_int = 26;
4848 pub const COLOR_GRADIENTACTIVECAPTION: c_int = 27;
4849 pub const COLOR_GRADIENTINACTIVECAPTION: c_int = 28;
4850 pub const COLOR_MENUHILIGHT: c_int = 29;
4851 pub const COLOR_MENUBAR: c_int = 30;
4852 pub const COLOR_DESKTOP: c_int = COLOR_BACKGROUND;
4853 pub const COLOR_3DFACE: c_int = COLOR_BTNFACE;
4854 pub const COLOR_3DSHADOW: c_int = COLOR_BTNSHADOW;
4855 pub const COLOR_3DHIGHLIGHT: c_int = COLOR_BTNHIGHLIGHT;
4856 pub const COLOR_3DHILIGHT: c_int = COLOR_BTNHIGHLIGHT;
4857 pub const COLOR_BTNHILIGHT: c_int = COLOR_BTNHIGHLIGHT;
4858 extern "system" {
GetSysColor( nIndex: c_int, ) -> DWORD4859     pub fn GetSysColor(
4860         nIndex: c_int,
4861     ) -> DWORD;
GetSysColorBrush( nIndex: c_int, ) -> HBRUSH4862     pub fn GetSysColorBrush(
4863         nIndex: c_int,
4864     ) -> HBRUSH;
SetSysColors( cElements: c_int, lpaElements: *const INT, lpaRgbValues: *const COLORREF, ) -> BOOL4865     pub fn SetSysColors(
4866         cElements: c_int,
4867         lpaElements: *const INT,
4868         lpaRgbValues: *const COLORREF,
4869     ) -> BOOL;
DrawFocusRect( hDC: HDC, lprc: *const RECT, ) -> BOOL4870     pub fn DrawFocusRect(
4871         hDC: HDC,
4872         lprc: *const RECT,
4873     ) -> BOOL;
FillRect( hDC: HDC, lprc: *const RECT, hbr: HBRUSH, ) -> c_int4874     pub fn FillRect(
4875         hDC: HDC,
4876         lprc: *const RECT,
4877         hbr: HBRUSH,
4878     ) -> c_int;
FrameRect( hDC: HDC, lprc: *const RECT, hbr: HBRUSH, ) -> c_int4879     pub fn FrameRect(
4880         hDC: HDC,
4881         lprc: *const RECT,
4882         hbr: HBRUSH,
4883     ) -> c_int;
InvertRect( hDC: HDC, lprc: *const RECT, ) -> BOOL4884     pub fn InvertRect(
4885         hDC: HDC,
4886         lprc: *const RECT,
4887     ) -> BOOL;
SetRect( lprc: LPRECT, xLeft: c_int, yTop: c_int, xRight: c_int, yBottom: c_int, ) -> BOOL4888     pub fn SetRect(
4889         lprc: LPRECT,
4890         xLeft: c_int,
4891         yTop: c_int,
4892         xRight: c_int,
4893         yBottom: c_int,
4894     ) -> BOOL;
SetRectEmpty( lprc: LPRECT, ) -> BOOL4895     pub fn SetRectEmpty(
4896         lprc: LPRECT,
4897     ) -> BOOL;
CopyRect( lprcDst: LPRECT, lprcSrc: *const RECT, ) -> BOOL4898     pub fn CopyRect(
4899         lprcDst: LPRECT,
4900         lprcSrc: *const RECT,
4901     ) -> BOOL;
InflateRect( lprc: LPRECT, dx: c_int, dy: c_int, ) -> BOOL4902     pub fn InflateRect(
4903         lprc: LPRECT,
4904         dx: c_int,
4905         dy: c_int,
4906     ) -> BOOL;
IntersectRect( lprcDst: LPRECT, lprcSrc1: *const RECT, lprcSrc2: *const RECT, ) -> BOOL4907     pub fn IntersectRect(
4908         lprcDst: LPRECT,
4909         lprcSrc1: *const RECT,
4910         lprcSrc2: *const RECT,
4911     ) -> BOOL;
UnionRect( lprcDst: LPRECT, lprcSrc1: *const RECT, lprcSrc2: *const RECT, ) -> BOOL4912     pub fn UnionRect(
4913         lprcDst: LPRECT,
4914         lprcSrc1: *const RECT,
4915         lprcSrc2: *const RECT,
4916     ) -> BOOL;
SubtractRect( lprcDst: LPRECT, lprcSrc1: *const RECT, lprcSrc2: *const RECT, ) -> BOOL4917     pub fn SubtractRect(
4918         lprcDst: LPRECT,
4919         lprcSrc1: *const RECT,
4920         lprcSrc2: *const RECT,
4921     ) -> BOOL;
OffsetRect( lprc: LPRECT, dx: c_int, dy: c_int, ) -> BOOL4922     pub fn OffsetRect(
4923         lprc: LPRECT,
4924         dx: c_int,
4925         dy: c_int,
4926     ) -> BOOL;
IsRectEmpty( lprc: *const RECT, ) -> BOOL4927     pub fn IsRectEmpty(
4928         lprc: *const RECT,
4929     ) -> BOOL;
EqualRect( lprc1: *const RECT, lprc2: *const RECT, ) -> BOOL4930     pub fn EqualRect(
4931         lprc1: *const RECT,
4932         lprc2: *const RECT,
4933     ) -> BOOL;
PtInRect( lprc: *const RECT, pt: POINT, ) -> BOOL4934     pub fn PtInRect(
4935         lprc: *const RECT,
4936         pt: POINT,
4937     ) -> BOOL;
GetWindowWord( hWnd: HWND, nIndex: c_int, ) -> WORD4938     pub fn GetWindowWord(
4939         hWnd: HWND,
4940         nIndex: c_int,
4941     ) -> WORD;
SetWindowWord( hwnd: HWND, nIndex: c_int, wNewWord: WORD, ) -> WORD4942     pub fn SetWindowWord(
4943         hwnd: HWND,
4944         nIndex: c_int,
4945         wNewWord: WORD,
4946     ) -> WORD;
GetWindowLongA( hWnd: HWND, nIndex: c_int, ) -> LONG4947     pub fn GetWindowLongA(
4948         hWnd: HWND,
4949         nIndex: c_int,
4950     ) -> LONG;
GetWindowLongW( hWnd: HWND, nIndex: c_int, ) -> LONG4951     pub fn GetWindowLongW(
4952         hWnd: HWND,
4953         nIndex: c_int,
4954     ) -> LONG;
SetWindowLongA( hWnd: HWND, nIndex: c_int, dwNewLong: LONG, ) -> LONG4955     pub fn SetWindowLongA(
4956         hWnd: HWND,
4957         nIndex: c_int,
4958         dwNewLong: LONG,
4959     ) -> LONG;
SetWindowLongW( hWnd: HWND, nIndex: c_int, dwNewLong: LONG, ) -> LONG4960     pub fn SetWindowLongW(
4961         hWnd: HWND,
4962         nIndex: c_int,
4963         dwNewLong: LONG,
4964     ) -> LONG;
4965     #[cfg(target_arch = "x86_64")]
GetWindowLongPtrA( hWnd: HWND, nIndex: c_int, ) -> LONG_PTR4966     pub fn GetWindowLongPtrA(
4967         hWnd: HWND,
4968         nIndex: c_int,
4969     ) -> LONG_PTR;
4970     #[cfg(target_arch = "x86_64")]
GetWindowLongPtrW( hWnd: HWND, nIndex: c_int, ) -> LONG_PTR4971     pub fn GetWindowLongPtrW(
4972         hWnd: HWND,
4973         nIndex: c_int,
4974     ) -> LONG_PTR;
4975     #[cfg(target_arch = "x86_64")]
SetWindowLongPtrA( hWnd: HWND, nIndex: c_int, dwNewLong: LONG_PTR, ) -> LONG_PTR4976     pub fn SetWindowLongPtrA(
4977         hWnd: HWND,
4978         nIndex: c_int,
4979         dwNewLong: LONG_PTR,
4980     ) -> LONG_PTR;
4981     #[cfg(target_arch = "x86_64")]
SetWindowLongPtrW( hWnd: HWND, nIndex: c_int, dwNewLong: LONG_PTR, ) -> LONG_PTR4982     pub fn SetWindowLongPtrW(
4983         hWnd: HWND,
4984         nIndex: c_int,
4985         dwNewLong: LONG_PTR,
4986     ) -> LONG_PTR;
4987 }
4988 #[cfg(target_arch = "x86")]
4989 pub use self::GetWindowLongA as GetWindowLongPtrA;
4990 #[cfg(target_arch = "x86")]
4991 pub use self::GetWindowLongW as GetWindowLongPtrW;
4992 #[cfg(target_arch = "x86")]
4993 pub use self::SetWindowLongA as SetWindowLongPtrA;
4994 #[cfg(target_arch = "x86")]
4995 pub use self::SetWindowLongW as SetWindowLongPtrW;
4996 extern "system" {
GetClassWord( hWnd: HWND, nIndex: c_int, ) -> WORD4997     pub fn GetClassWord(
4998         hWnd: HWND,
4999         nIndex: c_int,
5000     ) -> WORD;
SetClassWord( hWnd: HWND, nIndex: c_int, wNewWord: WORD, ) -> WORD5001     pub fn SetClassWord(
5002         hWnd: HWND,
5003         nIndex: c_int,
5004         wNewWord: WORD,
5005     ) -> WORD;
GetClassLongA( hWnd: HWND, nIndex: c_int, ) -> DWORD5006     pub fn GetClassLongA(
5007         hWnd: HWND,
5008         nIndex: c_int,
5009     ) -> DWORD;
GetClassLongW( hWnd: HWND, nIndex: c_int, ) -> DWORD5010     pub fn GetClassLongW(
5011         hWnd: HWND,
5012         nIndex: c_int,
5013     ) -> DWORD;
SetClassLongA( hWnd: HWND, nIndex: c_int, dwNewLong: LONG, ) -> DWORD5014     pub fn SetClassLongA(
5015         hWnd: HWND,
5016         nIndex: c_int,
5017         dwNewLong: LONG,
5018     ) -> DWORD;
SetClassLongW( hWnd: HWND, nIndex: c_int, dwNewLong: LONG, ) -> DWORD5019     pub fn SetClassLongW(
5020         hWnd: HWND,
5021         nIndex: c_int,
5022         dwNewLong: LONG,
5023     ) -> DWORD;
5024     #[cfg(target_arch = "x86_64")]
GetClassLongPtrA( hWnd: HWND, nIndex: c_int, ) -> ULONG_PTR5025     pub fn GetClassLongPtrA(
5026         hWnd: HWND,
5027         nIndex: c_int,
5028     ) -> ULONG_PTR;
5029     #[cfg(target_arch = "x86_64")]
GetClassLongPtrW( hWnd: HWND, nIndex: c_int, ) -> ULONG_PTR5030     pub fn GetClassLongPtrW(
5031         hWnd: HWND,
5032         nIndex: c_int,
5033     ) -> ULONG_PTR;
5034     #[cfg(target_arch = "x86_64")]
SetClassLongPtrA( hWnd: HWND, nIndex: c_int, dwNewLong: LONG_PTR, ) -> ULONG_PTR5035     pub fn SetClassLongPtrA(
5036         hWnd: HWND,
5037         nIndex: c_int,
5038         dwNewLong: LONG_PTR,
5039     ) -> ULONG_PTR;
5040     #[cfg(target_arch = "x86_64")]
SetClassLongPtrW( hWnd: HWND, nIndex: c_int, dwNewLong: LONG_PTR, ) -> ULONG_PTR5041     pub fn SetClassLongPtrW(
5042         hWnd: HWND,
5043         nIndex: c_int,
5044         dwNewLong: LONG_PTR,
5045     ) -> ULONG_PTR;
5046 }
5047 #[cfg(target_arch = "x86")]
5048 pub use self::GetClassLongA as GetClassLongPtrA;
5049 #[cfg(target_arch = "x86")]
5050 pub use self::GetClassLongW as GetClassLongPtrW;
5051 #[cfg(target_arch = "x86")]
5052 pub use self::SetClassLongA as SetClassLongPtrA;
5053 #[cfg(target_arch = "x86")]
5054 pub use self::SetClassLongW as SetClassLongPtrW;
5055 extern "system" {
GetProcessDefaultLayout( pdwDefaultLayout: *mut DWORD, ) -> BOOL5056     pub fn GetProcessDefaultLayout(
5057         pdwDefaultLayout: *mut DWORD,
5058     ) -> BOOL;
SetProcessDefaultLayout( dwDefaultLayout: DWORD, ) -> BOOL5059     pub fn SetProcessDefaultLayout(
5060         dwDefaultLayout: DWORD,
5061     ) -> BOOL;
GetDesktopWindow() -> HWND5062     pub fn GetDesktopWindow() -> HWND;
GetParent( hWnd: HWND, ) -> HWND5063     pub fn GetParent(
5064         hWnd: HWND,
5065     ) -> HWND;
SetParent( hWndChild: HWND, hWndNewParent: HWND, ) -> HWND5066     pub fn SetParent(
5067         hWndChild: HWND,
5068         hWndNewParent: HWND,
5069     ) -> HWND;
EnumChildWindows( hWndParent: HWND, lpEnumFunc: WNDENUMPROC, lParam: LPARAM, ) -> BOOL5070     pub fn EnumChildWindows(
5071         hWndParent: HWND,
5072         lpEnumFunc: WNDENUMPROC,
5073         lParam: LPARAM,
5074     ) -> BOOL;
FindWindowA( lpClassName: LPCSTR, lpWindowName: LPCSTR, ) -> HWND5075     pub fn FindWindowA(
5076         lpClassName: LPCSTR,
5077         lpWindowName: LPCSTR,
5078     ) -> HWND;
FindWindowW( lpClassName: LPCWSTR, lpWindowName: LPCWSTR, ) -> HWND5079     pub fn FindWindowW(
5080         lpClassName: LPCWSTR,
5081         lpWindowName: LPCWSTR,
5082     ) -> HWND;
FindWindowExA( hWndParent: HWND, hWndChildAfter: HWND, lpszClass: LPCSTR, lpszWindow: LPCSTR, ) -> HWND5083     pub fn FindWindowExA(
5084         hWndParent: HWND,
5085         hWndChildAfter: HWND,
5086         lpszClass: LPCSTR,
5087         lpszWindow: LPCSTR,
5088     ) -> HWND;
FindWindowExW( hWndParent: HWND, hWndChildAfter: HWND, lpszClass: LPCWSTR, lpszWindow: LPCWSTR, ) -> HWND5089     pub fn FindWindowExW(
5090         hWndParent: HWND,
5091         hWndChildAfter: HWND,
5092         lpszClass: LPCWSTR,
5093         lpszWindow: LPCWSTR,
5094     ) -> HWND;
GetShellWindow() -> HWND5095     pub fn GetShellWindow() -> HWND;
RegisterShellHookWindow( hwnd: HWND, ) -> BOOL5096     pub fn RegisterShellHookWindow(
5097         hwnd: HWND,
5098     ) -> BOOL;
DeregisterShellHookWindow( hwnd: HWND, ) -> BOOL5099     pub fn DeregisterShellHookWindow(
5100         hwnd: HWND,
5101     ) -> BOOL;
EnumWindows( lpEnumFunc: WNDENUMPROC, lParam: LPARAM, ) -> BOOL5102     pub fn EnumWindows(
5103         lpEnumFunc: WNDENUMPROC,
5104         lParam: LPARAM,
5105     ) -> BOOL;
EnumThreadWindows( dwThreadId: DWORD, lpfn: WNDENUMPROC, lParam: LPARAM, ) -> BOOL5106     pub fn EnumThreadWindows(
5107         dwThreadId: DWORD,
5108         lpfn: WNDENUMPROC,
5109         lParam: LPARAM,
5110     ) -> BOOL;
5111 }
5112 // EnumTaskWindows
5113 extern "system" {
GetClassNameA( hWnd: HWND, lpClassName: LPCSTR, nMaxCount: c_int, ) -> c_int5114     pub fn GetClassNameA(
5115         hWnd: HWND,
5116         lpClassName: LPCSTR,
5117         nMaxCount: c_int,
5118     ) -> c_int;
GetClassNameW( hWnd: HWND, lpClassName: LPCWSTR, nMaxCount: c_int, ) -> c_int5119     pub fn GetClassNameW(
5120         hWnd: HWND,
5121         lpClassName: LPCWSTR,
5122         nMaxCount: c_int,
5123     ) -> c_int;
GetTopWindow( hWnd: HWND, ) -> HWND5124     pub fn GetTopWindow(
5125         hWnd: HWND,
5126     ) -> HWND;
5127 }
5128 // GetNextWindow
5129 // GetSysModalWindow
5130 // SetSysModalWindow
5131 extern "system" {
GetWindowThreadProcessId( hWnd: HWND, lpdwProcessId: LPDWORD, ) -> DWORD5132     pub fn GetWindowThreadProcessId(
5133         hWnd: HWND,
5134         lpdwProcessId: LPDWORD,
5135     ) -> DWORD;
IsGUIThread( bConvert: BOOL, ) -> BOOL5136     pub fn IsGUIThread(
5137         bConvert: BOOL,
5138     ) -> BOOL;
GetLastActivePopup( hWnd: HWND, ) -> HWND5139     pub fn GetLastActivePopup(
5140         hWnd: HWND,
5141     ) -> HWND;
5142 }
5143 pub const GW_HWNDFIRST: UINT = 0;
5144 pub const GW_HWNDLAST: UINT = 1;
5145 pub const GW_HWNDNEXT: UINT = 2;
5146 pub const GW_HWNDPREV: UINT = 3;
5147 pub const GW_OWNER: UINT = 4;
5148 pub const GW_CHILD: UINT = 5;
5149 pub const GW_ENABLEDPOPUP: UINT = 6;
5150 pub const GW_MAX: UINT = 6;
5151 extern "system" {
GetWindow( hWnd: HWND, uCmd: UINT, ) -> HWND5152     pub fn GetWindow(
5153         hWnd: HWND,
5154         uCmd: UINT,
5155     ) -> HWND;
SetWindowsHookA( nFilterType: c_int, pfnFilterProc: HOOKPROC, ) -> HHOOK5156     pub fn SetWindowsHookA(
5157         nFilterType: c_int,
5158         pfnFilterProc: HOOKPROC,
5159     ) -> HHOOK;
SetWindowsHookW( nFilterType: c_int, pfnFilterProc: HOOKPROC, ) -> HHOOK5160     pub fn SetWindowsHookW(
5161         nFilterType: c_int,
5162         pfnFilterProc: HOOKPROC,
5163     ) -> HHOOK;
UnhookWindowsHook( nFilterType: c_int, pfnFilterProc: HOOKPROC, ) -> BOOL5164     pub fn UnhookWindowsHook(
5165         nFilterType: c_int,
5166         pfnFilterProc: HOOKPROC,
5167     ) -> BOOL;
SetWindowsHookExA( idHook: c_int, lpfn: HOOKPROC, hmod: HINSTANCE, dwThreadId: DWORD, ) -> HHOOK5168     pub fn SetWindowsHookExA(
5169         idHook: c_int,
5170         lpfn: HOOKPROC,
5171         hmod: HINSTANCE,
5172         dwThreadId: DWORD,
5173     ) -> HHOOK;
SetWindowsHookExW( idHook: c_int, lpfn: HOOKPROC, hmod: HINSTANCE, dwThreadId: DWORD, ) -> HHOOK5174     pub fn SetWindowsHookExW(
5175         idHook: c_int,
5176         lpfn: HOOKPROC,
5177         hmod: HINSTANCE,
5178         dwThreadId: DWORD,
5179     ) -> HHOOK;
UnhookWindowsHookEx( hhk: HHOOK, ) -> BOOL5180     pub fn UnhookWindowsHookEx(
5181         hhk: HHOOK,
5182     ) -> BOOL;
CallNextHookEx( hhk: HHOOK, nCode: c_int, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT5183     pub fn CallNextHookEx(
5184         hhk: HHOOK,
5185         nCode: c_int,
5186         wParam: WPARAM,
5187         lParam: LPARAM,
5188     ) -> LRESULT;
5189 }
5190 // DefHookProc
5191 pub const MF_INSERT: UINT = 0x00000000;
5192 pub const MF_CHANGE: UINT = 0x00000080;
5193 pub const MF_APPEND: UINT = 0x00000100;
5194 pub const MF_DELETE: UINT = 0x00000200;
5195 pub const MF_REMOVE: UINT = 0x00001000;
5196 pub const MF_BYCOMMAND: UINT = 0x00000000;
5197 pub const MF_BYPOSITION: UINT = 0x00000400;
5198 pub const MF_SEPARATOR: UINT = 0x00000800;
5199 pub const MF_ENABLED: UINT = 0x00000000;
5200 pub const MF_GRAYED: UINT = 0x00000001;
5201 pub const MF_DISABLED: UINT = 0x00000002;
5202 pub const MF_UNCHECKED: UINT = 0x00000000;
5203 pub const MF_CHECKED: UINT = 0x00000008;
5204 pub const MF_USECHECKBITMAPS: UINT = 0x00000200;
5205 pub const MF_STRING: UINT = 0x00000000;
5206 pub const MF_BITMAP: UINT = 0x00000004;
5207 pub const MF_OWNERDRAW: UINT = 0x00000100;
5208 pub const MF_POPUP: UINT = 0x00000010;
5209 pub const MF_MENUBARBREAK: UINT = 0x00000020;
5210 pub const MF_MENUBREAK: UINT = 0x00000040;
5211 pub const MF_UNHILITE: UINT = 0x00000000;
5212 pub const MF_HILITE: UINT = 0x00000080;
5213 pub const MF_DEFAULT: UINT = 0x00001000;
5214 pub const MF_SYSMENU: UINT = 0x00002000;
5215 pub const MF_HELP: UINT = 0x00004000;
5216 pub const MF_RIGHTJUSTIFY: UINT = 0x00004000;
5217 pub const MF_MOUSESELECT: UINT = 0x00008000;
5218 pub const MF_END: UINT = 0x00000080;
5219 pub const MFT_STRING: UINT = MF_STRING;
5220 pub const MFT_BITMAP: UINT = MF_BITMAP;
5221 pub const MFT_MENUBARBREAK: UINT = MF_MENUBARBREAK;
5222 pub const MFT_MENUBREAK: UINT = MF_MENUBREAK;
5223 pub const MFT_OWNERDRAW: UINT = MF_OWNERDRAW;
5224 pub const MFT_RADIOCHECK: UINT = 0x00000200;
5225 pub const MFT_SEPARATOR: UINT = MF_SEPARATOR;
5226 pub const MFT_RIGHTORDER: UINT = 0x00002000;
5227 pub const MFT_RIGHTJUSTIFY: UINT = MF_RIGHTJUSTIFY;
5228 pub const MFS_GRAYED: UINT = 0x00000003;
5229 pub const MFS_DISABLED: UINT = MFS_GRAYED;
5230 pub const MFS_CHECKED: UINT = MF_CHECKED;
5231 pub const MFS_HILITE: UINT = MF_HILITE;
5232 pub const MFS_ENABLED: UINT = MF_ENABLED;
5233 pub const MFS_UNCHECKED: UINT = MF_UNCHECKED;
5234 pub const MFS_UNHILITE: UINT = MF_UNHILITE;
5235 pub const MFS_DEFAULT: UINT = MF_DEFAULT;
5236 extern "system" {
CheckMenuRadioItem( hMenu: HMENU, first: UINT, last: UINT, check: UINT, flags: UINT, ) -> BOOL5237     pub fn CheckMenuRadioItem(
5238         hMenu: HMENU,
5239         first: UINT,
5240         last: UINT,
5241         check: UINT,
5242         flags: UINT,
5243     ) -> BOOL;
5244 }
5245 /*********
5246 * CUTOFF *
5247 *********/
5248 pub const IDOK: c_int = 1;
5249 pub const IDCANCEL: c_int = 2;
5250 pub const IDABORT: c_int = 3;
5251 pub const IDRETRY: c_int = 4;
5252 pub const IDIGNORE: c_int = 5;
5253 pub const IDYES: c_int = 6;
5254 pub const IDNO: c_int = 7;
5255 pub const IDCLOSE: c_int = 8;
5256 pub const IDHELP: c_int = 9;
5257 pub const IDTRYAGAIN: c_int = 10;
5258 pub const IDCONTINUE: c_int = 11;
5259 pub const IDTIMEOUT: c_int = 32000;
5260 // Edit Control Styles
5261 //
5262 pub const ES_LEFT: DWORD = 0x0000;
5263 pub const ES_CENTER: DWORD = 0x0001;
5264 pub const ES_RIGHT: DWORD = 0x0002;
5265 pub const ES_MULTILINE: DWORD = 0x0004;
5266 pub const ES_UPPERCASE: DWORD = 0x0008;
5267 pub const ES_LOWERCASE: DWORD = 0x0010;
5268 pub const ES_PASSWORD: DWORD = 0x0020;
5269 pub const ES_AUTOVSCROLL: DWORD = 0x0040;
5270 pub const ES_AUTOHSCROLL: DWORD = 0x0080;
5271 pub const ES_NOHIDESEL: DWORD = 0x0100;
5272 pub const ES_OEMCONVERT: DWORD = 0x0400;
5273 pub const ES_READONLY: DWORD = 0x0800;
5274 pub const ES_WANTRETURN: DWORD = 0x1000;
5275 pub const ES_NUMBER: DWORD = 0x2000;
5276 // Edit Control Notification Codes
5277 //
5278 pub const EN_SETFOCUS: WORD = 0x0100;
5279 pub const EN_KILLFOCUS: WORD = 0x0200;
5280 pub const EN_CHANGE: WORD = 0x0300;
5281 pub const EN_UPDATE: WORD = 0x0400;
5282 pub const EN_ERRSPACE: WORD = 0x0500;
5283 pub const EN_MAXTEXT: WORD = 0x0501;
5284 pub const EN_HSCROLL: WORD = 0x0601;
5285 pub const EN_VSCROLL: WORD = 0x0602;
5286 pub const EN_ALIGN_LTR_EC: WORD = 0x0700;
5287 pub const EN_ALIGN_RTL_EC: WORD = 0x0701;
5288 // Edit control EM_SETMARGIN parameters
5289 pub const EC_LEFTMARGIN: WORD = 0x0001;
5290 pub const EC_RIGHTMARGIN: WORD = 0x0002;
5291 pub const EC_USEFONTINFO: WORD = 0xffff;
5292 // wParam of EM_GET/SETIMESTATUS
5293 pub const EMSIS_COMPOSITIONSTRING: WORD = 0x0001;
5294 // lParam for EMSIS_COMPOSITIONSTRING
5295 pub const EIMES_GETCOMPSTRATONCE: WORD = 0x0001;
5296 pub const EIMES_CANCELCOMPSTRINFOCUS: WORD = 0x0002;
5297 pub const EIMES_COMPLETECOMPSTRKILLFOCUS: WORD = 0x0004;
5298 // Edit Control Messages
5299 //
5300 pub const EM_GETSEL: WORD = 0x00B0;
5301 pub const EM_SETSEL: WORD = 0x00B1;
5302 pub const EM_GETRECT: WORD = 0x00B2;
5303 pub const EM_SETRECT: WORD = 0x00B3;
5304 pub const EM_SETRECTNP: WORD = 0x00B4;
5305 pub const EM_SCROLL: WORD = 0x00B5;
5306 pub const EM_LINESCROLL: WORD = 0x00B6;
5307 pub const EM_SCROLLCARET: WORD = 0x00B7;
5308 pub const EM_GETMODIFY: WORD = 0x00B8;
5309 pub const EM_SETMODIFY: WORD = 0x00B9;
5310 pub const EM_GETLINECOUNT: WORD = 0x00BA;
5311 pub const EM_LINEINDEX: WORD = 0x00BB;
5312 pub const EM_SETHANDLE: WORD = 0x00BC;
5313 pub const EM_GETHANDLE: WORD = 0x00BD;
5314 pub const EM_GETTHUMB: WORD = 0x00BE;
5315 pub const EM_LINELENGTH: WORD = 0x00C1;
5316 pub const EM_REPLACESEL: WORD = 0x00C2;
5317 pub const EM_GETLINE: WORD = 0x00C4;
5318 pub const EM_LIMITTEXT: WORD = 0x00C5;
5319 pub const EM_CANUNDO: WORD = 0x00C6;
5320 pub const EM_UNDO: WORD = 0x00C7;
5321 pub const EM_FMTLINES: WORD = 0x00C8;
5322 pub const EM_LINEFROMCHAR: WORD = 0x00C9;
5323 pub const EM_SETTABSTOPS: WORD = 0x00CB;
5324 pub const EM_SETPASSWORDCHAR: WORD = 0x00CC;
5325 pub const EM_EMPTYUNDOBUFFER: WORD = 0x00CD;
5326 pub const EM_GETFIRSTVISIBLELINE: WORD = 0x00CE;
5327 pub const EM_SETREADONLY: WORD = 0x00CF;
5328 pub const EM_SETWORDBREAKPROC: WORD = 0x00D0;
5329 pub const EM_GETWORDBREAKPROC: WORD = 0x00D1;
5330 pub const EM_GETPASSWORDCHAR: WORD = 0x00D2;
5331 pub const EM_SETMARGINS: WORD = 0x00D3;
5332 pub const EM_GETMARGINS: WORD = 0x00D4;
5333 pub const EM_SETLIMITTEXT: WORD = EM_LIMITTEXT;
5334 pub const EM_GETLIMITTEXT: WORD = 0x00D5;
5335 pub const EM_POSFROMCHAR: WORD = 0x00D6;
5336 pub const EM_CHARFROMPOS: WORD = 0x00D7;
5337 pub const EM_SETIMESTATUS: WORD = 0x00D8;
5338 pub const EM_GETIMESTATUS: WORD = 0x00D9;
5339 // EDITWORDBREAKPROC code values
5340 //
5341 pub const WB_LEFT: WORD = 0;
5342 pub const WB_RIGHT: WORD = 1;
5343 pub const WB_ISDELIMITER: WORD = 2;
5344 pub const BN_CLICKED: WORD = 0;
5345 pub const BN_PAINT: WORD = 1;
5346 pub const BN_HILITE: WORD = 2;
5347 pub const BN_UNHILITE: WORD = 3;
5348 pub const BN_DISABLE: WORD = 4;
5349 pub const BN_DOUBLECLICKED: WORD = 5;
5350 pub const BN_PUSHED: WORD = BN_HILITE;
5351 pub const BN_UNPUSHED: WORD = BN_UNHILITE;
5352 pub const BN_DBLCLK: WORD = BN_DOUBLECLICKED;
5353 pub const BN_SETFOCUS: WORD = 6;
5354 pub const BN_KILLFOCUS: WORD = 7;
5355 pub const BS_PUSHBUTTON: DWORD = 0x00000000;
5356 pub const BS_DEFPUSHBUTTON: DWORD = 0x00000001;
5357 pub const BS_CHECKBOX: DWORD = 0x00000002;
5358 pub const BS_AUTOCHECKBOX: DWORD = 0x00000003;
5359 pub const BS_RADIOBUTTON: DWORD = 0x00000004;
5360 pub const BS_3STATE: DWORD = 0x00000005;
5361 pub const BS_AUTO3STATE: DWORD = 0x00000006;
5362 pub const BS_GROUPBOX: DWORD = 0x00000007;
5363 pub const BS_USERBUTTON: DWORD = 0x00000008;
5364 pub const BS_AUTORADIOBUTTON: DWORD = 0x00000009;
5365 pub const BS_PUSHBOX: DWORD = 0x0000000A;
5366 pub const BS_OWNERDRAW: DWORD = 0x0000000B;
5367 pub const BS_TYPEMASK: DWORD = 0x0000000F;
5368 pub const BS_LEFTTEXT: DWORD = 0x00000020;
5369 pub const BS_TEXT: DWORD = 0x00000000;
5370 pub const BS_ICON: DWORD = 0x00000040;
5371 pub const BS_BITMAP: DWORD = 0x00000080;
5372 pub const BS_LEFT: DWORD = 0x00000100;
5373 pub const BS_RIGHT: DWORD = 0x00000200;
5374 pub const BS_CENTER: DWORD = 0x00000300;
5375 pub const BS_TOP: DWORD = 0x00000400;
5376 pub const BS_BOTTOM: DWORD = 0x00000800;
5377 pub const BS_VCENTER: DWORD = 0x00000C00;
5378 pub const BS_PUSHLIKE: DWORD = 0x00001000;
5379 pub const BS_MULTILINE: DWORD = 0x00002000;
5380 pub const BS_NOTIFY: DWORD = 0x00004000;
5381 pub const BS_FLAT: DWORD = 0x00008000;
5382 pub const BS_RIGHTBUTTON: DWORD = BS_LEFTTEXT;
5383 pub const BM_GETCHECK: UINT = 0x00F0;
5384 pub const BM_SETCHECK: UINT = 0x00F1;
5385 pub const BM_GETSTATE: UINT = 0x00F2;
5386 pub const BM_SETSTATE: UINT = 0x00F3;
5387 pub const BM_SETSTYLE: UINT = 0x00F4;
5388 pub const BM_CLICK: UINT = 0x00F5;
5389 pub const BM_GETIMAGE: UINT = 0x00F6;
5390 pub const BM_SETIMAGE: UINT = 0x00F7;
5391 pub const BM_SETDONTCLICK: UINT = 0x00F8;
5392 pub const BST_UNCHECKED: WPARAM = 0x0000;
5393 pub const BST_CHECKED: WPARAM = 0x0001;
5394 pub const BST_INDETERMINATE: WPARAM = 0x0002;
5395 pub const BST_PUSHED: LRESULT = 0x0004;
5396 pub const BST_FOCUS: LRESULT = 0x0008;
5397 pub const SS_LEFT: DWORD = 0x00000000;
5398 pub const SS_CENTER: DWORD = 0x00000001;
5399 pub const SS_RIGHT: DWORD = 0x00000002;
5400 pub const SS_ICON: DWORD = 0x00000003;
5401 pub const SS_BLACKRECT: DWORD = 0x00000004;
5402 pub const SS_GRAYRECT: DWORD = 0x00000005;
5403 pub const SS_WHITERECT: DWORD = 0x00000006;
5404 pub const SS_BLACKFRAME: DWORD = 0x00000007;
5405 pub const SS_GRAYFRAME: DWORD = 0x00000008;
5406 pub const SS_WHITEFRAME: DWORD = 0x00000009;
5407 pub const SS_USERITEM: DWORD = 0x0000000A;
5408 pub const SS_SIMPLE: DWORD = 0x0000000B;
5409 pub const SS_LEFTNOWORDWRAP: DWORD = 0x0000000C;
5410 pub const SS_OWNERDRAW: DWORD = 0x0000000D;
5411 pub const SS_BITMAP: DWORD = 0x0000000E;
5412 pub const SS_ENHMETAFILE: DWORD = 0x0000000F;
5413 pub const SS_ETCHEDHORZ: DWORD = 0x00000010;
5414 pub const SS_ETCHEDVERT: DWORD = 0x00000011;
5415 pub const SS_ETCHEDFRAME: DWORD = 0x00000012;
5416 pub const SS_TYPEMASK: DWORD = 0x0000001F;
5417 pub const SS_REALSIZECONTROL: DWORD = 0x00000040;
5418 pub const SS_NOPREFIX: DWORD = 0x00000080;
5419 pub const SS_NOTIFY: DWORD = 0x00000100;
5420 pub const SS_CENTERIMAGE: DWORD = 0x00000200;
5421 pub const SS_RIGHTJUST: DWORD = 0x00000400;
5422 pub const SS_REALSIZEIMAGE: DWORD = 0x00000800;
5423 pub const SS_SUNKEN: DWORD = 0x00001000;
5424 pub const SS_EDITCONTROL: DWORD = 0x00002000;
5425 pub const SS_ENDELLIPSIS: DWORD = 0x00004000;
5426 pub const SS_PATHELLIPSIS: DWORD = 0x00008000;
5427 pub const SS_WORDELLIPSIS: DWORD = 0x0000C000;
5428 pub const SS_ELLIPSISMASK: DWORD = 0x0000C000;
5429 pub const STM_SETICON: UINT = 0x0170;
5430 pub const STM_GETICON: UINT = 0x0171;
5431 pub const STM_SETIMAGE: UINT = 0x0172;
5432 pub const STM_GETIMAGE: UINT = 0x0173;
5433 pub const STN_CLICKED: WORD = 0;
5434 pub const STN_DBLCLK: WORD = 1;
5435 pub const STN_ENABLE: WORD = 2;
5436 pub const STN_DISABLE: WORD = 3;
5437 pub const STM_MSGMAX: WORD = 0x0174;
5438 extern "system" {
IsDialogMessageA( hDlg: HWND, lpMsg: LPMSG, ) -> BOOL5439     pub fn IsDialogMessageA(
5440         hDlg: HWND,
5441         lpMsg: LPMSG,
5442     ) -> BOOL;
IsDialogMessageW( hDlg: HWND, lpMsg: LPMSG, ) -> BOOL5443     pub fn IsDialogMessageW(
5444         hDlg: HWND,
5445         lpMsg: LPMSG,
5446     ) -> BOOL;
MapDialogRect( hDlg: HWND, lpRect: LPRECT, ) -> BOOL5447     pub fn MapDialogRect(
5448         hDlg: HWND,
5449         lpRect: LPRECT,
5450     ) -> BOOL;
DlgDirListA( hDlg: HWND, lpPathSpec: LPSTR, nIDListBox: c_int, nIDStaticPath: c_int, uFileType: UINT, ) -> c_int5451     pub fn DlgDirListA(
5452         hDlg: HWND,
5453         lpPathSpec: LPSTR,
5454         nIDListBox: c_int,
5455         nIDStaticPath: c_int,
5456         uFileType: UINT,
5457     ) -> c_int;
DlgDirListW( hDlg: HWND, lpPathSpec: LPWSTR, nIDListBox: c_int, nIDStaticPath: c_int, uFileType: UINT, ) -> c_int5458     pub fn DlgDirListW(
5459         hDlg: HWND,
5460         lpPathSpec: LPWSTR,
5461         nIDListBox: c_int,
5462         nIDStaticPath: c_int,
5463         uFileType: UINT,
5464     ) -> c_int;
DlgDirSelectExA( hwndDlg: HWND, lpString: LPSTR, chCount: c_int, idListBox: c_int, ) -> BOOL5465     pub fn DlgDirSelectExA(
5466         hwndDlg: HWND,
5467         lpString: LPSTR,
5468         chCount: c_int,
5469         idListBox: c_int,
5470     ) -> BOOL;
DlgDirSelectExW( hwndDlg: HWND, lpString: LPWSTR, chCount: c_int, idListBox: c_int, ) -> BOOL5471     pub fn DlgDirSelectExW(
5472         hwndDlg: HWND,
5473         lpString: LPWSTR,
5474         chCount: c_int,
5475         idListBox: c_int,
5476     ) -> BOOL;
DlgDirListComboBoxA( hDlg: HWND, lpPathSpec: LPSTR, nIDComboBox: c_int, nIDStaticPath: c_int, uFiletype: UINT, ) -> c_int5477     pub fn DlgDirListComboBoxA(
5478         hDlg: HWND,
5479         lpPathSpec: LPSTR,
5480         nIDComboBox: c_int,
5481         nIDStaticPath: c_int,
5482         uFiletype: UINT,
5483     ) -> c_int;
DlgDirListComboBoxW( hDlg: HWND, lpPathSpec: LPWSTR, nIDComboBox: c_int, nIDStaticPath: c_int, uFiletype: UINT, ) -> c_int5484     pub fn DlgDirListComboBoxW(
5485         hDlg: HWND,
5486         lpPathSpec: LPWSTR,
5487         nIDComboBox: c_int,
5488         nIDStaticPath: c_int,
5489         uFiletype: UINT,
5490     ) -> c_int;
DlgDirSelectComboBoxExA( hwndDlg: HWND, lpString: LPSTR, cchOut: c_int, idComboBox: c_int, ) -> BOOL5491     pub fn DlgDirSelectComboBoxExA(
5492         hwndDlg: HWND,
5493         lpString: LPSTR,
5494         cchOut: c_int,
5495         idComboBox: c_int,
5496     ) -> BOOL;
DlgDirSelectComboBoxExW( hwndDlg: HWND, lpString: LPWSTR, cchOut: c_int, idComboBox: c_int, ) -> BOOL5497     pub fn DlgDirSelectComboBoxExW(
5498         hwndDlg: HWND,
5499         lpString: LPWSTR,
5500         cchOut: c_int,
5501         idComboBox: c_int,
5502     ) -> BOOL;
5503 }
5504 pub const DS_ABSALIGN: DWORD = 0x01;
5505 pub const DS_SYSMODAL: DWORD = 0x02;
5506 pub const DS_LOCALEDIT: DWORD = 0x20;
5507 pub const DS_SETFONT: DWORD = 0x40;
5508 pub const DS_MODALFRAME: DWORD = 0x80;
5509 pub const DS_NOIDLEMSG: DWORD = 0x100;
5510 pub const DS_SETFOREGROUND: DWORD = 0x200;
5511 pub const DS_3DLOOK: DWORD = 0x0004;
5512 pub const DS_FIXEDSYS: DWORD = 0x0008;
5513 pub const DS_NOFAILCREATE: DWORD = 0x0010;
5514 pub const DS_CONTROL: DWORD = 0x0400;
5515 pub const DS_CENTER: DWORD = 0x0800;
5516 pub const DS_CENTERMOUSE: DWORD = 0x1000;
5517 pub const DS_CONTEXTHELP: DWORD = 0x2000;
5518 pub const DS_SHELLFONT: DWORD = DS_SETFONT | DS_FIXEDSYS;
5519 pub const DS_USEPIXELS: DWORD = 0x8000;
5520 pub const DM_GETDEFID: UINT = WM_USER + 0;
5521 pub const DM_SETDEFID: UINT = WM_USER + 1;
5522 pub const DM_REPOSITION: UINT = WM_USER + 2;
5523 pub const DC_HASDEFID: WORD = 0x534B;
5524 pub const DLGC_WANTARROWS: LRESULT = 0x0001;
5525 pub const DLGC_WANTTAB: LRESULT = 0x0002;
5526 pub const DLGC_WANTALLKEYS: LRESULT = 0x0004;
5527 pub const DLGC_WANTMESSAGE: LRESULT = 0x0004;
5528 pub const DLGC_HASSETSEL: LRESULT = 0x0008;
5529 pub const DLGC_DEFPUSHBUTTON: LRESULT = 0x0010;
5530 pub const DLGC_UNDEFPUSHBUTTON: LRESULT = 0x0020;
5531 pub const DLGC_RADIOBUTTON: LRESULT = 0x0040;
5532 pub const DLGC_WANTCHARS: LRESULT = 0x0080;
5533 pub const DLGC_STATIC: LRESULT = 0x0100;
5534 pub const DLGC_BUTTON: LRESULT = 0x2000;
5535 pub const LB_OKAY: LRESULT = 0;
5536 pub const LB_ERR: LRESULT = -1;
5537 pub const LB_ERRSPACE: LRESULT = -2;
5538 pub const LBN_ERRSPACE: WORD = -2i16 as u16;
5539 pub const LBN_SELCHANGE: WORD = 1;
5540 pub const LBN_DBLCLK: WORD = 2;
5541 pub const LBN_SELCANCEL: WORD = 3;
5542 pub const LBN_SETFOCUS: WORD = 4;
5543 pub const LBN_KILLFOCUS: WORD = 5;
5544 pub const LB_ADDSTRING: UINT = 0x0180;
5545 pub const LB_INSERTSTRING: UINT = 0x0181;
5546 pub const LB_DELETESTRING: UINT = 0x0182;
5547 pub const LB_SELITEMRANGEEX: UINT = 0x0183;
5548 pub const LB_RESETCONTENT: UINT = 0x0184;
5549 pub const LB_SETSEL: UINT = 0x0185;
5550 pub const LB_SETCURSEL: UINT = 0x0186;
5551 pub const LB_GETSEL: UINT = 0x0187;
5552 pub const LB_GETCURSEL: UINT = 0x0188;
5553 pub const LB_GETTEXT: UINT = 0x0189;
5554 pub const LB_GETTEXTLEN: UINT = 0x018A;
5555 pub const LB_GETCOUNT: UINT = 0x018B;
5556 pub const LB_SELECTSTRING: UINT = 0x018C;
5557 pub const LB_DIR: UINT = 0x018D;
5558 pub const LB_GETTOPINDEX: UINT = 0x018E;
5559 pub const LB_FINDSTRING: UINT = 0x018F;
5560 pub const LB_GETSELCOUNT: UINT = 0x0190;
5561 pub const LB_GETSELITEMS: UINT = 0x0191;
5562 pub const LB_SETTABSTOPS: UINT = 0x0192;
5563 pub const LB_GETHORIZONTALEXTENT: UINT = 0x0193;
5564 pub const LB_SETHORIZONTALEXTENT: UINT = 0x0194;
5565 pub const LB_SETCOLUMNWIDTH: UINT = 0x0195;
5566 pub const LB_ADDFILE: UINT = 0x0196;
5567 pub const LB_SETTOPINDEX: UINT = 0x0197;
5568 pub const LB_GETITEMRECT: UINT = 0x0198;
5569 pub const LB_GETITEMDATA: UINT = 0x0199;
5570 pub const LB_SETITEMDATA: UINT = 0x019A;
5571 pub const LB_SELITEMRANGE: UINT = 0x019B;
5572 pub const LB_SETANCHORINDEX: UINT = 0x019C;
5573 pub const LB_GETANCHORINDEX: UINT = 0x019D;
5574 pub const LB_SETCARETINDEX: UINT = 0x019E;
5575 pub const LB_GETCARETINDEX: UINT = 0x019F;
5576 pub const LB_SETITEMHEIGHT: UINT = 0x01A0;
5577 pub const LB_GETITEMHEIGHT: UINT = 0x01A1;
5578 pub const LB_FINDSTRINGEXACT: UINT = 0x01A2;
5579 pub const LB_SETLOCALE: UINT = 0x01A5;
5580 pub const LB_GETLOCALE: UINT = 0x01A6;
5581 pub const LB_SETCOUNT: UINT = 0x01A7;
5582 pub const LB_INITSTORAGE: UINT = 0x01A8;
5583 pub const LB_ITEMFROMPOINT: UINT = 0x01A9;
5584 pub const LB_MULTIPLEADDSTRING: UINT = 0x01B1;
5585 pub const LB_GETLISTBOXINFO: UINT = 0x01B2;
5586 pub const LB_MSGMAX: UINT = 0x01B3;
5587 pub const LBS_NOTIFY: DWORD = 0x0001;
5588 pub const LBS_SORT: DWORD = 0x0002;
5589 pub const LBS_NOREDRAW: DWORD = 0x0004;
5590 pub const LBS_MULTIPLESEL: DWORD = 0x0008;
5591 pub const LBS_OWNERDRAWFIXED: DWORD = 0x0010;
5592 pub const LBS_OWNERDRAWVARIABLE: DWORD = 0x0020;
5593 pub const LBS_HASSTRINGS: DWORD = 0x0040;
5594 pub const LBS_USETABSTOPS: DWORD = 0x0080;
5595 pub const LBS_NOINTEGRALHEIGHT: DWORD = 0x0100;
5596 pub const LBS_MULTICOLUMN: DWORD = 0x0200;
5597 pub const LBS_WANTKEYBOARDINPUT: DWORD = 0x0400;
5598 pub const LBS_EXTENDEDSEL: DWORD = 0x0800;
5599 pub const LBS_DISABLENOSCROLL: DWORD = 0x1000;
5600 pub const LBS_NODATA: DWORD = 0x2000;
5601 pub const LBS_NOSEL: DWORD = 0x4000;
5602 pub const LBS_COMBOBOX: DWORD = 0x8000;
5603 pub const LBS_STANDARD: DWORD = LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER;
5604 pub const CB_OKAY: LRESULT = 0;
5605 pub const CB_ERR: LRESULT = -1;
5606 pub const CB_ERRSPACE: LRESULT = -2;
5607 pub const CBN_ERRSPACE: WORD = -1i16 as u16;
5608 pub const CBN_SELCHANGE: WORD = 1;
5609 pub const CBN_DBLCLK: WORD = 2;
5610 pub const CBN_SETFOCUS: WORD = 3;
5611 pub const CBN_KILLFOCUS: WORD = 4;
5612 pub const CBN_EDITCHANGE: WORD = 5;
5613 pub const CBN_EDITUPDATE: WORD = 6;
5614 pub const CBN_DROPDOWN: WORD = 7;
5615 pub const CBN_CLOSEUP: WORD = 8;
5616 pub const CBN_SELENDOK: WORD = 9;
5617 pub const CBN_SELENDCANCEL: WORD = 10;
5618 pub const CBS_SIMPLE: DWORD = 0x0001;
5619 pub const CBS_DROPDOWN: DWORD = 0x0002;
5620 pub const CBS_DROPDOWNLIST: DWORD = 0x0003;
5621 pub const CBS_OWNERDRAWFIXED: DWORD = 0x0010;
5622 pub const CBS_OWNERDRAWVARIABLE: DWORD = 0x0020;
5623 pub const CBS_AUTOHSCROLL: DWORD = 0x0040;
5624 pub const CBS_OEMCONVERT: DWORD = 0x0080;
5625 pub const CBS_SORT: DWORD = 0x0100;
5626 pub const CBS_HASSTRINGS: DWORD = 0x0200;
5627 pub const CBS_NOINTEGRALHEIGHT: DWORD = 0x0400;
5628 pub const CBS_DISABLENOSCROLL: DWORD = 0x0800;
5629 pub const CBS_UPPERCASE: DWORD = 0x2000;
5630 pub const CBS_LOWERCASE: DWORD = 0x4000;
5631 pub const CB_MULTIPLEADDSTRING: UINT = 0x0163;
5632 pub const CB_GETCOMBOBOXINFO: UINT = 0x0164;
5633 pub const CB_MSGMAX: UINT = 0x0165;
5634 pub const SBS_HORZ: DWORD = 0x0000;
5635 pub const SBS_VERT: DWORD = 0x0001;
5636 pub const SBS_TOPALIGN: DWORD = 0x0002;
5637 pub const SBS_LEFTALIGN: DWORD = 0x0002;
5638 pub const SBS_BOTTOMALIGN: DWORD = 0x0004;
5639 pub const SBS_RIGHTALIGN: DWORD = 0x0004;
5640 pub const SBS_SIZEBOXTOPLEFTALIGN: DWORD = 0x0002;
5641 pub const SBS_SIZEBOXBOTTOMRIGHTALIGN: DWORD = 0x0004;
5642 pub const SBS_SIZEBOX: DWORD = 0x0008;
5643 pub const SBS_SIZEGRIP: DWORD = 0x0010;
5644 pub const SBM_SETPOS: UINT = 0x00E0;
5645 pub const SBM_GETPOS: UINT = 0x00E1;
5646 pub const SBM_SETRANGE: UINT = 0x00E2;
5647 pub const SBM_SETRANGEREDRAW: UINT = 0x00E6;
5648 pub const SBM_GETRANGE: UINT = 0x00E3;
5649 pub const SBM_ENABLE_ARROWS: UINT = 0x00E4;
5650 pub const SBM_SETSCROLLINFO: UINT = 0x00E9;
5651 pub const SBM_GETSCROLLINFO: UINT = 0x00EA;
5652 pub const SBM_GETSCROLLBARINFO: UINT = 0x00EB;
5653 pub const SIF_RANGE: UINT = 0x0001;
5654 pub const SIF_PAGE: UINT = 0x0002;
5655 pub const SIF_POS: UINT = 0x0004;
5656 pub const SIF_DISABLENOSCROLL: UINT = 0x0008;
5657 pub const SIF_TRACKPOS: UINT = 0x0010;
5658 pub const SIF_ALL: UINT = SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS;
5659 STRUCT!{struct SCROLLINFO {
5660     cbSize: UINT,
5661     fMask: UINT,
5662     nMin: c_int,
5663     nMax: c_int,
5664     nPage: UINT,
5665     nPos: c_int,
5666     nTrackPos: c_int,
5667 }}
5668 pub type LPSCROLLINFO = *mut SCROLLINFO;
5669 pub type LPCSCROLLINFO = *const SCROLLINFO;
5670 extern "system" {
SetScrollInfo( hwnd: HWND, nBar: c_int, lpsi: *const SCROLLINFO, redraw: BOOL, ) -> c_int5671     pub fn SetScrollInfo(
5672         hwnd: HWND,
5673         nBar: c_int,
5674         lpsi: *const SCROLLINFO,
5675         redraw: BOOL,
5676     ) -> c_int;
GetScrollInfo( hwnd: HWND, nBar: c_int, lpsi: *mut SCROLLINFO, ) -> BOOL5677     pub fn GetScrollInfo(
5678         hwnd: HWND,
5679         nBar: c_int,
5680         lpsi: *mut SCROLLINFO,
5681     ) -> BOOL;
5682 }
5683 pub const CCHILDREN_SCROLLBAR: usize = 5;
5684 pub const CDS_UPDATEREGISTRY: DWORD = 0x00000001;
5685 pub const CDS_TEST: DWORD = 0x00000002;
5686 pub const CDS_FULLSCREEN: DWORD = 0x00000004;
5687 pub const CDS_GLOBAL: DWORD = 0x00000008;
5688 pub const CDS_SET_PRIMARY: DWORD = 0x00000010;
5689 pub const CDS_VIDEOPARAMETERS: DWORD = 0x00000020;
5690 pub const CDS_ENABLE_UNSAFE_MODES: DWORD = 0x00000100;
5691 pub const CDS_DISABLE_UNSAFE_MODES: DWORD = 0x00000200;
5692 pub const CDS_RESET: DWORD = 0x40000000;
5693 pub const CDS_RESET_EX: DWORD = 0x20000000;
5694 pub const CDS_NORESET: DWORD = 0x10000000;
5695 pub const DISP_CHANGE_SUCCESSFUL: LONG = 0;
5696 pub const DISP_CHANGE_RESTART: LONG = 1;
5697 pub const DISP_CHANGE_FAILED: LONG = -1;
5698 pub const DISP_CHANGE_BADMODE: LONG = -2;
5699 pub const DISP_CHANGE_NOTUPDATED: LONG = -3;
5700 pub const DISP_CHANGE_BADFLAGS: LONG = -4;
5701 pub const DISP_CHANGE_BADPARAM: LONG = -5;
5702 pub const DISP_CHANGE_BADDUALVIEW: LONG = -6;
5703 extern "system" {
ChangeDisplaySettingsA( lpDevMode: *mut DEVMODEA, dwFlags: DWORD, ) -> LONG5704     pub fn ChangeDisplaySettingsA(
5705         lpDevMode: *mut DEVMODEA,
5706         dwFlags: DWORD,
5707     ) -> LONG;
ChangeDisplaySettingsW( lpDevMode: *mut DEVMODEW, dwFlags: DWORD, ) -> LONG5708     pub fn ChangeDisplaySettingsW(
5709         lpDevMode: *mut DEVMODEW,
5710         dwFlags: DWORD,
5711     ) -> LONG;
ChangeDisplaySettingsExA( lpszDeviceName: LPCSTR, lpDevMode: *mut DEVMODEA, hwnd: HWND, dwFlags: DWORD, lParam: LPVOID, ) -> LONG5712     pub fn ChangeDisplaySettingsExA(
5713         lpszDeviceName: LPCSTR,
5714         lpDevMode: *mut DEVMODEA,
5715         hwnd: HWND,
5716         dwFlags: DWORD,
5717         lParam: LPVOID,
5718     ) -> LONG;
ChangeDisplaySettingsExW( lpszDeviceName: LPCWSTR, lpDevMode: *mut DEVMODEW, hwnd: HWND, dwFlags: DWORD, lParam: LPVOID, ) -> LONG5719     pub fn ChangeDisplaySettingsExW(
5720         lpszDeviceName: LPCWSTR,
5721         lpDevMode: *mut DEVMODEW,
5722         hwnd: HWND,
5723         dwFlags: DWORD,
5724         lParam: LPVOID,
5725     ) -> LONG;
EnumDisplaySettingsA( lpszDeviceName: LPCSTR, iModeNum: DWORD, lpDevMode: *mut DEVMODEA, ) -> BOOL5726     pub fn EnumDisplaySettingsA(
5727         lpszDeviceName: LPCSTR,
5728         iModeNum: DWORD,
5729         lpDevMode: *mut DEVMODEA,
5730     ) -> BOOL;
EnumDisplaySettingsW( lpszDeviceName: LPCWSTR, iModeNum: DWORD, lpDevMode: *mut DEVMODEW, ) -> BOOL5731     pub fn EnumDisplaySettingsW(
5732         lpszDeviceName: LPCWSTR,
5733         iModeNum: DWORD,
5734         lpDevMode: *mut DEVMODEW,
5735     ) -> BOOL;
EnumDisplaySettingsExA( lpszDeviceName: LPCSTR, iModeNum: DWORD, lpDevMode: *mut DEVMODEA, dwFlags: DWORD, ) -> BOOL5736     pub fn EnumDisplaySettingsExA(
5737         lpszDeviceName: LPCSTR,
5738         iModeNum: DWORD,
5739         lpDevMode: *mut DEVMODEA,
5740         dwFlags: DWORD,
5741     ) -> BOOL;
EnumDisplaySettingsExW( lpszDeviceName: LPCWSTR, iModeNum: DWORD, lpDevMode: *mut DEVMODEW, dwFlags: DWORD, ) -> BOOL5742     pub fn EnumDisplaySettingsExW(
5743         lpszDeviceName: LPCWSTR,
5744         iModeNum: DWORD,
5745         lpDevMode: *mut DEVMODEW,
5746         dwFlags: DWORD,
5747     ) -> BOOL;
EnumDisplayDevicesA( lpDevice: LPCSTR, iDevNum: DWORD, lpDisplayDevice: PDISPLAY_DEVICEA, dwFlags: DWORD, ) -> BOOL5748     pub fn EnumDisplayDevicesA(
5749         lpDevice: LPCSTR,
5750         iDevNum: DWORD,
5751         lpDisplayDevice: PDISPLAY_DEVICEA,
5752         dwFlags: DWORD,
5753     ) -> BOOL;
EnumDisplayDevicesW( lpDevice: LPCWSTR, iDevNum: DWORD, lpDisplayDevice: PDISPLAY_DEVICEW, dwFlags: DWORD, ) -> BOOL5754     pub fn EnumDisplayDevicesW(
5755         lpDevice: LPCWSTR,
5756         iDevNum: DWORD,
5757         lpDisplayDevice: PDISPLAY_DEVICEW,
5758         dwFlags: DWORD,
5759     ) -> BOOL;
5760 }
5761 pub const EDD_GET_DEVICE_INTERFACE_NAME: DWORD = 0x00000001;
5762 extern "system" {
SystemParametersInfoA( uiAction: UINT, uiParam: UINT, pvParam: PVOID, fWinIni: UINT, ) -> BOOL5763     pub fn SystemParametersInfoA(
5764         uiAction: UINT,
5765         uiParam: UINT,
5766         pvParam: PVOID,
5767         fWinIni: UINT,
5768     ) -> BOOL;
SystemParametersInfoW( uiAction: UINT, uiParam: UINT, pvParam: PVOID, fWinIni: UINT, ) -> BOOL5769     pub fn SystemParametersInfoW(
5770         uiAction: UINT,
5771         uiParam: UINT,
5772         pvParam: PVOID,
5773         fWinIni: UINT,
5774     ) -> BOOL;
5775 }
5776 pub const ENUM_CURRENT_SETTINGS: DWORD = 0xFFFFFFFF;
5777 pub const ENUM_REGISTRY_SETTINGS: DWORD = 0xFFFFFFFE;
5778 pub const MDITILE_VERTICAL: UINT = 0x0000;
5779 pub const MDITILE_HORIZONTAL: UINT = 0x0001;
5780 pub const MDITILE_SKIPDISABLED: UINT = 0x0002;
5781 pub const MDITILE_ZORDER: UINT = 0x0004;
5782 extern "system" {
DefFrameProcA( hwnd: HWND, hwndMDIClient: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT5783     pub fn DefFrameProcA(
5784         hwnd: HWND,
5785         hwndMDIClient: HWND,
5786         uMsg: UINT,
5787         wParam: WPARAM,
5788         lParam: LPARAM,
5789     ) -> LRESULT;
DefFrameProcW( hwnd: HWND, hwndMDIClient: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT5790     pub fn DefFrameProcW(
5791         hwnd: HWND,
5792         hwndMDIClient: HWND,
5793         uMsg: UINT,
5794         wParam: WPARAM,
5795         lParam: LPARAM,
5796     ) -> LRESULT;
DefMDIChildProcA( hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT5797     pub fn DefMDIChildProcA(
5798         hwnd: HWND,
5799         uMsg: UINT,
5800         wParam: WPARAM,
5801         lParam: LPARAM,
5802     ) -> LRESULT;
DefMDIChildProcW( hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT5803     pub fn DefMDIChildProcW(
5804         hwnd: HWND,
5805         uMsg: UINT,
5806         wParam: WPARAM,
5807         lParam: LPARAM,
5808     ) -> LRESULT;
ArrangeIconicWindows( hWnd: HWND, ) -> UINT5809     pub fn ArrangeIconicWindows(
5810         hWnd: HWND,
5811     ) -> UINT;
CreateMDIWindowA( lpClassName: LPCSTR, lpWindowName: LPCSTR, dwStyle: DWORD, X: c_int, Y: c_int, nWidth: c_int, nHeight: c_int, hWndParent: HWND, hInstance: HINSTANCE, lParam: LPARAM, ) -> HWND5812     pub fn CreateMDIWindowA(
5813         lpClassName: LPCSTR,
5814         lpWindowName: LPCSTR,
5815         dwStyle: DWORD,
5816         X: c_int,
5817         Y: c_int,
5818         nWidth: c_int,
5819         nHeight: c_int,
5820         hWndParent: HWND,
5821         hInstance: HINSTANCE,
5822         lParam: LPARAM,
5823     ) -> HWND;
CreateMDIWindowW( lpClassName: LPCWSTR, lpWindowName: LPCWSTR, dwStyle: DWORD, X: c_int, Y: c_int, nWidth: c_int, nHeight: c_int, hWndParent: HWND, hInstance: HINSTANCE, lParam: LPARAM, ) -> HWND5824     pub fn CreateMDIWindowW(
5825         lpClassName: LPCWSTR,
5826         lpWindowName: LPCWSTR,
5827         dwStyle: DWORD,
5828         X: c_int,
5829         Y: c_int,
5830         nWidth: c_int,
5831         nHeight: c_int,
5832         hWndParent: HWND,
5833         hInstance: HINSTANCE,
5834         lParam: LPARAM,
5835     ) -> HWND;
CascadeWindows( hwndParent: HWND, wHow: UINT, lpRect: *const RECT, cKids: UINT, lpKids: *const HWND, ) -> WORD5836     pub fn CascadeWindows(
5837         hwndParent: HWND,
5838         wHow: UINT,
5839         lpRect: *const RECT,
5840         cKids: UINT,
5841         lpKids: *const HWND,
5842     ) -> WORD;
5843 }
5844 FN!{stdcall MSGBOXCALLBACK(
5845     LPHELPINFO,
5846 ) -> ()}
5847 FN!{stdcall WINEVENTPROC(
5848     HWINEVENTHOOK,
5849     DWORD,
5850     HWND,
5851     LONG,
5852     LONG,
5853     DWORD,
5854     DWORD,
5855 ) -> ()}
5856 STRUCT!{struct SCROLLBARINFO {
5857     cbSize: DWORD,
5858     rcScrollBar: RECT,
5859     dxyLineButton: c_int,
5860     xyThumbTop: c_int,
5861     xyThumbBottom: c_int,
5862     reserved: c_int,
5863     rgstate: [DWORD; CCHILDREN_SCROLLBAR + 1],
5864 }}
5865 pub type PSCROLLBARINFO = *mut SCROLLBARINFO;
5866 pub type LPSCROLLBARINFO = *mut SCROLLBARINFO;
5867 STRUCT!{struct SIZE {
5868     cx: LONG,
5869     cy: LONG,
5870 }}
5871 pub type PSIZE = *mut SIZE;
5872 pub type LPSIZE = *mut SIZE;
5873 pub type SIZEL = SIZE;
5874 pub type PSIZEL = *mut SIZEL;
5875 pub type LPSIZEL = *mut SIZEL;
5876 //8855 (Win 7 SDK)
5877 STRUCT!{struct ICONINFO {
5878     fIcon: BOOL,
5879     xHotspot: DWORD,
5880     yHotspot: DWORD,
5881     hbmMask: HBITMAP,
5882     hbmColor: HBITMAP,
5883 }}
5884 pub type PICONINFO = *mut ICONINFO;
5885 //9066
5886 //10069
5887 pub const SC_SIZE: WPARAM = 0xF000;
5888 pub const SC_MOVE: WPARAM = 0xF010;
5889 pub const SC_MINIMIZE: WPARAM = 0xF020;
5890 pub const SC_MAXIMIZE: WPARAM = 0xF030;
5891 pub const SC_NEXTWINDOW: WPARAM = 0xF040;
5892 pub const SC_PREVWINDOW: WPARAM = 0xF050;
5893 pub const SC_CLOSE: WPARAM = 0xF060;
5894 pub const SC_VSCROLL: WPARAM = 0xF070;
5895 pub const SC_HSCROLL: WPARAM = 0xF080;
5896 pub const SC_MOUSEMENU: WPARAM = 0xF090;
5897 pub const SC_KEYMENU: WPARAM = 0xF100;
5898 pub const SC_ARRANGE: WPARAM = 0xF110;
5899 pub const SC_RESTORE: WPARAM = 0xF120;
5900 pub const SC_TASKLIST: WPARAM = 0xF130;
5901 pub const SC_SCREENSAVE: WPARAM = 0xF140;
5902 pub const SC_HOTKEY: WPARAM = 0xF150;
5903 pub const SC_DEFAULT: WPARAM = 0xF160;
5904 pub const SC_MONITORPOWER: WPARAM = 0xF170;
5905 pub const SC_CONTEXTHELP: WPARAM = 0xF180;
5906 pub const SC_SEPARATOR: WPARAM = 0xF00F;
5907 extern "system" {
LoadBitmapA( hInstance: HINSTANCE, lpBitmapName: LPCSTR, ) -> HBITMAP5908     pub fn LoadBitmapA(
5909         hInstance: HINSTANCE,
5910         lpBitmapName: LPCSTR,
5911     ) -> HBITMAP;
LoadBitmapW( hInstance: HINSTANCE, lpBitmapName: LPCWSTR, ) -> HBITMAP5912     pub fn LoadBitmapW(
5913         hInstance: HINSTANCE,
5914         lpBitmapName: LPCWSTR,
5915     ) -> HBITMAP;
LoadCursorA( hInstance: HINSTANCE, lpCursorName: LPCSTR, ) -> HCURSOR5916     pub fn LoadCursorA(
5917         hInstance: HINSTANCE,
5918         lpCursorName: LPCSTR,
5919     ) -> HCURSOR;
LoadCursorW( hInstance: HINSTANCE, lpCursorName: LPCWSTR, ) -> HCURSOR5920     pub fn LoadCursorW(
5921         hInstance: HINSTANCE,
5922         lpCursorName: LPCWSTR,
5923     ) -> HCURSOR;
LoadCursorFromFileA( lpFileName: LPCSTR, ) -> HCURSOR5924     pub fn LoadCursorFromFileA(
5925         lpFileName: LPCSTR,
5926     ) -> HCURSOR;
LoadCursorFromFileW( lpFileName: LPCWSTR, ) -> HCURSOR5927     pub fn LoadCursorFromFileW(
5928         lpFileName: LPCWSTR,
5929     ) -> HCURSOR;
CreateCursor( hInst: HINSTANCE, xHotSpot: c_int, yHotSpot: c_int, nWidth: c_int, nHeight: c_int, pvAndPlane: *const VOID, pvXORPlane: *const VOID, ) -> HCURSOR5930     pub fn CreateCursor(
5931         hInst: HINSTANCE,
5932         xHotSpot: c_int,
5933         yHotSpot: c_int,
5934         nWidth: c_int,
5935         nHeight: c_int,
5936         pvAndPlane: *const VOID,
5937         pvXORPlane: *const VOID,
5938     ) -> HCURSOR;
DestroyCursor( hCursor: HCURSOR, ) -> BOOL5939     pub fn DestroyCursor(
5940         hCursor: HCURSOR,
5941     ) -> BOOL;
5942 }
5943 pub const IDC_ARROW: LPCWSTR = 32512 as LPCWSTR;
5944 pub const IDC_IBEAM: LPCWSTR = 32513 as LPCWSTR;
5945 pub const IDC_WAIT: LPCWSTR = 32514 as LPCWSTR;
5946 pub const IDC_CROSS: LPCWSTR = 32515 as LPCWSTR;
5947 pub const IDC_UPARROW: LPCWSTR = 32516 as LPCWSTR;
5948 pub const IDC_SIZE: LPCWSTR = 32640 as LPCWSTR;
5949 pub const IDC_ICON: LPCWSTR = 32641 as LPCWSTR;
5950 pub const IDC_SIZENWSE: LPCWSTR = 32642 as LPCWSTR;
5951 pub const IDC_SIZENESW: LPCWSTR = 32643 as LPCWSTR;
5952 pub const IDC_SIZEWE: LPCWSTR = 32644 as LPCWSTR;
5953 pub const IDC_SIZENS: LPCWSTR = 32645 as LPCWSTR;
5954 pub const IDC_SIZEALL: LPCWSTR = 32646 as LPCWSTR;
5955 pub const IDC_NO: LPCWSTR = 32648 as LPCWSTR;
5956 pub const IDC_HAND: LPCWSTR = 32649 as LPCWSTR;
5957 pub const IDC_APPSTARTING: LPCWSTR = 32650 as LPCWSTR;
5958 pub const IDC_HELP: LPCWSTR = 32651 as LPCWSTR;
5959 extern "system" {
SetSystemCursor( hcur: HCURSOR, id: DWORD, ) -> BOOL5960     pub fn SetSystemCursor(
5961         hcur: HCURSOR,
5962         id: DWORD,
5963     ) -> BOOL;
CreateIcon( hInstance: HINSTANCE, nWidth: c_int, nHeight: c_int, cPlanes: BYTE, cBitsPixel: BYTE, lpbANDbits: *const BYTE, lpbXORbits: *const BYTE, ) -> HICON5964     pub fn CreateIcon(
5965         hInstance: HINSTANCE,
5966         nWidth: c_int,
5967         nHeight: c_int,
5968         cPlanes: BYTE,
5969         cBitsPixel: BYTE,
5970         lpbANDbits: *const BYTE,
5971         lpbXORbits: *const BYTE,
5972     ) -> HICON;
DestroyIcon( hIcon: HICON, ) -> BOOL5973     pub fn DestroyIcon(
5974         hIcon: HICON,
5975     ) -> BOOL;
LookupIconIdFromDirectory( presbits: PBYTE, fIcon: BOOL, ) -> c_int5976     pub fn LookupIconIdFromDirectory(
5977         presbits: PBYTE,
5978         fIcon: BOOL,
5979     ) -> c_int;
LookupIconIdFromDirectoryEx( presbits: PBYTE, fIcon: BOOL, cxDesired: c_int, cyDesired: c_int, Flags: UINT, ) -> c_int5980     pub fn LookupIconIdFromDirectoryEx(
5981         presbits: PBYTE,
5982         fIcon: BOOL,
5983         cxDesired: c_int,
5984         cyDesired: c_int,
5985         Flags: UINT,
5986     ) -> c_int;
CreateIconFromResource( presbits: PBYTE, dwResSize: DWORD, fIcon: BOOL, dwVer: DWORD, ) -> HICON5987     pub fn CreateIconFromResource(
5988         presbits: PBYTE,
5989         dwResSize: DWORD,
5990         fIcon: BOOL,
5991         dwVer: DWORD,
5992     ) -> HICON;
CreateIconFromResourceEx( presbits: PBYTE, dwResSize: DWORD, fIcon: BOOL, dwVer: DWORD, cxDesired: c_int, cyDesired: c_int, Flags: UINT, ) -> HICON5993     pub fn CreateIconFromResourceEx(
5994         presbits: PBYTE,
5995         dwResSize: DWORD,
5996         fIcon: BOOL,
5997         dwVer: DWORD,
5998         cxDesired: c_int,
5999         cyDesired: c_int,
6000         Flags: UINT,
6001     ) -> HICON;
6002 }
6003 pub const IMAGE_BITMAP: UINT = 0;
6004 pub const IMAGE_ICON: UINT = 1;
6005 pub const IMAGE_CURSOR: UINT = 2;
6006 pub const IMAGE_ENHMETAFILE: UINT = 3;
6007 pub const LR_DEFAULTCOLOR: UINT = 0x00000000;
6008 pub const LR_MONOCHROME: UINT = 0x00000001;
6009 pub const LR_COLOR: UINT = 0x00000002;
6010 pub const LR_COPYRETURNORG: UINT = 0x00000004;
6011 pub const LR_COPYDELETEORG: UINT = 0x00000008;
6012 pub const LR_LOADFROMFILE: UINT = 0x00000010;
6013 pub const LR_LOADTRANSPARENT: UINT = 0x00000020;
6014 pub const LR_DEFAULTSIZE: UINT = 0x00000040;
6015 pub const LR_VGACOLOR: UINT = 0x00000080;
6016 pub const LR_LOADMAP3DCOLORS: UINT = 0x00001000;
6017 pub const LR_CREATEDIBSECTION: UINT = 0x00002000;
6018 pub const LR_COPYFROMRESOURCE: UINT = 0x00004000;
6019 pub const LR_SHARED: UINT = 0x00008000;
6020 extern "system" {
LoadImageA( hInst: HINSTANCE, name: LPCSTR, type_: UINT, cx: c_int, cy: c_int, fuLoad: UINT, ) -> HANDLE6021     pub fn LoadImageA(
6022         hInst: HINSTANCE,
6023         name: LPCSTR,
6024         type_: UINT,
6025         cx: c_int,
6026         cy: c_int,
6027         fuLoad: UINT,
6028     ) -> HANDLE;
LoadImageW( hInst: HINSTANCE, name: LPCWSTR, type_: UINT, cx: c_int, cy: c_int, fuLoad: UINT, ) -> HANDLE6029     pub fn LoadImageW(
6030         hInst: HINSTANCE,
6031         name: LPCWSTR,
6032         type_: UINT,
6033         cx: c_int,
6034         cy: c_int,
6035         fuLoad: UINT,
6036     ) -> HANDLE;
CopyImage( h: HANDLE, type_: UINT, cx: c_int, cy: c_int, flags: UINT, ) -> HANDLE6037     pub fn CopyImage(
6038         h: HANDLE,
6039         type_: UINT,
6040         cx: c_int,
6041         cy: c_int,
6042         flags: UINT,
6043     ) -> HANDLE;
DrawIconEx( hdc: HDC, xLeft: c_int, yTop: c_int, hIcon: HICON, cxWidth: c_int, cyWidth: c_int, istepIfAniCur: UINT, hbrFlickerFreeDraw: HBRUSH, diFlags: UINT, ) -> BOOL6044     pub fn DrawIconEx(
6045         hdc: HDC,
6046         xLeft: c_int,
6047         yTop: c_int,
6048         hIcon: HICON,
6049         cxWidth: c_int,
6050         cyWidth: c_int,
6051         istepIfAniCur: UINT,
6052         hbrFlickerFreeDraw: HBRUSH,
6053         diFlags: UINT,
6054     ) -> BOOL;
CreateIconIndirect( piconinfo: PICONINFO, ) -> HICON6055     pub fn CreateIconIndirect(
6056         piconinfo: PICONINFO,
6057     ) -> HICON;
6058 }
6059 pub const IDI_APPLICATION: LPCWSTR = 32512 as LPCWSTR;
6060 pub const IDI_HAND: LPCWSTR = 32513 as LPCWSTR;
6061 pub const IDI_QUESTION: LPCWSTR = 32514 as LPCWSTR;
6062 pub const IDI_EXCLAMATION: LPCWSTR = 32515 as LPCWSTR;
6063 pub const IDI_ASTERISK: LPCWSTR = 32516 as LPCWSTR;
6064 pub const IDI_WINLOGO: LPCWSTR = 32517 as LPCWSTR;
6065 pub const IDI_SHIELD: LPCWSTR = 32518 as LPCWSTR;
6066 pub const IDI_WARNING: LPCWSTR = IDI_EXCLAMATION;
6067 pub const IDI_ERROR: LPCWSTR = IDI_HAND;
6068 pub const IDI_INFORMATION: LPCWSTR = IDI_ASTERISK;
6069 extern "system" {
WinHelpA( hWndMain: HWND, lpszHelp: LPCSTR, uCommand: UINT, dwData: ULONG_PTR, ) -> BOOL6070     pub fn WinHelpA(
6071         hWndMain: HWND,
6072         lpszHelp: LPCSTR,
6073         uCommand: UINT,
6074         dwData: ULONG_PTR,
6075     ) -> BOOL;
WinHelpW( hWndMain: HWND, lpszHelp: LPCWSTR, uCommand: UINT, dwData: ULONG_PTR, ) -> BOOL6076     pub fn WinHelpW(
6077         hWndMain: HWND,
6078         lpszHelp: LPCWSTR,
6079         uCommand: UINT,
6080         dwData: ULONG_PTR,
6081     ) -> BOOL;
CopyIcon( hIcon: HICON, ) -> HICON6082     pub fn CopyIcon(
6083         hIcon: HICON,
6084     ) -> HICON;
GetIconInfo( hIcon: HICON, piconinfo: PICONINFO, ) -> BOOL6085     pub fn GetIconInfo(
6086         hIcon: HICON,
6087         piconinfo: PICONINFO,
6088     ) -> BOOL;
6089 }
6090 pub const SPI_GETBEEP: UINT = 0x0001;
6091 pub const SPI_SETBEEP: UINT = 0x0002;
6092 pub const SPI_GETMOUSE: UINT = 0x0003;
6093 pub const SPI_SETMOUSE: UINT = 0x0004;
6094 pub const SPI_GETBORDER: UINT = 0x0005;
6095 pub const SPI_SETBORDER: UINT = 0x0006;
6096 pub const SPI_GETKEYBOARDSPEED: UINT = 0x000A;
6097 pub const SPI_SETKEYBOARDSPEED: UINT = 0x000B;
6098 pub const SPI_LANGDRIVER: UINT = 0x000C;
6099 pub const SPI_ICONHORIZONTALSPACING: UINT = 0x000D;
6100 pub const SPI_GETSCREENSAVETIMEOUT: UINT = 0x000E;
6101 pub const SPI_SETSCREENSAVETIMEOUT: UINT = 0x000F;
6102 pub const SPI_GETSCREENSAVEACTIVE: UINT = 0x0010;
6103 pub const SPI_SETSCREENSAVEACTIVE: UINT = 0x0011;
6104 pub const SPI_GETGRIDGRANULARITY: UINT = 0x0012;
6105 pub const SPI_SETGRIDGRANULARITY: UINT = 0x0013;
6106 pub const SPI_SETDESKWALLPAPER: UINT = 0x0014;
6107 pub const SPI_SETDESKPATTERN: UINT = 0x0015;
6108 pub const SPI_GETKEYBOARDDELAY: UINT = 0x0016;
6109 pub const SPI_SETKEYBOARDDELAY: UINT = 0x0017;
6110 pub const SPI_ICONVERTICALSPACING: UINT = 0x0018;
6111 pub const SPI_GETICONTITLEWRAP: UINT = 0x0019;
6112 pub const SPI_SETICONTITLEWRAP: UINT = 0x001A;
6113 pub const SPI_GETMENUDROPALIGNMENT: UINT = 0x001B;
6114 pub const SPI_SETMENUDROPALIGNMENT: UINT = 0x001C;
6115 pub const SPI_SETDOUBLECLKWIDTH: UINT = 0x001D;
6116 pub const SPI_SETDOUBLECLKHEIGHT: UINT = 0x001E;
6117 pub const SPI_GETICONTITLELOGFONT: UINT = 0x001F;
6118 pub const SPI_SETDOUBLECLICKTIME: UINT = 0x0020;
6119 pub const SPI_SETMOUSEBUTTONSWAP: UINT = 0x0021;
6120 pub const SPI_SETICONTITLELOGFONT: UINT = 0x0022;
6121 pub const SPI_GETFASTTASKSWITCH: UINT = 0x0023;
6122 pub const SPI_SETFASTTASKSWITCH: UINT = 0x0024;
6123 pub const SPI_SETDRAGFULLWINDOWS: UINT = 0x0025;
6124 pub const SPI_GETDRAGFULLWINDOWS: UINT = 0x0026;
6125 pub const SPI_GETNONCLIENTMETRICS: UINT = 0x0029;
6126 pub const SPI_SETNONCLIENTMETRICS: UINT = 0x002A;
6127 pub const SPI_GETMINIMIZEDMETRICS: UINT = 0x002B;
6128 pub const SPI_SETMINIMIZEDMETRICS: UINT = 0x002C;
6129 pub const SPI_GETICONMETRICS: UINT = 0x002D;
6130 pub const SPI_SETICONMETRICS: UINT = 0x002E;
6131 pub const SPI_SETWORKAREA: UINT = 0x002F;
6132 pub const SPI_GETWORKAREA: UINT = 0x0030;
6133 pub const SPI_SETPENWINDOWS: UINT = 0x0031;
6134 pub const SPI_GETHIGHCONTRAST: UINT = 0x0042;
6135 pub const SPI_SETHIGHCONTRAST: UINT = 0x0043;
6136 pub const SPI_GETKEYBOARDPREF: UINT = 0x0044;
6137 pub const SPI_SETKEYBOARDPREF: UINT = 0x0045;
6138 pub const SPI_GETSCREENREADER: UINT = 0x0046;
6139 pub const SPI_SETSCREENREADER: UINT = 0x0047;
6140 pub const SPI_GETANIMATION: UINT = 0x0048;
6141 pub const SPI_SETANIMATION: UINT = 0x0049;
6142 pub const SPI_GETFONTSMOOTHING: UINT = 0x004A;
6143 pub const SPI_SETFONTSMOOTHING: UINT = 0x004B;
6144 pub const SPI_SETDRAGWIDTH: UINT = 0x004C;
6145 pub const SPI_SETDRAGHEIGHT: UINT = 0x004D;
6146 pub const SPI_SETHANDHELD: UINT = 0x004E;
6147 pub const SPI_GETLOWPOWERTIMEOUT: UINT = 0x004F;
6148 pub const SPI_GETPOWEROFFTIMEOUT: UINT = 0x0050;
6149 pub const SPI_SETLOWPOWERTIMEOUT: UINT = 0x0051;
6150 pub const SPI_SETPOWEROFFTIMEOUT: UINT = 0x0052;
6151 pub const SPI_GETLOWPOWERACTIVE: UINT = 0x0053;
6152 pub const SPI_GETPOWEROFFACTIVE: UINT = 0x0054;
6153 pub const SPI_SETLOWPOWERACTIVE: UINT = 0x0055;
6154 pub const SPI_SETPOWEROFFACTIVE: UINT = 0x0056;
6155 pub const SPI_SETCURSORS: UINT = 0x0057;
6156 pub const SPI_SETICONS: UINT = 0x0058;
6157 pub const SPI_GETDEFAULTINPUTLANG: UINT = 0x0059;
6158 pub const SPI_SETDEFAULTINPUTLANG: UINT = 0x005A;
6159 pub const SPI_SETLANGTOGGLE: UINT = 0x005B;
6160 pub const SPI_GETWINDOWSEXTENSION: UINT = 0x005C;
6161 pub const SPI_SETMOUSETRAILS: UINT = 0x005D;
6162 pub const SPI_GETMOUSETRAILS: UINT = 0x005E;
6163 pub const SPI_SETSCREENSAVERRUNNING: UINT = 0x0061;
6164 pub const SPI_SCREENSAVERRUNNING: UINT = SPI_SETSCREENSAVERRUNNING;
6165 pub const SPI_GETFILTERKEYS: UINT = 0x0032;
6166 pub const SPI_SETFILTERKEYS: UINT = 0x0033;
6167 pub const SPI_GETTOGGLEKEYS: UINT = 0x0034;
6168 pub const SPI_SETTOGGLEKEYS: UINT = 0x0035;
6169 pub const SPI_GETMOUSEKEYS: UINT = 0x0036;
6170 pub const SPI_SETMOUSEKEYS: UINT = 0x0037;
6171 pub const SPI_GETSHOWSOUNDS: UINT = 0x0038;
6172 pub const SPI_SETSHOWSOUNDS: UINT = 0x0039;
6173 pub const SPI_GETSTICKYKEYS: UINT = 0x003A;
6174 pub const SPI_SETSTICKYKEYS: UINT = 0x003B;
6175 pub const SPI_GETACCESSTIMEOUT: UINT = 0x003C;
6176 pub const SPI_SETACCESSTIMEOUT: UINT = 0x003D;
6177 pub const SPI_GETSERIALKEYS: UINT = 0x003E;
6178 pub const SPI_SETSERIALKEYS: UINT = 0x003F;
6179 pub const SPI_GETSOUNDSENTRY: UINT = 0x0040;
6180 pub const SPI_SETSOUNDSENTRY: UINT = 0x0041;
6181 pub const SPI_GETSNAPTODEFBUTTON: UINT = 0x005F;
6182 pub const SPI_SETSNAPTODEFBUTTON: UINT = 0x0060;
6183 pub const SPI_GETMOUSEHOVERWIDTH: UINT = 0x0062;
6184 pub const SPI_SETMOUSEHOVERWIDTH: UINT = 0x0063;
6185 pub const SPI_GETMOUSEHOVERHEIGHT: UINT = 0x0064;
6186 pub const SPI_SETMOUSEHOVERHEIGHT: UINT = 0x0065;
6187 pub const SPI_GETMOUSEHOVERTIME: UINT = 0x0066;
6188 pub const SPI_SETMOUSEHOVERTIME: UINT = 0x0067;
6189 pub const SPI_GETWHEELSCROLLLINES: UINT = 0x0068;
6190 pub const SPI_SETWHEELSCROLLLINES: UINT = 0x0069;
6191 pub const SPI_GETMENUSHOWDELAY: UINT = 0x006A;
6192 pub const SPI_SETMENUSHOWDELAY: UINT = 0x006B;
6193 pub const SPI_GETWHEELSCROLLCHARS: UINT = 0x006C;
6194 pub const SPI_SETWHEELSCROLLCHARS: UINT = 0x006D;
6195 pub const SPI_GETSHOWIMEUI: UINT = 0x006E;
6196 pub const SPI_SETSHOWIMEUI: UINT = 0x006F;
6197 pub const SPI_GETMOUSESPEED: UINT = 0x0070;
6198 pub const SPI_SETMOUSESPEED: UINT = 0x0071;
6199 pub const SPI_GETSCREENSAVERRUNNING: UINT = 0x0072;
6200 pub const SPI_GETDESKWALLPAPER: UINT = 0x0073;
6201 pub const SPI_GETAUDIODESCRIPTION: UINT = 0x0074;
6202 pub const SPI_SETAUDIODESCRIPTION: UINT = 0x0075;
6203 pub const SPI_GETSCREENSAVESECURE: UINT = 0x0076;
6204 pub const SPI_SETSCREENSAVESECURE: UINT = 0x0077;
6205 pub const SPI_GETHUNGAPPTIMEOUT: UINT = 0x0078;
6206 pub const SPI_SETHUNGAPPTIMEOUT: UINT = 0x0079;
6207 pub const SPI_GETWAITTOKILLTIMEOUT: UINT = 0x007A;
6208 pub const SPI_SETWAITTOKILLTIMEOUT: UINT = 0x007B;
6209 pub const SPI_GETWAITTOKILLSERVICETIMEOUT: UINT = 0x007C;
6210 pub const SPI_SETWAITTOKILLSERVICETIMEOUT: UINT = 0x007D;
6211 pub const SPI_GETMOUSEDOCKTHRESHOLD: UINT = 0x007E;
6212 pub const SPI_SETMOUSEDOCKTHRESHOLD: UINT = 0x007F;
6213 pub const SPI_GETPENDOCKTHRESHOLD: UINT = 0x0080;
6214 pub const SPI_SETPENDOCKTHRESHOLD: UINT = 0x0081;
6215 pub const SPI_GETWINARRANGING: UINT = 0x0082;
6216 pub const SPI_SETWINARRANGING: UINT = 0x0083;
6217 pub const SPI_GETMOUSEDRAGOUTTHRESHOLD: UINT = 0x0084;
6218 pub const SPI_SETMOUSEDRAGOUTTHRESHOLD: UINT = 0x0085;
6219 pub const SPI_GETPENDRAGOUTTHRESHOLD: UINT = 0x0086;
6220 pub const SPI_SETPENDRAGOUTTHRESHOLD: UINT = 0x0087;
6221 pub const SPI_GETMOUSESIDEMOVETHRESHOLD: UINT = 0x0088;
6222 pub const SPI_SETMOUSESIDEMOVETHRESHOLD: UINT = 0x0089;
6223 pub const SPI_GETPENSIDEMOVETHRESHOLD: UINT = 0x008A;
6224 pub const SPI_SETPENSIDEMOVETHRESHOLD: UINT = 0x008B;
6225 pub const SPI_GETDRAGFROMMAXIMIZE: UINT = 0x008C;
6226 pub const SPI_SETDRAGFROMMAXIMIZE: UINT = 0x008D;
6227 pub const SPI_GETSNAPSIZING: UINT = 0x008E;
6228 pub const SPI_SETSNAPSIZING: UINT = 0x008F;
6229 pub const SPI_GETDOCKMOVING: UINT = 0x0090;
6230 pub const SPI_SETDOCKMOVING: UINT = 0x0091;
6231 pub const SPI_GETACTIVEWINDOWTRACKING: UINT = 0x1000;
6232 pub const SPI_SETACTIVEWINDOWTRACKING: UINT = 0x1001;
6233 pub const SPI_GETMENUANIMATION: UINT = 0x1002;
6234 pub const SPI_SETMENUANIMATION: UINT = 0x1003;
6235 pub const SPI_GETCOMBOBOXANIMATION: UINT = 0x1004;
6236 pub const SPI_SETCOMBOBOXANIMATION: UINT = 0x1005;
6237 pub const SPI_GETLISTBOXSMOOTHSCROLLING: UINT = 0x1006;
6238 pub const SPI_SETLISTBOXSMOOTHSCROLLING: UINT = 0x1007;
6239 pub const SPI_GETGRADIENTCAPTIONS: UINT = 0x1008;
6240 pub const SPI_SETGRADIENTCAPTIONS: UINT = 0x1009;
6241 pub const SPI_GETKEYBOARDCUES: UINT = 0x100A;
6242 pub const SPI_SETKEYBOARDCUES: UINT = 0x100B;
6243 pub const SPI_GETMENUUNDERLINES: UINT = SPI_GETKEYBOARDCUES;
6244 pub const SPI_SETMENUUNDERLINES: UINT = SPI_SETKEYBOARDCUES;
6245 pub const SPI_GETACTIVEWNDTRKZORDER: UINT = 0x100C;
6246 pub const SPI_SETACTIVEWNDTRKZORDER: UINT = 0x100D;
6247 pub const SPI_GETHOTTRACKING: UINT = 0x100E;
6248 pub const SPI_SETHOTTRACKING: UINT = 0x100F;
6249 pub const SPI_GETMENUFADE: UINT = 0x1012;
6250 pub const SPI_SETMENUFADE: UINT = 0x1013;
6251 pub const SPI_GETSELECTIONFADE: UINT = 0x1014;
6252 pub const SPI_SETSELECTIONFADE: UINT = 0x1015;
6253 pub const SPI_GETTOOLTIPANIMATION: UINT = 0x1016;
6254 pub const SPI_SETTOOLTIPANIMATION: UINT = 0x1017;
6255 pub const SPI_GETTOOLTIPFADE: UINT = 0x1018;
6256 pub const SPI_SETTOOLTIPFADE: UINT = 0x1019;
6257 pub const SPI_GETCURSORSHADOW: UINT = 0x101A;
6258 pub const SPI_SETCURSORSHADOW: UINT = 0x101B;
6259 pub const SPI_GETMOUSESONAR: UINT = 0x101C;
6260 pub const SPI_SETMOUSESONAR: UINT = 0x101D;
6261 pub const SPI_GETMOUSECLICKLOCK: UINT = 0x101E;
6262 pub const SPI_SETMOUSECLICKLOCK: UINT = 0x101F;
6263 pub const SPI_GETMOUSEVANISH: UINT = 0x1020;
6264 pub const SPI_SETMOUSEVANISH: UINT = 0x1021;
6265 pub const SPI_GETFLATMENU: UINT = 0x1022;
6266 pub const SPI_SETFLATMENU: UINT = 0x1023;
6267 pub const SPI_GETDROPSHADOW: UINT = 0x1024;
6268 pub const SPI_SETDROPSHADOW: UINT = 0x1025;
6269 pub const SPI_GETBLOCKSENDINPUTRESETS: UINT = 0x1026;
6270 pub const SPI_SETBLOCKSENDINPUTRESETS: UINT = 0x1027;
6271 pub const SPI_GETUIEFFECTS: UINT = 0x103E;
6272 pub const SPI_SETUIEFFECTS: UINT = 0x103F;
6273 pub const SPI_GETDISABLEOVERLAPPEDCONTENT: UINT = 0x1040;
6274 pub const SPI_SETDISABLEOVERLAPPEDCONTENT: UINT = 0x1041;
6275 pub const SPI_GETCLIENTAREAANIMATION: UINT = 0x1042;
6276 pub const SPI_SETCLIENTAREAANIMATION: UINT = 0x1043;
6277 pub const SPI_GETCLEARTYPE: UINT = 0x1048;
6278 pub const SPI_SETCLEARTYPE: UINT = 0x1049;
6279 pub const SPI_GETSPEECHRECOGNITION: UINT = 0x104A;
6280 pub const SPI_SETSPEECHRECOGNITION: UINT = 0x104B;
6281 pub const SPI_GETFOREGROUNDLOCKTIMEOUT: UINT = 0x2000;
6282 pub const SPI_SETFOREGROUNDLOCKTIMEOUT: UINT = 0x2001;
6283 pub const SPI_GETACTIVEWNDTRKTIMEOUT: UINT = 0x2002;
6284 pub const SPI_SETACTIVEWNDTRKTIMEOUT: UINT = 0x2003;
6285 pub const SPI_GETFOREGROUNDFLASHCOUNT: UINT = 0x2004;
6286 pub const SPI_SETFOREGROUNDFLASHCOUNT: UINT = 0x2005;
6287 pub const SPI_GETCARETWIDTH: UINT = 0x2006;
6288 pub const SPI_SETCARETWIDTH: UINT = 0x2007;
6289 pub const SPI_GETMOUSECLICKLOCKTIME: UINT = 0x2008;
6290 pub const SPI_SETMOUSECLICKLOCKTIME: UINT = 0x2009;
6291 pub const SPI_GETFONTSMOOTHINGTYPE: UINT = 0x200A;
6292 pub const SPI_SETFONTSMOOTHINGTYPE: UINT = 0x200B;
6293 pub const FE_FONTSMOOTHINGSTANDARD: UINT = 0x0001;
6294 pub const FE_FONTSMOOTHINGCLEARTYPE: UINT = 0x0002;
6295 pub const SPI_GETFONTSMOOTHINGCONTRAST: UINT = 0x200C;
6296 pub const SPI_SETFONTSMOOTHINGCONTRAST: UINT = 0x200D;
6297 pub const SPI_GETFOCUSBORDERWIDTH: UINT = 0x200E;
6298 pub const SPI_SETFOCUSBORDERWIDTH: UINT = 0x200F;
6299 pub const SPI_GETFOCUSBORDERHEIGHT: UINT = 0x2010;
6300 pub const SPI_SETFOCUSBORDERHEIGHT: UINT = 0x2011;
6301 pub const SPI_GETFONTSMOOTHINGORIENTATION: UINT = 0x2012;
6302 pub const SPI_SETFONTSMOOTHINGORIENTATION: UINT = 0x2013;
6303 pub const FE_FONTSMOOTHINGORIENTATIONBGR: UINT = 0x0000;
6304 pub const FE_FONTSMOOTHINGORIENTATIONRGB: UINT = 0x0001;
6305 pub const SPI_GETMINIMUMHITRADIUS: UINT = 0x2014;
6306 pub const SPI_SETMINIMUMHITRADIUS: UINT = 0x2015;
6307 pub const SPI_GETMESSAGEDURATION: UINT = 0x2016;
6308 pub const SPI_SETMESSAGEDURATION: UINT = 0x2017;
6309 //11264
6310 pub const CB_GETEDITSEL: UINT = 0x0140;
6311 pub const CB_LIMITTEXT: UINT = 0x0141;
6312 pub const CB_SETEDITSEL: UINT = 0x0142;
6313 pub const CB_ADDSTRING: UINT = 0x0143;
6314 pub const CB_DELETESTRING: UINT = 0x0144;
6315 pub const CB_DIR: UINT = 0x0145;
6316 pub const CB_GETCOUNT: UINT = 0x0146;
6317 pub const CB_GETCURSEL: UINT = 0x0147;
6318 pub const CB_GETLBTEXT: UINT = 0x0148;
6319 pub const CB_GETLBTEXTLEN: UINT = 0x0149;
6320 pub const CB_INSERTSTRING: UINT = 0x014A;
6321 pub const CB_RESETCONTENT: UINT = 0x014B;
6322 pub const CB_FINDSTRING: UINT = 0x014C;
6323 pub const CB_SELECTSTRING: UINT = 0x014D;
6324 pub const CB_SETCURSEL: UINT = 0x014E;
6325 pub const CB_SHOWDROPDOWN: UINT = 0x014F;
6326 pub const CB_GETITEMDATA: UINT = 0x0150;
6327 pub const CB_SETITEMDATA: UINT = 0x0151;
6328 pub const CB_GETDROPPEDCONTROLRECT: UINT = 0x0152;
6329 pub const CB_SETITEMHEIGHT: UINT = 0x0153;
6330 pub const CB_GETITEMHEIGHT: UINT = 0x0154;
6331 pub const CB_SETEXTENDEDUI: UINT = 0x0155;
6332 pub const CB_GETEXTENDEDUI: UINT = 0x0156;
6333 pub const CB_GETDROPPEDSTATE: UINT = 0x0157;
6334 pub const CB_FINDSTRINGEXACT: UINT = 0x0158;
6335 pub const CB_SETLOCALE: UINT = 0x0159;
6336 pub const CB_GETLOCALE: UINT = 0x015A;
6337 pub const CB_GETTOPINDEX: UINT = 0x015b;
6338 pub const CB_SETTOPINDEX: UINT = 0x015c;
6339 pub const CB_GETHORIZONTALEXTENT: UINT = 0x015d;
6340 pub const CB_SETHORIZONTALEXTENT: UINT = 0x015e;
6341 pub const CB_GETDROPPEDWIDTH: UINT = 0x015f;
6342 pub const CB_SETDROPPEDWIDTH: UINT = 0x0160;
6343 pub const CB_INITSTORAGE: UINT = 0x0161;
6344 //12141
6345 STRUCT!{struct NONCLIENTMETRICSA {
6346     cbSize: UINT,
6347     iBorderWidth: c_int,
6348     iScrollWidth: c_int,
6349     iScrollHeight: c_int,
6350     iCaptionWidth: c_int,
6351     iCaptionHeight: c_int,
6352     lfCaptionFont: LOGFONTA,
6353     iSmCaptionWidth: c_int,
6354     iSmCaptionHeight: c_int,
6355     lfSmCaptionFont: LOGFONTA,
6356     iMenuWidth: c_int,
6357     iMenuHeight: c_int,
6358     lfMenuFont: LOGFONTA,
6359     lfStatusFont: LOGFONTA,
6360     lfMessageFont: LOGFONTA,
6361     iPaddedBorderWidth: c_int,
6362 }}
6363 pub type LPNONCLIENTMETRICSA = *mut NONCLIENTMETRICSA;
6364 STRUCT!{struct NONCLIENTMETRICSW {
6365     cbSize: UINT,
6366     iBorderWidth: c_int,
6367     iScrollWidth: c_int,
6368     iScrollHeight: c_int,
6369     iCaptionWidth: c_int,
6370     iCaptionHeight: c_int,
6371     lfCaptionFont: LOGFONTW,
6372     iSmCaptionWidth: c_int,
6373     iSmCaptionHeight: c_int,
6374     lfSmCaptionFont: LOGFONTW,
6375     iMenuWidth: c_int,
6376     iMenuHeight: c_int,
6377     lfMenuFont: LOGFONTW,
6378     lfStatusFont: LOGFONTW,
6379     lfMessageFont: LOGFONTW,
6380     iPaddedBorderWidth: c_int,
6381 }}
6382 pub type LPNONCLIENTMETRICSW = *mut NONCLIENTMETRICSW;
6383 //12869
6384 extern "system" {
SetLastErrorEx( dwErrCode: DWORD, dwType: DWORD, )6385     pub fn SetLastErrorEx(
6386         dwErrCode: DWORD,
6387         dwType: DWORD,
6388     );
InternalGetWindowText( hWnd: HWND, pString: LPWSTR, cchMaxCount: c_int, ) -> c_int6389     pub fn InternalGetWindowText(
6390         hWnd: HWND,
6391         pString: LPWSTR,
6392         cchMaxCount: c_int,
6393     ) -> c_int;
EndTask( hWnd: HWND, fShutDown: BOOL, fForce: BOOL, ) -> BOOL6394     pub fn EndTask(
6395         hWnd: HWND,
6396         fShutDown: BOOL,
6397         fForce: BOOL,
6398     ) -> BOOL;
CancelShutdown() -> BOOL6399     pub fn CancelShutdown() -> BOOL;
6400 }
6401 pub const MONITOR_DEFAULTTONULL: DWORD = 0x00000000;
6402 pub const MONITOR_DEFAULTTOPRIMARY: DWORD = 0x00000001;
6403 pub const MONITOR_DEFAULTTONEAREST: DWORD = 0x00000002;
6404 //12900
6405 extern "system" {
MonitorFromPoint( pt: POINT, dwFlags: DWORD, ) -> HMONITOR6406     pub fn MonitorFromPoint(
6407         pt: POINT,
6408         dwFlags: DWORD,
6409     ) -> HMONITOR;
MonitorFromRect( lprc: LPCRECT, dwFlags: DWORD, ) -> HMONITOR6410     pub fn MonitorFromRect(
6411         lprc: LPCRECT,
6412         dwFlags: DWORD,
6413     ) -> HMONITOR;
MonitorFromWindow( hwnd: HWND, dwFlags: DWORD, ) -> HMONITOR6414     pub fn MonitorFromWindow(
6415         hwnd: HWND,
6416         dwFlags: DWORD,
6417     ) -> HMONITOR;
6418 }
6419 pub const MONITORINFOF_PRIMARY: DWORD = 1;
6420 pub const CCHDEVICENAME: usize = 32;
6421 STRUCT!{struct MONITORINFO {
6422     cbSize: DWORD,
6423     rcMonitor: RECT,
6424     rcWork: RECT,
6425     dwFlags: DWORD,
6426 }}
6427 pub type LPMONITORINFO = *mut MONITORINFO;
6428 STRUCT!{struct MONITORINFOEXA {
6429     cbSize: DWORD,
6430     rcMonitor: RECT,
6431     rcWork: RECT,
6432     dwFlags: DWORD,
6433     szDevice: [CHAR; CCHDEVICENAME],
6434 }}
6435 pub type LPMONITORINFOEXA = *mut MONITORINFOEXA;
6436 STRUCT!{struct MONITORINFOEXW {
6437     cbSize: DWORD,
6438     rcMonitor: RECT,
6439     rcWork: RECT,
6440     dwFlags: DWORD,
6441     szDevice: [WCHAR; CCHDEVICENAME],
6442 }}
6443 pub type LPMONITORINFOEXW = *mut MONITORINFOEXW;
6444 //12971
6445 extern "system" {
GetMonitorInfoA( hMonitor: HMONITOR, lpmi: LPMONITORINFO, ) -> BOOL6446     pub fn GetMonitorInfoA(
6447         hMonitor: HMONITOR,
6448         lpmi: LPMONITORINFO,
6449     ) -> BOOL;
GetMonitorInfoW( hMonitor: HMONITOR, lpmi: LPMONITORINFO, ) -> BOOL6450     pub fn GetMonitorInfoW(
6451         hMonitor: HMONITOR,
6452         lpmi: LPMONITORINFO,
6453     ) -> BOOL;
6454 }
6455 FN!{stdcall MONITORENUMPROC(
6456     HMONITOR,
6457     HDC,
6458     LPRECT,
6459     LPARAM,
6460 ) -> BOOL}
6461 extern "system" {
EnumDisplayMonitors( hdc: HDC, lprcClip: LPCRECT, lpfnEnum: MONITORENUMPROC, dwData: LPARAM, ) -> BOOL6462     pub fn EnumDisplayMonitors(
6463         hdc: HDC,
6464         lprcClip: LPCRECT,
6465         lpfnEnum: MONITORENUMPROC,
6466         dwData: LPARAM,
6467     ) -> BOOL;
NotifyWinEvent( event: DWORD, hwnd: HWND, idObject: LONG, idChild: LONG, )6468     pub fn NotifyWinEvent(
6469         event: DWORD,
6470         hwnd: HWND,
6471         idObject: LONG,
6472         idChild: LONG,
6473     );
SetWinEventHook( eventMin: DWORD, eventMax: DWORD, hmodWinEventProc: HMODULE, pfnWinEventProc: WINEVENTPROC, idProcess: DWORD, idThread: DWORD, dwFlags: DWORD, ) -> HWINEVENTHOOK6474     pub fn SetWinEventHook(
6475         eventMin: DWORD,
6476         eventMax: DWORD,
6477         hmodWinEventProc: HMODULE,
6478         pfnWinEventProc: WINEVENTPROC,
6479         idProcess: DWORD,
6480         idThread: DWORD,
6481         dwFlags: DWORD,
6482     ) -> HWINEVENTHOOK;
IsWinEventHookInstalled( event: DWORD, ) -> BOOL6483     pub fn IsWinEventHookInstalled(
6484         event: DWORD,
6485     ) -> BOOL;
6486 }
6487 pub const WINEVENT_OUTOFCONTEXT: UINT = 0x0000;
6488 pub const WINEVENT_SKIPOWNTHREAD: UINT = 0x0001;
6489 pub const WINEVENT_SKIPOWNPROCESS: UINT = 0x0002;
6490 pub const WINEVENT_INCONTEXT: UINT = 0x0004;
6491 extern "system" {
UnhookWinEvent( hWinEventHook: HWINEVENTHOOK, ) -> BOOL6492     pub fn UnhookWinEvent(
6493         hWinEventHook: HWINEVENTHOOK,
6494     ) -> BOOL;
6495 }
6496 pub const CHILDID_SELF: LONG = 0;
6497 pub const INDEXID_OBJECT: LONG = 0;
6498 pub const INDEXID_CONTAINER: LONG = 0;
6499 pub const OBJID_WINDOW: LONG = 0x0000;
6500 pub const OBJID_SYSMENU: LONG = 0xFFFFFFFF;
6501 pub const OBJID_TITLEBAR: LONG = 0xFFFFFFFE;
6502 pub const OBJID_MENU: LONG = 0xFFFFFFFD;
6503 pub const OBJID_CLIENT: LONG = 0xFFFFFFFC;
6504 pub const OBJID_VSCROLL: LONG = 0xFFFFFFFB;
6505 pub const OBJID_HSCROLL: LONG = 0xFFFFFFFA;
6506 pub const OBJID_SIZEGRIP: LONG = 0xFFFFFFF9;
6507 pub const OBJID_CARET: LONG = 0xFFFFFFF8;
6508 pub const OBJID_CURSOR: LONG = 0xFFFFFFF7;
6509 pub const OBJID_ALERT: LONG = 0xFFFFFFF6;
6510 pub const OBJID_SOUND: LONG = 0xFFFFFFF5;
6511 pub const OBJID_QUERYCLASSNAMEIDX: LONG = 0xFFFFFFF4;
6512 pub const OBJID_NATIVEOM: LONG = 0xFFFFFFF0;
6513 pub const EVENT_MIN: UINT = 0x0001;
6514 pub const EVENT_MAX: UINT = 0x7FFFFFFF;
6515 pub const EVENT_SYSTEM_SOUND: UINT = 0x0001;
6516 pub const EVENT_SYSTEM_ALERT: UINT = 0x0002;
6517 pub const EVENT_SYSTEM_FOREGROUND: UINT = 0x0003;
6518 pub const EVENT_SYSTEM_MENUSTART: UINT = 0x0004;
6519 pub const EVENT_SYSTEM_MENUEND: UINT = 0x0005;
6520 pub const EVENT_SYSTEM_MENUPOPUPSTART: UINT = 0x0006;
6521 pub const EVENT_SYSTEM_MENUPOPUPEND: UINT = 0x0007;
6522 pub const EVENT_SYSTEM_CAPTURESTART: UINT = 0x0008;
6523 pub const EVENT_SYSTEM_CAPTUREEND: UINT = 0x0009;
6524 pub const EVENT_SYSTEM_MOVESIZESTART: UINT = 0x000A;
6525 pub const EVENT_SYSTEM_MOVESIZEEND: UINT = 0x000B;
6526 pub const EVENT_SYSTEM_CONTEXTHELPSTART: UINT = 0x000C;
6527 pub const EVENT_SYSTEM_CONTEXTHELPEND: UINT = 0x000D;
6528 pub const EVENT_SYSTEM_DRAGDROPSTART: UINT = 0x000E;
6529 pub const EVENT_SYSTEM_DRAGDROPEND: UINT = 0x000F;
6530 pub const EVENT_SYSTEM_DIALOGSTART: UINT = 0x0010;
6531 pub const EVENT_SYSTEM_DIALOGEND: UINT = 0x0011;
6532 pub const EVENT_SYSTEM_SCROLLINGSTART: UINT = 0x0012;
6533 pub const EVENT_SYSTEM_SCROLLINGEND: UINT = 0x0013;
6534 pub const EVENT_SYSTEM_SWITCHSTART: UINT = 0x0014;
6535 pub const EVENT_SYSTEM_SWITCHEND: UINT = 0x0015;
6536 pub const EVENT_SYSTEM_MINIMIZESTART: UINT = 0x0016;
6537 pub const EVENT_SYSTEM_MINIMIZEEND: UINT = 0x0017;
6538 pub const EVENT_SYSTEM_DESKTOPSWITCH: UINT = 0x0020;
6539 pub const EVENT_SYSTEM_SWITCHER_APPGRABBED: UINT = 0x0024;
6540 pub const EVENT_SYSTEM_SWITCHER_APPOVERTARGET: UINT = 0x0025;
6541 pub const EVENT_SYSTEM_SWITCHER_APPDROPPED: UINT = 0x0026;
6542 pub const EVENT_SYSTEM_SWITCHER_CANCELLED: UINT = 0x0027;
6543 pub const EVENT_SYSTEM_IME_KEY_NOTIFICATION: UINT = 0x0029;
6544 pub const EVENT_SYSTEM_END: UINT = 0x00FF;
6545 pub const EVENT_OEM_DEFINED_START: UINT = 0x0101;
6546 pub const EVENT_OEM_DEFINED_END: UINT = 0x01FF;
6547 pub const EVENT_UIA_EVENTID_START: UINT = 0x4E00;
6548 pub const EVENT_UIA_EVENTID_END: UINT = 0x4EFF;
6549 pub const EVENT_UIA_PROPID_START: UINT = 0x7500;
6550 pub const EVENT_UIA_PROPID_END: UINT = 0x75FF;
6551 pub const EVENT_CONSOLE_CARET: UINT = 0x4001;
6552 pub const EVENT_CONSOLE_UPDATE_REGION: UINT = 0x4002;
6553 pub const EVENT_CONSOLE_UPDATE_SIMPLE: UINT = 0x4003;
6554 pub const EVENT_CONSOLE_UPDATE_SCROLL: UINT = 0x4004;
6555 pub const EVENT_CONSOLE_LAYOUT: UINT = 0x4005;
6556 pub const EVENT_CONSOLE_START_APPLICATION: UINT = 0x4006;
6557 pub const EVENT_CONSOLE_END_APPLICATION: UINT = 0x4007;
6558 #[cfg(target_arch = "x86_64")]
6559 pub const CONSOLE_APPLICATION_16BIT: LONG = 0x0000;
6560 #[cfg(target_arch = "x86")]
6561 pub const CONSOLE_APPLICATION_16BIT: LONG = 0x0001;
6562 pub const CONSOLE_CARET_SELECTION: LONG = 0x0001;
6563 pub const CONSOLE_CARET_VISIBLE: LONG = 0x0002;
6564 pub const EVENT_CONSOLE_END: UINT = 0x40FF;
6565 pub const EVENT_OBJECT_CREATE: UINT = 0x8000;
6566 pub const EVENT_OBJECT_DESTROY: UINT = 0x8001;
6567 pub const EVENT_OBJECT_SHOW: UINT = 0x8002;
6568 pub const EVENT_OBJECT_HIDE: UINT = 0x8003;
6569 pub const EVENT_OBJECT_REORDER: UINT = 0x8004;
6570 pub const EVENT_OBJECT_FOCUS: UINT = 0x8005;
6571 pub const EVENT_OBJECT_SELECTION: UINT = 0x8006;
6572 pub const EVENT_OBJECT_SELECTIONADD: UINT = 0x8007;
6573 pub const EVENT_OBJECT_SELECTIONREMOVE: UINT = 0x8008;
6574 pub const EVENT_OBJECT_SELECTIONWITHIN: UINT = 0x8009;
6575 pub const EVENT_OBJECT_STATECHANGE: UINT = 0x800A;
6576 pub const EVENT_OBJECT_LOCATIONCHANGE: UINT = 0x800B;
6577 pub const EVENT_OBJECT_NAMECHANGE: UINT = 0x800C;
6578 pub const EVENT_OBJECT_DESCRIPTIONCHANGE: UINT = 0x800D;
6579 pub const EVENT_OBJECT_VALUECHANGE: UINT = 0x800E;
6580 pub const EVENT_OBJECT_PARENTCHANGE: UINT = 0x800F;
6581 pub const EVENT_OBJECT_HELPCHANGE: UINT = 0x8010;
6582 pub const EVENT_OBJECT_DEFACTIONCHANGE: UINT = 0x8011;
6583 pub const EVENT_OBJECT_ACCELERATORCHANGE: UINT = 0x8012;
6584 pub const EVENT_OBJECT_INVOKED: UINT = 0x8013;
6585 pub const EVENT_OBJECT_TEXTSELECTIONCHANGED: UINT = 0x8014;
6586 pub const EVENT_OBJECT_CONTENTSCROLLED: UINT = 0x8015;
6587 pub const EVENT_SYSTEM_ARRANGMENTPREVIEW: UINT = 0x8016;
6588 pub const EVENT_OBJECT_CLOAKED: UINT = 0x8017;
6589 pub const EVENT_OBJECT_UNCLOAKED: UINT = 0x8018;
6590 pub const EVENT_OBJECT_LIVEREGIONCHANGED: UINT = 0x8019;
6591 pub const EVENT_OBJECT_HOSTEDOBJECTSINVALIDATED: UINT = 0x8020;
6592 pub const EVENT_OBJECT_DRAGSTART: UINT = 0x8021;
6593 pub const EVENT_OBJECT_DRAGCANCEL: UINT = 0x8022;
6594 pub const EVENT_OBJECT_DRAGCOMPLETE: UINT = 0x8023;
6595 pub const EVENT_OBJECT_DRAGENTER: UINT = 0x8024;
6596 pub const EVENT_OBJECT_DRAGLEAVE: UINT = 0x8025;
6597 pub const EVENT_OBJECT_DRAGDROPPED: UINT = 0x8026;
6598 pub const EVENT_OBJECT_IME_SHOW: UINT = 0x8027;
6599 pub const EVENT_OBJECT_IME_HIDE: UINT = 0x8028;
6600 pub const EVENT_OBJECT_IME_CHANGE: UINT = 0x8029;
6601 pub const EVENT_OBJECT_TEXTEDIT_CONVERSIONTARGETCHANGED: UINT = 0x8030;
6602 pub const EVENT_OBJECT_END: UINT = 0x80FF;
6603 pub const EVENT_AIA_START: UINT = 0xA000;
6604 pub const EVENT_AIA_END: UINT = 0xAFFF;
6605 pub const ALERT_SYSTEM_INFORMATIONAL: LONG = 1;
6606 pub const ALERT_SYSTEM_WARNING: LONG = 2;
6607 pub const ALERT_SYSTEM_ERROR: LONG = 3;
6608 pub const ALERT_SYSTEM_QUERY: LONG = 4;
6609 pub const ALERT_SYSTEM_CRITICAL: LONG = 5;
6610 pub const CALERT_SYSTEM: LONG = 6;
6611 extern "system" {
6612 //14098
BlockInput( fBlockIt: BOOL, ) -> BOOL6613     pub fn BlockInput(
6614         fBlockIt: BOOL,
6615     ) -> BOOL;
IsProcessDPIAware() -> BOOL6616     pub fn IsProcessDPIAware() -> BOOL;
GetWindowModuleFileNameA( hWnd: HWND, lpszFileName: LPCSTR, cchFileNameMax: UINT, ) -> UINT6617     pub fn GetWindowModuleFileNameA(
6618         hWnd: HWND,
6619         lpszFileName: LPCSTR,
6620         cchFileNameMax: UINT,
6621     ) -> UINT;
GetWindowModuleFileNameW( hWnd: HWND, lpszFileName: LPWSTR, cchFileNameMax: UINT, ) -> UINT6622     pub fn GetWindowModuleFileNameW(
6623         hWnd: HWND,
6624         lpszFileName: LPWSTR,
6625         cchFileNameMax: UINT,
6626     ) -> UINT;
GetAncestor( hWnd: HWND, gaFlags: UINT, ) -> HWND6627     pub fn GetAncestor(
6628         hWnd: HWND,
6629         gaFlags: UINT,
6630     ) -> HWND;
RealChildWindowFromPoint( hwndParent: HWND, ptParentClientCoords: POINT, ) -> HWND6631     pub fn RealChildWindowFromPoint(
6632         hwndParent: HWND,
6633         ptParentClientCoords: POINT,
6634     ) -> HWND;
RealGetWindowClassA( hwnd: HWND, ptszClassName: LPSTR, cchClassNameMax: UINT, ) -> UINT6635     pub fn RealGetWindowClassA(
6636         hwnd: HWND,
6637         ptszClassName: LPSTR,
6638         cchClassNameMax: UINT,
6639     ) -> UINT;
RealGetWindowClassW( hwnd: HWND, ptszClassName: LPWSTR, cchClassNameMax: UINT, ) -> UINT6640     pub fn RealGetWindowClassW(
6641         hwnd: HWND,
6642         ptszClassName: LPWSTR,
6643         cchClassNameMax: UINT,
6644     ) -> UINT;
LockWorkStation() -> BOOL6645     pub fn LockWorkStation() -> BOOL;
UserHandleGrantAccess( hUserHandle: HANDLE, hJob: HANDLE, bGrant: BOOL, ) -> BOOL6646     pub fn UserHandleGrantAccess(
6647         hUserHandle: HANDLE,
6648         hJob: HANDLE,
6649         bGrant: BOOL,
6650     ) -> BOOL;
6651 }
6652 DECLARE_HANDLE!{HRAWINPUT, HRAWINPUT__}
6653 #[inline]
GET_RAWINPUT_CODE_WPARAM(wParam: WPARAM) -> WPARAM6654 pub fn GET_RAWINPUT_CODE_WPARAM(wParam: WPARAM) -> WPARAM { wParam & 0xff }
6655 pub const RIM_INPUT: WPARAM = 0;
6656 pub const RIM_INPUTSINK: WPARAM = 1;
6657 STRUCT!{struct RAWINPUTHEADER {
6658     dwType: DWORD,
6659     dwSize: DWORD,
6660     hDevice: HANDLE,
6661     wParam: WPARAM,
6662 }}
6663 pub type PRAWINPUTHEADER = *mut RAWINPUTHEADER;
6664 pub type LPRAWINPUTHEADER = *mut RAWINPUTHEADER;
6665 pub const RIM_TYPEMOUSE: DWORD = 0;
6666 pub const RIM_TYPEKEYBOARD: DWORD = 1;
6667 pub const RIM_TYPEHID: DWORD = 2;
6668 STRUCT!{struct RAWMOUSE {
6669     usFlags: USHORT,
6670     memory_padding: USHORT, // 16bit Padding for 32bit align in following union
6671     usButtonFlags: USHORT,
6672     usButtonData: USHORT,
6673     ulRawButtons: ULONG,
6674     lLastX: LONG,
6675     lLastY: LONG,
6676     ulExtraInformation: ULONG,
6677 }}
6678 pub type PRAWMOUSE = *mut RAWMOUSE;
6679 pub type LPRAWMOUSE = *mut RAWMOUSE;
6680 pub const RI_MOUSE_LEFT_BUTTON_DOWN: USHORT = 0x0001;
6681 pub const RI_MOUSE_LEFT_BUTTON_UP: USHORT = 0x0002;
6682 pub const RI_MOUSE_RIGHT_BUTTON_DOWN: USHORT = 0x0004;
6683 pub const RI_MOUSE_RIGHT_BUTTON_UP: USHORT = 0x0008;
6684 pub const RI_MOUSE_MIDDLE_BUTTON_DOWN: USHORT = 0x0010;
6685 pub const RI_MOUSE_MIDDLE_BUTTON_UP: USHORT = 0x0020;
6686 pub const RI_MOUSE_BUTTON_1_DOWN: USHORT = RI_MOUSE_LEFT_BUTTON_DOWN;
6687 pub const RI_MOUSE_BUTTON_1_UP: USHORT = RI_MOUSE_LEFT_BUTTON_UP;
6688 pub const RI_MOUSE_BUTTON_2_DOWN: USHORT = RI_MOUSE_RIGHT_BUTTON_DOWN;
6689 pub const RI_MOUSE_BUTTON_2_UP: USHORT = RI_MOUSE_RIGHT_BUTTON_UP;
6690 pub const RI_MOUSE_BUTTON_3_DOWN: USHORT = RI_MOUSE_MIDDLE_BUTTON_DOWN;
6691 pub const RI_MOUSE_BUTTON_3_UP: USHORT = RI_MOUSE_MIDDLE_BUTTON_UP;
6692 pub const RI_MOUSE_BUTTON_4_DOWN: USHORT = 0x0040;
6693 pub const RI_MOUSE_BUTTON_4_UP: USHORT = 0x0080;
6694 pub const RI_MOUSE_BUTTON_5_DOWN: USHORT = 0x0100;
6695 pub const RI_MOUSE_BUTTON_5_UP: USHORT = 0x0200;
6696 pub const RI_MOUSE_WHEEL: USHORT = 0x0400;
6697 pub const MOUSE_MOVE_RELATIVE: USHORT = 0;
6698 pub const MOUSE_MOVE_ABSOLUTE: USHORT = 1;
6699 pub const MOUSE_VIRTUAL_DESKTOP: USHORT = 0x02;
6700 pub const MOUSE_ATTRIBUTES_CHANGED: USHORT = 0x04;
6701 pub const MOUSE_MOVE_NOCOALESCE: USHORT = 0x08;
6702 STRUCT!{struct RAWKEYBOARD {
6703     MakeCode: USHORT,
6704     Flags: USHORT,
6705     Reserved: USHORT,
6706     VKey: USHORT,
6707     Message: UINT,
6708     ExtraInformation: ULONG,
6709 }}
6710 pub type PRAWKEYBOARD = *mut RAWKEYBOARD;
6711 pub type LPRAWKEYBOARD = *mut RAWKEYBOARD;
6712 pub const KEYBOARD_OVERRUN_MAKE_CODE: DWORD = 0xFF;
6713 pub const RI_KEY_MAKE: DWORD = 0;
6714 pub const RI_KEY_BREAK: DWORD = 1;
6715 pub const RI_KEY_E0: DWORD = 2;
6716 pub const RI_KEY_E1: DWORD = 4;
6717 pub const RI_KEY_TERMSRV_SET_LED: DWORD = 8;
6718 pub const RI_KEY_TERMSRV_SHADOW: DWORD = 0x10;
6719 STRUCT!{struct RAWHID {
6720     dwSizeHid: DWORD,
6721     dwCount: DWORD,
6722     bRawData: [BYTE; 1],
6723 }}
6724 pub type PRAWHID = *mut RAWHID;
6725 pub type LPRAWHID = *mut RAWHID;
6726 UNION!{union RAWINPUT_data {
6727     [u32; 6],
6728     mouse mouse_mut: RAWMOUSE,
6729     keyboard keyboard_mut: RAWKEYBOARD,
6730     hid hid_mut: RAWHID,
6731 }}
6732 STRUCT!{struct RAWINPUT {
6733     header: RAWINPUTHEADER,
6734     data: RAWINPUT_data,
6735 }}
6736 pub type PRAWINPUT = *mut RAWINPUT;
6737 pub type LPRAWINPUT = *mut RAWINPUT;
6738 pub const RID_INPUT: DWORD = 0x10000003;
6739 pub const RID_HEADER: DWORD = 0x10000005;
6740 extern "system" {
GetRawInputData( hRawInput: HRAWINPUT, uiCommand: UINT, pData: LPVOID, pcbSize: PUINT, cbSizeHeader: UINT, ) -> UINT6741     pub fn GetRawInputData(
6742         hRawInput: HRAWINPUT,
6743         uiCommand: UINT,
6744         pData: LPVOID,
6745         pcbSize: PUINT,
6746         cbSizeHeader: UINT,
6747     ) -> UINT;
6748 }
6749 pub const RIDI_PREPARSEDDATA: DWORD = 0x20000005;
6750 pub const RIDI_DEVICENAME: DWORD = 0x20000007;
6751 pub const RIDI_DEVICEINFO: DWORD = 0x2000000b;
6752 STRUCT!{struct RID_DEVICE_INFO_MOUSE {
6753     dwId: DWORD,
6754     dwNumberOfButtons: DWORD,
6755     dwSampleRate: DWORD,
6756     fHasHorizontalWheel: BOOL,
6757 }}
6758 pub type PRID_DEVICE_INFO_MOUSE = *mut RID_DEVICE_INFO_MOUSE;
6759 STRUCT!{struct RID_DEVICE_INFO_KEYBOARD {
6760     dwType: DWORD,
6761     dwSubType: DWORD,
6762     dwKeyboardMode: DWORD,
6763     dwNumberOfFunctionKeys: DWORD,
6764     dwNumberOfIndicators: DWORD,
6765     dwNumberOfKeysTotal: DWORD,
6766 }}
6767 pub type PRID_DEVICE_INFO_KEYBOARD = *mut RID_DEVICE_INFO_KEYBOARD;
6768 STRUCT!{struct RID_DEVICE_INFO_HID {
6769     dwVendorId: DWORD,
6770     dwProductId: DWORD,
6771     dwVersionNumber: DWORD,
6772     usUsagePage: USHORT,
6773     usUsage: USHORT,
6774 }}
6775 pub type PRID_DEVICE_INFO_HID = *mut RID_DEVICE_INFO_HID;
6776 UNION!{union RID_DEVICE_INFO_u {
6777     [u32; 6],
6778     mouse mouse_mut: RID_DEVICE_INFO_MOUSE,
6779     keyboard keyboard_mut: RID_DEVICE_INFO_KEYBOARD,
6780     hid hid_mut: RID_DEVICE_INFO_HID,
6781 }}
6782 STRUCT!{struct RID_DEVICE_INFO {
6783     cbSize: DWORD,
6784     dwType: DWORD,
6785     u: RID_DEVICE_INFO_u,
6786 }}
6787 pub type PRID_DEVICE_INFO = *mut RID_DEVICE_INFO;
6788 pub type LPRID_DEVICE_INFO = *mut RID_DEVICE_INFO;
6789 extern "system" {
GetRawInputDeviceInfoA( hDevice: HANDLE, uiCommand: UINT, pData: LPVOID, pcbSize: PUINT, ) -> UINT6790     pub fn GetRawInputDeviceInfoA(
6791         hDevice: HANDLE,
6792         uiCommand: UINT,
6793         pData: LPVOID,
6794         pcbSize: PUINT,
6795     ) -> UINT;
GetRawInputDeviceInfoW( hDevice: HANDLE, uiCommand: UINT, pData: LPVOID, pcbSize: PUINT, ) -> UINT6796     pub fn GetRawInputDeviceInfoW(
6797         hDevice: HANDLE,
6798         uiCommand: UINT,
6799         pData: LPVOID,
6800         pcbSize: PUINT,
6801     ) -> UINT;
GetRawInputBuffer( pData: PRAWINPUT, pcbSize: PUINT, cbSizeHeader: UINT, ) -> UINT6802     pub fn GetRawInputBuffer(
6803         pData: PRAWINPUT,
6804         pcbSize: PUINT,
6805         cbSizeHeader: UINT,
6806     ) -> UINT;
6807 }
6808 STRUCT!{struct RAWINPUTDEVICE {
6809     usUsagePage: USHORT,
6810     usUsage: USHORT,
6811     dwFlags: DWORD,
6812     hwndTarget: HWND,
6813 }}
6814 pub type PRAWINPUTDEVICE = *mut RAWINPUTDEVICE;
6815 pub type LPRAWINPUTDEVICE = *mut RAWINPUTDEVICE;
6816 pub type PCRAWINPUTDEVICE = *const RAWINPUTDEVICE;
6817 pub const RIDEV_REMOVE: DWORD = 0x00000001;
6818 pub const RIDEV_EXCLUDE: DWORD = 0x00000010;
6819 pub const RIDEV_PAGEONLY: DWORD = 0x00000020;
6820 pub const RIDEV_NOLEGACY: DWORD = 0x00000030;
6821 pub const RIDEV_INPUTSINK: DWORD = 0x00000100;
6822 pub const RIDEV_CAPTUREMOUSE: DWORD = 0x00000200;
6823 pub const RIDEV_NOHOTKEYS: DWORD = 0x00000200;
6824 pub const RIDEV_APPKEYS: DWORD = 0x00000400;
6825 pub const RIDEV_EXINPUTSINK: DWORD = 0x00001000;
6826 pub const RIDEV_DEVNOTIFY: DWORD = 0x00002000;
6827 pub const RIDEV_EXMODEMASK: DWORD = 0x000000F0;
6828 pub const GIDC_ARRIVAL: DWORD = 1;
6829 pub const GIDC_REMOVAL: DWORD = 2;
6830 extern "system" {
RegisterRawInputDevices( pRawInputDevices: PCRAWINPUTDEVICE, uiNumDevices: UINT, cbSize: UINT, ) -> BOOL6831     pub fn RegisterRawInputDevices(
6832         pRawInputDevices: PCRAWINPUTDEVICE,
6833         uiNumDevices: UINT,
6834         cbSize: UINT,
6835     ) -> BOOL;
GetRegisteredRawInputDevices( pRawInputDevices: PRAWINPUTDEVICE, puiNumDevices: PUINT, cbSize: UINT, ) -> UINT6836     pub fn GetRegisteredRawInputDevices(
6837         pRawInputDevices: PRAWINPUTDEVICE,
6838         puiNumDevices: PUINT,
6839         cbSize: UINT,
6840     ) -> UINT;
6841 }
6842 STRUCT!{struct RAWINPUTDEVICELIST {
6843     hDevice: HANDLE,
6844     dwType: DWORD,
6845 }}
6846 pub type PRAWINPUTDEVICELIST = *mut RAWINPUTDEVICELIST;
6847 extern "system" {
GetRawInputDeviceList( pRawInputDeviceList: PRAWINPUTDEVICELIST, puiNumDevices: PUINT, cbSize: UINT, ) -> UINT6848     pub fn GetRawInputDeviceList(
6849         pRawInputDeviceList: PRAWINPUTDEVICELIST,
6850         puiNumDevices: PUINT,
6851         cbSize: UINT,
6852     ) -> UINT;
DefRawInputProc( paRawInput: *mut PRAWINPUT, nInput: INT, cbSizeHeader: UINT, ) -> LRESULT6853     pub fn DefRawInputProc(
6854         paRawInput: *mut PRAWINPUT,
6855         nInput: INT,
6856         cbSizeHeader: UINT,
6857     ) -> LRESULT;
ChangeWindowMessageFilter( message: UINT, dwFlag: DWORD, ) -> BOOL6858     pub fn ChangeWindowMessageFilter(
6859         message: UINT,
6860         dwFlag: DWORD,
6861     ) -> BOOL;
6862 }
6863 STRUCT!{struct CHANGEFILTERSTRUCT {
6864     cbSize: DWORD,
6865     ExtStatus: DWORD,
6866 }}
6867 extern "system" {
ChangeWindowMessageFilterEx( hwnd: HWND, message: UINT, action: DWORD, pChangeFilterStruct: PCHANGEFILTERSTRUCT, ) -> BOOL6868     pub fn ChangeWindowMessageFilterEx(
6869         hwnd: HWND,
6870         message: UINT,
6871         action: DWORD,
6872         pChangeFilterStruct: PCHANGEFILTERSTRUCT,
6873     ) -> BOOL;
6874 }
6875 pub type PCHANGEFILTERSTRUCT = *mut CHANGEFILTERSTRUCT;
6876 // if WINVER >= 0x0601
6877 // GetSystemMetrics(SM_DIGITIZER) flag values
6878 pub const NID_INTEGRATED_TOUCH: UINT = 0x00000001;
6879 pub const NID_EXTERNAL_TOUCH: UINT = 0x00000002;
6880 pub const NID_INTEGRATED_PEN: UINT = 0x00000004;
6881 pub const NID_EXTERNAL_PEN: UINT = 0x00000008;
6882 pub const NID_MULTI_INPUT: UINT = 0x00000040;
6883 pub const NID_READY: UINT = 0x00000080;
6884 // end if WINVER >= 0x0601
6885 // System Menu Command Values
6886 //
6887 STRUCT!{struct ANIMATIONINFO {
6888     cbSize: UINT,
6889     iMinAnimate: c_int,
6890 }}
6891 pub type LPANIMATIONINFO = *mut ANIMATIONINFO;
6892 pub const SPIF_UPDATEINIFILE: UINT = 0x0001;
6893 pub const SPIF_SENDWININICHANGE: UINT = 0x0002;
6894 pub const SPIF_SENDCHANGE: UINT = SPIF_SENDWININICHANGE;
6895 extern "system" {
LoadIconA( hInstance: HINSTANCE, lpIconName: LPCSTR, ) -> HICON6896     pub fn LoadIconA(
6897         hInstance: HINSTANCE,
6898         lpIconName: LPCSTR,
6899     ) -> HICON;
LoadIconW( hInstance: HINSTANCE, lpIconName: LPCWSTR, ) -> HICON6900     pub fn LoadIconW(
6901         hInstance: HINSTANCE,
6902         lpIconName: LPCWSTR,
6903     ) -> HICON;
IsImmersiveProcess( hProcess: HANDLE, ) -> BOOL6904     pub fn IsImmersiveProcess(
6905         hProcess: HANDLE,
6906     ) -> BOOL;
6907 }
6908