xref: /reactos/win32ss/include/ntuser.h (revision 92dfec21)
1 #ifndef __WIN32K_NTUSER_H
2 #define __WIN32K_NTUSER_H
3 
4 struct _PROCESSINFO;
5 struct _THREADINFO;
6 struct _DESKTOP;
7 struct _WND;
8 struct tagPOPUPMENU;
9 #ifndef HIMC
10 typedef HANDLE HIMC;
11 #endif
12 
13 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
14 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
15 
16 #define HANDLEENTRY_DESTROY 1
17 #define HANDLEENTRY_INDESTROY 2
18 
19 typedef struct _USER_HANDLE_ENTRY
20 {
21     void *ptr; /* pointer to object */
22     union
23     {
24         PVOID pi;
25         struct _THREADINFO *pti; /* pointer to Win32ThreadInfo */
26         struct _PROCESSINFO *ppi; /* pointer to W32ProcessInfo */
27     };
28     unsigned char type; /* object type (0 if free) */
29     unsigned char flags;
30     unsigned short generation; /* generation counter */
31 } USER_HANDLE_ENTRY, *PUSER_HANDLE_ENTRY;
32 
33 typedef struct _USER_HANDLE_TABLE
34 {
35     PUSER_HANDLE_ENTRY handles;
36     PUSER_HANDLE_ENTRY freelist;
37     int nb_handles;
38     int allocated_handles;
39 } USER_HANDLE_TABLE, *PUSER_HANDLE_TABLE;
40 
41 typedef enum _HANDLE_TYPE
42 {
43     TYPE_FREE = 0,
44     TYPE_WINDOW = 1,
45     TYPE_MENU = 2,
46     TYPE_CURSOR = 3,
47     TYPE_SETWINDOWPOS = 4,
48     TYPE_HOOK = 5,
49     TYPE_CLIPDATA = 6,
50     TYPE_CALLPROC = 7,
51     TYPE_ACCELTABLE = 8,
52     TYPE_DDEACCESS = 9,
53     TYPE_DDECONV = 10,
54     TYPE_DDEXACT = 11,
55     TYPE_MONITOR = 12,
56     TYPE_KBDLAYOUT = 13,
57     TYPE_KBDFILE = 14,
58     TYPE_WINEVENTHOOK = 15,
59     TYPE_TIMER = 16,
60     TYPE_INPUTCONTEXT = 17,
61     TYPE_HIDDATA = 18,
62     TYPE_DEVICEINFO = 19,
63     TYPE_TOUCHINPUTINFO = 20,
64     TYPE_GESTUREINFOOBJ = 21,
65     TYPE_CTYPES,
66     TYPE_GENERIC = 255
67 } HANDLE_TYPE, *PHANDLE_TYPE;
68 
69 typedef enum _USERTHREADINFOCLASS
70 {
71     UserThreadShutdownInformation,
72     UserThreadFlags,
73     UserThreadTaskName,
74     UserThreadWOWInformation,
75     UserThreadHungStatus,
76     UserThreadInitiateShutdown,
77     UserThreadEndShutdown,
78     UserThreadUseActiveDesktop,
79     UserThreadUseDesktop,
80     UserThreadRestoreDesktop,
81     UserThreadCsrApiPort,
82 } USERTHREADINFOCLASS;
83 
84 typedef struct _LARGE_UNICODE_STRING
85 {
86     ULONG Length;
87     ULONG MaximumLength:31;
88     ULONG bAnsi:1;
89     PWSTR Buffer;
90 } LARGE_UNICODE_STRING, *PLARGE_UNICODE_STRING;
91 
92 typedef struct _LARGE_STRING
93 {
94     ULONG Length;
95     ULONG MaximumLength:31;
96     ULONG bAnsi:1;
97     PVOID Buffer;
98 } LARGE_STRING, *PLARGE_STRING;
99 
100 
101 /* Based on ANSI_STRING */
102 typedef struct _LARGE_ANSI_STRING
103 {
104     ULONG Length;
105     ULONG MaximumLength:31;
106     ULONG bAnsi:1;
107     PCHAR Buffer;
108 } LARGE_ANSI_STRING, *PLARGE_ANSI_STRING;
109 
110 VOID
111 NTAPI
112 RtlInitLargeAnsiString(
113     IN OUT PLARGE_ANSI_STRING,
114     IN PCSZ,
115     IN INT);
116 
117 VOID
118 NTAPI
119 RtlInitLargeUnicodeString(
120     IN OUT PLARGE_UNICODE_STRING,
121     IN PCWSTR,
122     IN INT);
123 
124 BOOL
125 NTAPI
126 RtlLargeStringToUnicodeString(
127     PUNICODE_STRING,
128     PLARGE_STRING);
129 
130 #define NB_HOOKS (WH_MAXHOOK - WH_MINHOOK + 1)
131 
132 typedef struct _DESKTOPINFO
133 {
134     PVOID pvDesktopBase;
135     PVOID pvDesktopLimit;
136     struct _WND *spwnd;
137     DWORD fsHooks;
138     LIST_ENTRY aphkStart[NB_HOOKS];
139 
140     HWND hTaskManWindow;
141     HWND hProgmanWindow;
142     HWND hShellWindow;
143     struct _WND *spwndShell;
144     struct _WND *spwndBkGnd;
145 
146     struct _PROCESSINFO *ppiShellProcess;
147 
148     union
149     {
150         UINT Dummy;
151         struct
152         {
153             UINT LastInputWasKbd:1;
154         };
155     };
156 
157     WCHAR szDesktopName[1];
158 } DESKTOPINFO, *PDESKTOPINFO;
159 
160 #define CTI_THREADSYSLOCK 0x0001
161 #define CTI_INSENDMESSAGE 0x0002
162 
163 typedef struct _CLIENTTHREADINFO
164 {
165     DWORD CTI_flags;
166     WORD fsChangeBits;
167     WORD fsWakeBits;
168     WORD fsWakeBitsJournal;
169     WORD fsWakeMask;
170     ULONG timeLastRead; // Last time the message queue was read.
171     DWORD dwcPumpHook;
172 } CLIENTTHREADINFO, *PCLIENTTHREADINFO;
173 
174 typedef struct _HEAD
175 {
176     HANDLE h;
177     DWORD cLockObj;
178 } HEAD, *PHEAD;
179 
180 typedef struct _THROBJHEAD
181 {
182     HEAD;
183     struct _THREADINFO *pti;
184 } THROBJHEAD, *PTHROBJHEAD;
185 
186 typedef struct _THRDESKHEAD
187 {
188     THROBJHEAD;
189     struct _DESKTOP *rpdesk;
190     PVOID pSelf;
191 } THRDESKHEAD, *PTHRDESKHEAD;
192 
193 typedef struct _PROCDESKHEAD
194 {
195     HEAD;
196     DWORD_PTR hTaskWow;
197     struct _DESKTOP *rpdesk;
198     PVOID pSelf;
199 } PROCDESKHEAD, *PPROCDESKHEAD;
200 
201 typedef struct _PROCMARKHEAD
202 {
203     HEAD;
204     ULONG hTaskWow;
205     struct _PROCESSINFO *ppi;
206 } PROCMARKHEAD, *PPROCMARKHEAD;
207 
208 #define UserHMGetHandle(obj) ((obj)->head.h)
209 
210 /* Window Client Information structure */
211 struct _ETHREAD;
212 
213 #define WEF_SETBYWNDPTI 0x0001
214 
215 typedef struct tagHOOK
216 {
217     THRDESKHEAD head;
218     struct tagHOOK *phkNext; /* This is for user space. */
219     int HookId; /* Hook table index */
220     ULONG_PTR offPfn;
221     ULONG flags; /* Some internal flags */
222     INT_PTR ihmod;
223     struct _THREADINFO *ptiHooked;
224     struct _DESKTOP *rpdesk;
225     /* ReactOS */
226     LIST_ENTRY Chain; /* Hook chain entry */
227     HOOKPROC Proc; /* Hook function */
228     BOOLEAN Ansi; /* Is it an Ansi hook? */
229     UNICODE_STRING ModuleName; /* Module name for global hooks */
230 } HOOK, *PHOOK;
231 
232 typedef struct tagCLIPBOARDDATA
233 {
234     HEAD head;
235     DWORD cbData;
236     BYTE Data[0];
237 } CLIPBOARDDATA, *PCLIPBOARDDATA;
238 
239 /* THREADINFO Flags */
240 #define TIF_INCLEANUP               0x00000001
241 #define TIF_16BIT                   0x00000002
242 #define TIF_SYSTEMTHREAD            0x00000004
243 #define TIF_CSRSSTHREAD             0x00000008
244 #define TIF_TRACKRECTVISIBLE        0x00000010
245 #define TIF_ALLOWFOREGROUNDACTIVATE 0x00000020
246 #define TIF_DONTATTACHQUEUE         0x00000040
247 #define TIF_DONTJOURNALATTACH       0x00000080
248 #define TIF_WOW64                   0x00000100
249 #define TIF_INACTIVATEAPPMSG        0x00000200
250 #define TIF_SPINNING                0x00000400
251 #define TIF_PALETTEAWARE            0x00000800
252 #define TIF_SHAREDWOW               0x00001000
253 #define TIF_FIRSTIDLE               0x00002000
254 #define TIF_WAITFORINPUTIDLE        0x00004000
255 #define TIF_MOVESIZETRACKING        0x00008000
256 #define TIF_VDMAPP                  0x00010000
257 #define TIF_DOSEMULATOR             0x00020000
258 #define TIF_GLOBALHOOKER            0x00040000
259 #define TIF_DELAYEDEVENT            0x00080000
260 #define TIF_MSGPOSCHANGED           0x00100000
261 #define TIF_SHUTDOWNCOMPLETE        0x00200000
262 #define TIF_IGNOREPLAYBACKDELAY     0x00400000
263 #define TIF_ALLOWOTHERACCOUNTHOOK   0x00800000
264 #define TIF_GUITHREADINITIALIZED    0x02000000
265 #define TIF_DISABLEIME              0x04000000
266 #define TIF_INGETTEXTLENGTH         0x08000000
267 #define TIF_ANSILENGTH              0x10000000
268 #define TIF_DISABLEHOOKS            0x20000000
269 
270 typedef struct _CALLBACKWND
271 {
272     HWND hWnd;
273     struct _WND *pWnd;
274     PVOID pActCtx;
275 } CALLBACKWND, *PCALLBACKWND;
276 
277 #define CI_TRANSACTION       0x00000001
278 #define CI_QUEUEMSG          0x00000002
279 #define CI_WOW               0x00000004
280 #define CI_INITTHREAD        0x00000008
281 #define CI_CURTHPRHOOK       0x00000010
282 #define CI_CLASSESREGISTERED 0x00000020
283 #define CI_IMMACTIVATE       0x00000040
284 
285 typedef struct _CLIENTINFO
286 {
287     ULONG_PTR CI_flags;
288     ULONG_PTR cSpins;
289     DWORD dwExpWinVer;
290     DWORD dwCompatFlags;
291     DWORD dwCompatFlags2;
292     DWORD dwTIFlags; /* ThreadInfo TIF_Xxx flags for User space. */
293     PDESKTOPINFO pDeskInfo;
294     ULONG_PTR ulClientDelta;
295     PHOOK phkCurrent;
296     ULONG fsHooks;
297     CALLBACKWND CallbackWnd;
298     DWORD dwHookCurrent;
299     INT cInDDEMLCallback;
300     PCLIENTTHREADINFO pClientThreadInfo;
301     ULONG_PTR dwHookData;
302     DWORD dwKeyCache;
303     BYTE afKeyState[8];
304     DWORD dwAsyncKeyCache;
305     BYTE afAsyncKeyState[8];
306     BYTE afAsyncKeyStateRecentDow[8];
307     HKL hKL;
308     USHORT CodePage;
309     UCHAR achDbcsCF[2];
310     MSG msgDbcsCB;
311     LPDWORD lpdwRegisteredClasses;
312     ULONG Win32ClientInfo3[26];
313 /* It's just a pointer reference not to be used w the structure in user space. */
314     struct _PROCESSINFO *ppi;
315 } CLIENTINFO, *PCLIENTINFO;
316 
317 /* Make sure it fits into the TEB */
318 C_ASSERT(sizeof(CLIENTINFO) <= sizeof(((PTEB)0)->Win32ClientInfo));
319 
320 #define GetWin32ClientInfo() ((PCLIENTINFO)(NtCurrentTeb()->Win32ClientInfo))
321 
322 typedef struct tagDDEPACK
323 {
324     UINT_PTR uiLo;
325     UINT_PTR uiHi;
326 } DDEPACK, *PDDEPACK;
327 
328 #define HRGN_NULL    ((HRGN)0) /* NULL empty region */
329 #define HRGN_WINDOW  ((HRGN)1) /* region from window rcWindow */
330 #define HRGN_MONITOR ((HRGN)2) /* region from monitor region. */
331 
332 /* Menu Item fType. */
333 #define MFT_RTOL 0x6000
334 
335 /* Menu Item fState. */
336 #define MFS_HBMMENUBMP 0x20000000
337 
338 typedef struct tagITEM
339 {
340     UINT fType;
341     UINT fState;
342     UINT wID;
343     struct tagMENU *spSubMenu; /* Pop-up menu. */
344     HANDLE hbmpChecked;
345     HANDLE hbmpUnchecked;
346     USHORT *Xlpstr; /* Item text pointer. */
347     ULONG cch;
348     DWORD_PTR dwItemData;
349     ULONG xItem; /* Item position. left */
350     ULONG yItem; /*     "          top */
351     ULONG cxItem; /* Item Size Width */
352     ULONG cyItem; /*     "     Height */
353     ULONG dxTab; /* X position of text after Tab */
354     ULONG ulX; /* underline.. start position */
355     ULONG ulWidth; /* underline.. width */
356     HBITMAP hbmp; /* bitmap */
357     INT cxBmp; /* Width Maximum size of the bitmap items in MIIM_BITMAP state */
358     INT cyBmp; /* Height " */
359     /* ReactOS */
360     UNICODE_STRING lpstr;
361 } ITEM, *PITEM;
362 
363 typedef struct tagMENULIST
364 {
365     struct tagMENULIST *pNext;
366     struct tagMENU *pMenu;
367 } MENULIST, *PMENULIST;
368 
369 /* Menu fFlags, upper byte is MNS_X style flags. */
370 #define MNF_POPUP      0x0001
371 #define MNF_UNDERLINE  0x0004
372 #define MNF_INACTIVE   0x0010
373 #define MNF_RTOL       0x0020
374 #define MNF_DESKTOPMN  0x0040
375 #define MNF_SYSDESKMN  0x0080
376 #define MNF_SYSSUBMENU 0x0100
377 /* Hack */
378 #define MNF_SYSMENU    0x0200
379 
380 /* (other FocusedItem values give the position of the focused item) */
381 #define NO_SELECTED_ITEM 0xffff
382 
383 typedef struct tagMENU
384 {
385     PROCDESKHEAD head;
386     ULONG fFlags; /* [Style flags | Menu flags] */
387     INT iItem; /* nPos of selected item, if -1 not selected. AKA focused item */
388     UINT cAlloced; /* Number of allocated items. Inc's of 8 */
389     UINT cItems; /* Number of items in the menu */
390     ULONG cxMenu; /* Width of the whole menu */
391     ULONG cyMenu; /* Height of the whole menu */
392     ULONG cxTextAlign; /* Offset of text when items have both bitmaps and text */
393     struct _WND *spwndNotify; /* window receiving the messages for ownerdraw */
394     PITEM rgItems; /* Array of menu items */
395     struct tagMENULIST *pParentMenus; /* If this is SubMenu, list of parents. */
396     DWORD dwContextHelpId;
397     ULONG cyMax; /* max height of the whole menu, 0 is screen height */
398     DWORD_PTR dwMenuData; /* application defined value */
399     HBRUSH hbrBack; /* brush for menu background */
400     INT iTop; /* Current scroll position Top */
401     INT iMaxTop; /* Current scroll position Max Top */
402     DWORD dwArrowsOn:2; /* Arrows: 0 off, 1 on, 2 to the top, 3 to the bottom. */
403     /* ReactOS */
404     LIST_ENTRY ListEntry;
405     HWND hWnd; /* Window containing the menu, use POPUPMENU */
406     BOOL TimeToHide;
407 } MENU, *PMENU;
408 
409 typedef struct tagPOPUPMENU
410 {
411     ULONG fIsMenuBar:1;
412     ULONG fHasMenuBar:1;
413     ULONG fIsSysMenu:1;
414     ULONG fIsTrackPopup:1;
415     ULONG fDroppedLeft:1;
416     ULONG fHierarchyDropped:1;
417     ULONG fRightButton:1;
418     ULONG fToggle:1;
419     ULONG fSynchronous:1;
420     ULONG fFirstClick:1;
421     ULONG fDropNextPopup:1;
422     ULONG fNoNotify:1;
423     ULONG fAboutToHide:1;
424     ULONG fShowTimer:1;
425     ULONG fHideTimer:1;
426     ULONG fDestroyed:1;
427     ULONG fDelayedFree:1;
428     ULONG fFlushDelayedFree:1;
429     ULONG fFreed:1;
430     ULONG fInCancel:1;
431     ULONG fTrackMouseEvent:1;
432     ULONG fSendUninit:1;
433     ULONG fRtoL:1;
434     // ULONG fDesktopMenu:1;
435     ULONG iDropDir:5;
436     ULONG fUseMonitorRect:1;
437     struct _WND *spwndNotify;
438     struct _WND *spwndPopupMenu;
439     struct _WND *spwndNextPopup;
440     struct _WND *spwndPrevPopup;
441     PMENU spmenu;
442     PMENU spmenuAlternate;
443     struct _WND *spwndActivePopup;
444     struct tagPOPUPMENU *ppopupmenuRoot;
445     struct tagPOPUPMENU *ppmDelayedFree;
446     UINT posSelectedItem;
447     UINT posDropped;
448 } POPUPMENU, *PPOPUPMENU;
449 
450 typedef struct _REGISTER_SYSCLASS
451 {
452     /* This is a reactos specific class used to initialize the
453        system window classes during user32 initialization */
454     PWSTR ClassName;
455     UINT Style;
456     WNDPROC ProcW;
457     UINT ExtraBytes;
458     HICON hCursor;
459     HBRUSH hBrush;
460     WORD fiId;
461     WORD iCls;
462 } REGISTER_SYSCLASS, *PREGISTER_SYSCLASS;
463 
464 typedef struct _CLSMENUNAME
465 {
466     LPSTR pszClientAnsiMenuName;
467     LPWSTR pwszClientUnicodeMenuName;
468     PUNICODE_STRING pusMenuName;
469 } CLSMENUNAME, *PCLSMENUNAME;
470 
471 typedef struct tagSBDATA
472 {
473     INT posMin;
474     INT posMax;
475     INT page;
476     INT pos;
477 } SBDATA, *PSBDATA;
478 
479 typedef struct tagSBINFO
480 {
481     INT WSBflags;
482     SBDATA Horz;
483     SBDATA Vert;
484 } SBINFO, *PSBINFO;
485 
486 typedef struct tagSBCALC
487 {
488     INT posMin;
489     INT posMax;
490     INT page;
491     INT pos;
492     INT pxTop;
493     INT pxBottom;
494     INT pxLeft;
495     INT pxRight;
496     INT cpxThumb;
497     INT pxUpArrow;
498     INT pxDownArrow;
499     INT pxStart;
500     INT pxThumbBottom;
501     INT pxThumbTop;
502     INT cpx;
503     INT pxMin;
504 } SBCALC, *PSBCALC;
505 
506 typedef enum _GETCPD
507 {
508     UserGetCPDA2U = 0x01, /* " Unicode " */
509     UserGetCPDU2A = 0X02, /* " Ansi " */
510     UserGetCPDClass = 0X10,
511     UserGetCPDWindow = 0X20,
512     UserGetCPDDialog = 0X40,
513     UserGetCPDWndtoCls = 0X80
514 } GETCPD, *PGETCPD;
515 
516 typedef struct _CALLPROCDATA
517 {
518     PROCDESKHEAD head;
519     struct _CALLPROCDATA *spcpdNext;
520     WNDPROC pfnClientPrevious;
521     GETCPD wType;
522 } CALLPROCDATA, *PCALLPROCDATA;
523 
524 #define CSF_SERVERSIDEPROC  0x0001
525 #define CSF_ANSIPROC        0x0002
526 #define CSF_WOWDEFERDESTROY 0x0004
527 #define CSF_SYSTEMCLASS     0x0008
528 #define CSF_WOWCLASS        0x0010
529 #define CSF_WOWEXTRA        0x0020
530 #define CSF_CACHEDSMICON    0x0040
531 #define CSF_WIN40COMPAT     0x0080
532 
533 typedef struct _CLS
534 {
535     struct _CLS *pclsNext;
536     RTL_ATOM atomClassName;
537     ATOM atomNVClassName;
538     DWORD fnid;
539     struct _DESKTOP *rpdeskParent;
540     PVOID pdce;
541     DWORD CSF_flags;
542     PSTR  lpszClientAnsiMenuName; /* For client use */
543     PWSTR lpszClientUnicodeMenuName; /* "   "      " */
544     PCALLPROCDATA spcpdFirst;
545     struct _CLS *pclsBase;
546     struct _CLS *pclsClone;
547     ULONG cWndReferenceCount;
548     UINT style;
549     WNDPROC lpfnWndProc;
550     INT cbclsExtra;
551     INT cbwndExtra;
552     HINSTANCE hModule;
553     struct _CURICON_OBJECT *spicn;
554     struct _CURICON_OBJECT *spcur;
555     HBRUSH hbrBackground;
556     PWSTR lpszMenuName; /* kernel use */
557     PSTR lpszAnsiClassName; /* " */
558     struct _CURICON_OBJECT *spicnSm;
559     ////
560     UINT Unicode:1; // !CSF_ANSIPROC
561     UINT Global:1; // CS_GLOBALCLASS or CSF_SERVERSIDEPROC
562     UINT MenuNameIsString:1;
563     UINT NotUsed:29;
564 } CLS, *PCLS;
565 
566 typedef struct _SBINFOEX
567 {
568     SCROLLBARINFO ScrollBarInfo;
569     SCROLLINFO ScrollInfo;
570 } SBINFOEX, *PSBINFOEX;
571 
572 /* State Flags !Not Implemented! */
573 #define WNDS_HASMENU                 0X00000001
574 #define WNDS_HASVERTICALSCROOLLBAR   0X00000002
575 #define WNDS_HASHORIZONTALSCROLLBAR  0X00000004
576 #define WNDS_HASCAPTION              0X00000008
577 #define WNDS_SENDSIZEMOVEMSGS        0X00000010
578 #define WNDS_MSGBOX                  0X00000020
579 #define WNDS_ACTIVEFRAME             0X00000040
580 #define WNDS_HASSPB                  0X00000080
581 #define WNDS_NONCPAINT               0X00000100
582 #define WNDS_SENDERASEBACKGROUND     0X00000200
583 #define WNDS_ERASEBACKGROUND         0X00000400
584 #define WNDS_SENDNCPAINT             0X00000800
585 #define WNDS_INTERNALPAINT           0X00001000
586 #define WNDS_UPDATEDIRTY             0X00002000
587 #define WNDS_HIDDENPOPUP             0X00004000
588 #define WNDS_FORCEMENUDRAW           0X00008000
589 #define WNDS_DIALOGWINDOW            0X00010000
590 #define WNDS_HASCREATESTRUCTNAME     0X00020000
591 #define WNDS_SERVERSIDEWINDOWPROC    0x00040000 /* Call proc inside win32k. */
592 #define WNDS_ANSIWINDOWPROC          0x00080000
593 #define WNDS_BEINGACTIVATED          0x00100000
594 #define WNDS_HASPALETTE              0x00200000
595 #define WNDS_PAINTNOTPROCESSED       0x00400000
596 #define WNDS_SYNCPAINTPENDING        0x00800000
597 #define WNDS_RECEIVEDQUERYSUSPENDMSG 0x01000000
598 #define WNDS_RECEIVEDSUSPENDMSG      0x02000000
599 #define WNDS_TOGGLETOPMOST           0x04000000
600 #define WNDS_REDRAWIFHUNG            0x08000000
601 #define WNDS_REDRAWFRAMEIFHUNG       0x10000000
602 #define WNDS_ANSICREATOR             0x20000000
603 #define WNDS_MAXIMIZESTOMONITOR      0x40000000
604 #define WNDS_DESTROYED               0x80000000
605 
606 #define WNDSACTIVEFRAME              0x00000006
607 
608 /* State2 Flags !Not Implemented! */
609 #define WNDS2_WMPAINTSENT               0X00000001
610 #define WNDS2_ENDPAINTINVALIDATE        0X00000002
611 #define WNDS2_STARTPAINT                0X00000004
612 #define WNDS2_OLDUI                     0X00000008
613 #define WNDS2_HASCLIENTEDGE             0X00000010
614 #define WNDS2_BOTTOMMOST                0X00000020
615 #define WNDS2_FULLSCREEN                0X00000040
616 #define WNDS2_INDESTROY                 0X00000080
617 #define WNDS2_WIN31COMPAT               0X00000100
618 #define WNDS2_WIN40COMPAT               0X00000200
619 #define WNDS2_WIN50COMPAT               0X00000400
620 #define WNDS2_MAXIMIZEDMONITORREGION    0X00000800
621 #define WNDS2_CLOSEBUTTONDOWN           0X00001000
622 #define WNDS2_MAXIMIZEBUTTONDOWN        0X00002000
623 #define WNDS2_MINIMIZEBUTTONDOWN        0X00004000
624 #define WNDS2_HELPBUTTONDOWN            0X00008000
625 #define WNDS2_SCROLLBARLINEUPBTNDOWN    0X00010000
626 #define WNDS2_SCROLLBARPAGEUPBTNDOWN    0X00020000
627 #define WNDS2_SCROLLBARPAGEDOWNBTNDOWN  0X00040000
628 #define WNDS2_SCROLLBARLINEDOWNBTNDOWN  0X00080000
629 #define WNDS2_ANYSCROLLBUTTONDOWN       0X00100000
630 #define WNDS2_SCROLLBARVERTICALTRACKING 0X00200000
631 #define WNDS2_FORCENCPAINT              0X00400000
632 #define WNDS2_FORCEFULLNCPAINTCLIPRGN   0X00800000
633 #define WNDS2_FULLSCREENMODE            0X01000000
634 #define WNDS2_CAPTIONTEXTTRUNCATED      0X08000000
635 #define WNDS2_NOMINMAXANIMATERECTS      0X10000000
636 #define WNDS2_SMALLICONFROMWMQUERYDRAG  0X20000000
637 #define WNDS2_SHELLHOOKREGISTERED       0X40000000
638 #define WNDS2_WMCREATEMSGPROCESSED      0X80000000
639 
640 /* ExStyles2 */
641 #define WS_EX2_CLIPBOARDLISTENER        0X00000001
642 #define WS_EX2_LAYEREDINVALIDATE        0X00000002
643 #define WS_EX2_REDIRECTEDFORPRINT       0X00000004
644 #define WS_EX2_LINKED                   0X00000008
645 #define WS_EX2_LAYEREDFORDWM            0X00000010
646 #define WS_EX2_LAYEREDLIMBO             0X00000020
647 #define WS_EX2_HIGHTDPI_UNAWAR          0X00000040
648 #define WS_EX2_VERTICALLYMAXIMIZEDLEFT  0X00000080
649 #define WS_EX2_VERTICALLYMAXIMIZEDRIGHT 0X00000100
650 #define WS_EX2_HASOVERLAY               0X00000200
651 #define WS_EX2_CONSOLEWINDOW            0X00000400
652 #define WS_EX2_CHILDNOACTIVATE          0X00000800
653 
654 #define WPF_MININIT 0x0008
655 #define WPF_MAXINIT 0x0010
656 
657 typedef struct _WND
658 {
659     THRDESKHEAD head;
660 #if 0
661     WW ww;
662 #else
663     /* These fields should be moved in the WW at some point. */
664     /* Plese do not change them to keep the same layout with WW. */
665     DWORD state;
666     DWORD state2;
667     /* Extended style. */
668     DWORD ExStyle;
669     /* Style. */
670     DWORD style;
671     /* Handle of the module that created the window. */
672     HINSTANCE hModule;
673     DWORD fnid;
674 #endif
675     struct _WND *spwndNext;
676     struct _WND *spwndPrev;
677     struct _WND *spwndParent;
678     struct _WND *spwndChild;
679     struct _WND *spwndOwner;
680     RECT rcWindow;
681     RECT rcClient;
682     WNDPROC lpfnWndProc;
683     /* Pointer to the window class. */
684     PCLS pcls;
685     HRGN hrgnUpdate;
686     /* Property list head.*/
687     LIST_ENTRY PropListHead;
688     ULONG PropListItems;
689     /* Scrollbar info */
690     PSBINFO pSBInfo;
691     /* system menu handle. */
692     HMENU SystemMenu;
693     //PMENU spmenuSys;
694     /* Window menu handle or window id */
695     UINT_PTR IDMenu; // Use spmenu
696     //PMENU spmenu;
697     HRGN hrgnClip;
698     HRGN hrgnNewFrame;
699     /* Window name. */
700     LARGE_UNICODE_STRING strName;
701     /* Size of the extra data associated with the window. */
702     ULONG cbwndExtra;
703     struct _WND *spwndLastActive;
704     HIMC hImc; // Input context associated with this window.
705     LONG_PTR dwUserData;
706     PVOID pActCtx;
707     //PD3DMATRIX pTransForm;
708     struct _WND *spwndClipboardListener;
709     DWORD ExStyle2;
710 
711     /* ReactOS */
712     struct
713     {
714         RECT NormalRect;
715         POINT IconPos;
716         POINT MaxPos;
717         UINT flags; /* WPF_ flags. */
718     } InternalPos;
719 
720     UINT Unicode:1; /* !(WNDS_ANSICREATOR|WNDS_ANSIWINDOWPROC) ? */
721     UINT InternalPosInitialized:1;
722     UINT HideFocus:1; /* WS_EX_UISTATEFOCUSRECTHIDDEN ? */
723     UINT HideAccel:1; /* WS_EX_UISTATEKBACCELHIDDEN ? */
724 
725     /* Scrollbar info */
726     PSBINFOEX pSBInfoex; // convert to PSBINFO
727     /* Entry in the list of thread windows. */
728     LIST_ENTRY ThreadListEntry;
729 } WND, *PWND;
730 
731 #define PWND_BOTTOM ((PWND)1)
732 
733 typedef struct _SBWND
734 {
735     WND wnd;
736     BOOL fVert;
737     UINT wDisableFlags;
738     SBCALC SBCalc;
739 } SBWND, *PSBWND;
740 
741 typedef struct _MDIWND
742 {
743   WND wnd;
744   DWORD dwReserved;
745   PVOID pmdi;
746 } MDIWND, *PMDIWND;
747 
748 #define GWLP_MDIWND 4
749 
750 typedef struct _MENUWND
751 {
752     WND wnd;
753     PPOPUPMENU ppopupmenu;
754 } MENUWND, *PMENUWND;
755 
756 typedef struct _PFNCLIENT
757 {
758     WNDPROC pfnScrollBarWndProc;
759     WNDPROC pfnTitleWndProc;
760     WNDPROC pfnMenuWndProc;
761     WNDPROC pfnDesktopWndProc;
762     WNDPROC pfnDefWindowProc;
763     WNDPROC pfnMessageWindowProc;
764     WNDPROC pfnSwitchWindowProc;
765     WNDPROC pfnButtonWndProc;
766     WNDPROC pfnComboBoxWndProc;
767     WNDPROC pfnComboListBoxProc;
768     WNDPROC pfnDialogWndProc;
769     WNDPROC pfnEditWndProc;
770     WNDPROC pfnListBoxWndProc;
771     WNDPROC pfnMDIClientWndProc;
772     WNDPROC pfnStaticWndProc;
773     WNDPROC pfnImeWndProc;
774     WNDPROC pfnGhostWndProc;
775     WNDPROC pfnHkINLPCWPSTRUCT;
776     WNDPROC pfnHkINLPCWPRETSTRUCT;
777     WNDPROC pfnDispatchHook;
778     WNDPROC pfnDispatchDefWindowProc;
779     WNDPROC pfnDispatchMessage;
780     WNDPROC pfnMDIActivateDlgProc;
781 } PFNCLIENT, *PPFNCLIENT;
782 
783 /*
784   Wine Common proc ( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL Unicode );
785   Windows uses Ansi == TRUE, Wine uses Unicode == TRUE.
786  */
787 
788 typedef LRESULT
789 (CALLBACK *WNDPROC_EX)(
790     HWND,
791     UINT,
792     WPARAM,
793     LPARAM,
794     BOOL);
795 
796 typedef struct _PFNCLIENTWORKER
797 {
798     WNDPROC_EX pfnButtonWndProc;
799     WNDPROC_EX pfnComboBoxWndProc;
800     WNDPROC_EX pfnComboListBoxProc;
801     WNDPROC_EX pfnDialogWndProc;
802     WNDPROC_EX pfnEditWndProc;
803     WNDPROC_EX pfnListBoxWndProc;
804     WNDPROC_EX pfnMDIClientWndProc;
805     WNDPROC_EX pfnStaticWndProc;
806     WNDPROC_EX pfnImeWndProc;
807     WNDPROC_EX pfnGhostWndProc;
808     WNDPROC_EX pfnCtfHookProc;
809 } PFNCLIENTWORKER, *PPFNCLIENTWORKER;
810 
811 typedef LONG_PTR
812 (NTAPI *PFN_FNID)(
813     PWND,
814     UINT,
815     WPARAM,
816     LPARAM,
817     ULONG_PTR);
818 
819 /* FNID's for NtUserSetWindowFNID, NtUserMessageCall */
820 #define FNID_FIRST                  0x029A
821 #define FNID_SCROLLBAR              0x029A
822 #define FNID_ICONTITLE              0x029B
823 #define FNID_MENU                   0x029C
824 #define FNID_DESKTOP                0x029D
825 #define FNID_DEFWINDOWPROC          0x029E
826 #define FNID_MESSAGEWND             0x029F
827 #define FNID_SWITCH                 0x02A0
828 #define FNID_BUTTON                 0x02A1
829 #define FNID_COMBOBOX               0x02A2
830 #define FNID_COMBOLBOX              0x02A3
831 #define FNID_DIALOG                 0x02A4
832 #define FNID_EDIT                   0x02A5
833 #define FNID_LISTBOX                0x02A6
834 #define FNID_MDICLIENT              0x02A7
835 #define FNID_STATIC                 0x02A8
836 #define FNID_IME                    0x02A9
837 #define FNID_GHOST                  0x02AA
838 #define FNID_CALLWNDPROC            0x02AB
839 #define FNID_CALLWNDPROCRET         0x02AC
840 #define FNID_HKINLPCWPEXSTRUCT      0x02AD
841 #define FNID_HKINLPCWPRETEXSTRUCT   0x02AE
842 #define FNID_MB_DLGPROC             0x02AF
843 #define FNID_MDIACTIVATEDLGPROC     0x02B0
844 #define FNID_SENDMESSAGE            0x02B1
845 #define FNID_SENDMESSAGEFF          0x02B2
846 /* Kernel has option to use TimeOut or normal msg send, based on type of msg. */
847 #define FNID_SENDMESSAGEWTOOPTION   0x02B3
848 #define FNID_SENDMESSAGECALLPROC    0x02B4
849 #define FNID_BROADCASTSYSTEMMESSAGE 0x02B5
850 #define FNID_TOOLTIPS               0x02B6
851 #define FNID_SENDNOTIFYMESSAGE      0x02B7
852 #define FNID_SENDMESSAGECALLBACK    0x02B8
853 #define FNID_LAST                   0x02B9
854 
855 #define FNID_NUM FNID_LAST - FNID_FIRST + 1
856 #define FNID_NUMSERVERPROC FNID_SWITCH - FNID_FIRST + 1
857 
858 #define FNID_DDEML   0x2000 /* Registers DDEML */
859 #define FNID_DESTROY 0x4000 /* This is sent when WM_NCDESTROY or in the support routine. */
860                             /* Seen during WM_CREATE on error exit too. */
861 #define FNID_FREED   0x8000 /* Window being Freed... */
862 
863 #define ICLASS_TO_MASK(iCls) (1 << ((iCls)))
864 
865 #define GETPFNCLIENTA(fnid) \
866  (WNDPROC)(*(((ULONG_PTR *)&gpsi->apfnClientA) + (fnid - FNID_FIRST)))
867 #define GETPFNCLIENTW(fnid) \
868  (WNDPROC)(*(((ULONG_PTR *)&gpsi->apfnClientW) + (fnid - FNID_FIRST)))
869 
870 #define GETPFNSERVER(fnid) gpsi->aStoCidPfn[fnid - FNID_FIRST]
871 
872 /* ICLS's for NtUserGetClassName FNID to ICLS, NtUserInitializeClientPfnArrays */
873 #define ICLS_BUTTON       0
874 #define ICLS_EDIT         1
875 #define ICLS_STATIC       2
876 #define ICLS_LISTBOX      3
877 #define ICLS_SCROLLBAR    4
878 #define ICLS_COMBOBOX     5
879 #define ICLS_MDICLIENT    6
880 #define ICLS_COMBOLBOX    7
881 #define ICLS_DDEMLEVENT   8
882 #define ICLS_DDEMLMOTHER  9
883 #define ICLS_DDEML16BIT   10
884 #define ICLS_DDEMLCLIENTA 11
885 #define ICLS_DDEMLCLIENTW 12
886 #define ICLS_DDEMLSERVERA 13
887 #define ICLS_DDEMLSERVERW 14
888 #define ICLS_IME          15
889 #define ICLS_GHOST        16
890 #define ICLS_DESKTOP      17
891 #define ICLS_DIALOG       18
892 #define ICLS_MENU         19
893 #define ICLS_SWITCH       20
894 #define ICLS_ICONTITLE    21
895 #define ICLS_TOOLTIPS     22
896 #if (_WIN32_WINNT <= 0x0501)
897 #define ICLS_UNKNOWN      22
898 #define ICLS_NOTUSED      23
899 #else
900 #define ICLS_SYSSHADOW    23
901 #define ICLS_HWNDMESSAGE  24
902 #define ICLS_NOTUSED      25
903 #endif
904 #define ICLS_END          31
905 
906 #define COLOR_LAST COLOR_MENUBAR
907 #define MAX_MB_STRINGS 11
908 
909 #define SRVINFO_DBCSENABLED 0x0002
910 #define SRVINFO_IMM32       0x0004
911 #define SRVINFO_APIHOOK     0x0010
912 #define SRVINFO_METRICS     0x0020
913 #define SRVINFO_KBDPREF     0x0080
914 
915 #define NUM_SYSCOLORS 31
916 
917 typedef struct tagOEMBITMAPINFO
918 {
919     INT x;
920     INT y;
921     INT cx;
922     INT cy;
923 } OEMBITMAPINFO, *POEMBITMAPINFO;
924 
925 typedef enum _OBI_TYPES
926 {
927     OBI_CLOSE = 0,
928     OBI_UPARROW = 46,
929     OBI_UPARROWI = 49,
930     OBI_DNARROW = 50,
931     OBI_DNARROWI = 53,
932     OBI_MNARROW = 62,
933     OBI_CTYPES = 93
934 } OBI_TYPES;
935 
936 typedef struct tagMBSTRING
937 {
938     WCHAR szName[16];
939     UINT uID;
940     UINT uStr;
941 } MBSTRING, *PMBSTRING;
942 
943 typedef struct tagDPISERVERINFO
944 {
945     INT gclBorder;      /* 000 */
946     HFONT hCaptionFont; /* 004 */
947     HFONT hMsgFont;     /* 008 */
948     INT cxMsgFontChar;  /* 00C */
949     INT cyMsgFontChar;  /* 010 */
950     UINT wMaxBtnSize;   /* 014 */
951 } DPISERVERINFO, *PDPISERVERINFO;
952 
953 /* PUSIFlags: */
954 #define PUSIF_PALETTEDISPLAY         0x01
955 #define PUSIF_SNAPTO                 0x02
956 #define PUSIF_COMBOBOXANIMATION      0x04
957 #define PUSIF_LISTBOXSMOOTHSCROLLING 0x08
958 #define PUSIF_KEYBOARDCUES           0x20
959 
960 typedef struct _PERUSERSERVERINFO
961 {
962     INT aiSysMet[SM_CMETRICS];
963     ULONG argbSystemUnmatched[NUM_SYSCOLORS];
964     COLORREF argbSystem[NUM_SYSCOLORS];
965     HBRUSH ahbrSystem[NUM_SYSCOLORS];
966     HBRUSH hbrGray;
967     POINT ptCursor;
968     POINT ptCursorReal;
969     DWORD dwLastRITEventTickCount;
970     INT nEvents;
971     UINT dtScroll;
972     UINT dtLBSearch;
973     UINT dtCaretBlink;
974     UINT ucWheelScrollLines;
975     UINT ucWheelScrollChars;
976     INT wMaxLeftOverlapChars;
977     INT wMaxRightOverlapChars;
978     INT cxSysFontChar;
979     INT cySysFontChar;
980     TEXTMETRICW tmSysFont;
981     DPISERVERINFO dpiSystem;
982     HICON hIconSmWindows;
983     HICON hIconWindows;
984     DWORD dwKeyCache;
985     DWORD dwAsyncKeyCache;
986     ULONG cCaptures;
987     OEMBITMAPINFO oembmi[OBI_CTYPES];
988     RECT rcScreenReal;
989     USHORT BitCount;
990     USHORT dmLogPixels;
991     BYTE Planes;
992     BYTE BitsPixel;
993     ULONG PUSIFlags;
994     UINT uCaretWidth;
995     USHORT UILangID;
996     DWORD dwLastSystemRITEventTickCountUpdate;
997     ULONG adwDBGTAGFlags[35];
998     DWORD dwTagCount;
999     DWORD dwRIPFlags;
1000 } PERUSERSERVERINFO, *PPERUSERSERVERINFO;
1001 
1002 typedef struct tagSERVERINFO
1003 {
1004     DWORD dwSRVIFlags;
1005     ULONG_PTR cHandleEntries;
1006     PFN_FNID mpFnidPfn[FNID_NUM];
1007     WNDPROC aStoCidPfn[FNID_NUMSERVERPROC];
1008     USHORT mpFnid_serverCBWndProc[FNID_NUM];
1009     PFNCLIENT apfnClientA;
1010     PFNCLIENT apfnClientW;
1011     PFNCLIENTWORKER apfnClientWorker;
1012     ULONG cbHandleTable;
1013     ATOM atomSysClass[ICLS_NOTUSED+1];
1014     DWORD dwDefaultHeapBase;
1015     DWORD dwDefaultHeapSize;
1016     UINT uiShellMsg;
1017     MBSTRING MBStrings[MAX_MB_STRINGS];
1018     ATOM atomIconSmProp;
1019     ATOM atomIconProp;
1020     ATOM atomContextHelpIdProp;
1021     ATOM atomFrostedWindowProp;
1022     CHAR acOemToAnsi[256];
1023     CHAR acAnsiToOem[256];
1024     DWORD dwInstalledEventHooks;
1025     PERUSERSERVERINFO;
1026 } SERVERINFO, *PSERVERINFO;
1027 
1028 #ifdef _M_IX86
1029 C_ASSERT(sizeof(SERVERINFO) <= PAGE_SIZE);
1030 #endif
1031 
1032 
1033 /* Server event activity bits. */
1034 #define SRV_EVENT_MENU            0x0001
1035 #define SRV_EVENT_END_APPLICATION 0x0002
1036 #define SRV_EVENT_RUNNING         0x0004
1037 #define SRV_EVENT_NAMECHANGE      0x0008
1038 #define SRV_EVENT_VALUECHANGE     0x0010
1039 #define SRV_EVENT_STATECHANGE     0x0020
1040 #define SRV_EVENT_LOCATIONCHANGE  0x0040
1041 #define SRV_EVENT_CREATE          0x8000
1042 
1043 typedef struct _PROPLISTITEM
1044 {
1045     ATOM Atom;
1046     HANDLE Data;
1047 } PROPLISTITEM, *PPROPLISTITEM;
1048 
1049 #define PROPERTY_FLAG_SYSTEM 1
1050 
1051 typedef struct _PROPERTY
1052 {
1053     LIST_ENTRY PropListEntry;
1054     HANDLE Data;
1055     ATOM Atom;
1056     WORD fs;
1057 } PROPERTY, *PPROPERTY;
1058 
1059 typedef struct _BROADCASTPARM
1060 {
1061     DWORD flags;
1062     DWORD recipients;
1063     HDESK hDesk;
1064     HWND hWnd;
1065     LUID luid;
1066 } BROADCASTPARM, *PBROADCASTPARM;
1067 
1068 struct _THREADINFO *GetW32ThreadInfo(VOID);
1069 struct _PROCESSINFO *GetW32ProcessInfo(VOID);
1070 
1071 typedef struct _WNDMSG
1072 {
1073     DWORD maxMsgs;
1074     PINT abMsgs;
1075 } WNDMSG, *PWNDMSG;
1076 
1077 typedef struct _SHAREDINFO
1078 {
1079     PSERVERINFO psi; /* global Server Info */
1080     PVOID aheList; /* Handle Entry List */
1081     PVOID pDispInfo; /* global PDISPLAYINFO pointer */
1082     ULONG_PTR ulSharedDelta; /* Heap delta */
1083     WNDMSG awmControl[FNID_LAST - FNID_FIRST];
1084     WNDMSG DefWindowMsgs;
1085     WNDMSG DefWindowSpecMsgs;
1086 } SHAREDINFO, *PSHAREDINFO;
1087 
1088 /* See also the USERSRV_API_CONNECTINFO #define in include/reactos/subsys/win/winmsg.h */
1089 typedef struct _USERCONNECT
1090 {
1091     ULONG ulVersion;
1092     ULONG ulCurrentVersion;
1093     DWORD dwDispatchCount;
1094     SHAREDINFO siClient;
1095 } USERCONNECT, *PUSERCONNECT;
1096 
1097 /* WinNT 5.0 compatible user32 / win32k */
1098 #define USER_VERSION MAKELONG(0x0000, 0x0005)
1099 
1100 #if defined(_M_IX86)
1101 C_ASSERT(sizeof(USERCONNECT) == 0x124);
1102 #endif
1103 
1104 typedef struct tagGETCLIPBDATA
1105 {
1106     UINT uFmtRet;
1107     BOOL fGlobalHandle;
1108     union
1109     {
1110         HANDLE hLocale;
1111         HANDLE hPalette;
1112     };
1113 } GETCLIPBDATA, *PGETCLIPBDATA;
1114 
1115 typedef struct tagSETCLIPBDATA
1116 {
1117     BOOL fGlobalHandle;
1118     BOOL fIncSerialNumber;
1119 } SETCLIPBDATA, *PSETCLIPBDATA;
1120 
1121 /* Used with NtUserSetCursorIconData, last parameter. */
1122 typedef struct tagCURSORDATA
1123 {
1124     LPWSTR lpName;
1125     LPWSTR lpModName;
1126     USHORT rt;
1127     USHORT dummy;
1128     ULONG CURSORF_flags;
1129     SHORT xHotspot;
1130     SHORT yHotspot;
1131     HBITMAP hbmMask;
1132     HBITMAP hbmColor;
1133     HBITMAP hbmAlpha;
1134     RECT rcBounds;
1135     HBITMAP hbmUserAlpha; /* Could be in W7U, not in W2k */
1136     ULONG bpp;
1137     ULONG cx;
1138     ULONG cy;
1139     UINT cpcur;
1140     UINT cicur;
1141     struct tagCURSORDATA *aspcur;
1142     DWORD *aicur;
1143     INT *ajifRate;
1144     UINT iicur;
1145 } CURSORDATA, *PCURSORDATA; /* !dso CURSORDATA */
1146 
1147 /* CURSORF_flags: */
1148 #define CURSORF_FROMRESOURCE 0x0001
1149 #define CURSORF_GLOBAL       0x0002
1150 #define CURSORF_LRSHARED     0x0004
1151 #define CURSORF_ACON         0x0008
1152 #define CURSORF_WOWCLEANUP   0x0010
1153 #define CURSORF_ACONFRAME    0x0040
1154 #define CURSORF_SECRET       0x0080
1155 #define CURSORF_LINKED       0x0100
1156 #define CURSORF_CURRENT      0x0200
1157 
1158 typedef struct tagIMEINFOEX
1159 {
1160     HKL hkl;
1161     IMEINFO ImeInfo;
1162     WCHAR wszUIClass[16];
1163     ULONG fdwInitConvMode;
1164     INT fInitOpen;
1165     INT fLoadFlag;
1166     DWORD dwProdVersion;
1167     DWORD dwImeWinVersion;
1168     WCHAR wszImeDescription[50];
1169     WCHAR wszImeFile[80];
1170     struct
1171     {
1172         INT fSysWow64Only:1;
1173         INT fCUASLayer:1;
1174     };
1175 } IMEINFOEX, *PIMEINFOEX;
1176 
1177 typedef struct tagIMEUI
1178 {
1179     PWND spwnd;
1180     HIMC hIMC;
1181     HWND hwndIMC;
1182     HKL hKL;
1183     HWND hwndUI;
1184     INT nCntInIMEProc;
1185     struct {
1186         UINT fShowStatus:1;
1187         UINT fActivate:1;
1188         UINT fDestroy:1;
1189         UINT fDefault:1;
1190         UINT fChildThreadDef:1;
1191         UINT fCtrlShowStatus:1;
1192         UINT fFreeActiveEvent:1;
1193     };
1194 } IMEUI, *PIMEUI;
1195 
1196 /* Window Extra data container. */
1197 typedef struct _IMEWND
1198 {
1199     WND;
1200     PIMEUI pimeui;
1201 } IMEWND, *PIMEWND;
1202 
1203 DWORD
1204 NTAPI
1205 NtUserAssociateInputContext(
1206     DWORD dwUnknown1,
1207     DWORD dwUnknown2,
1208     DWORD dwUnknown3);
1209 
1210 DWORD
1211 NTAPI
1212 NtUserBuildHimcList(
1213     DWORD dwUnknown1,
1214     DWORD dwUnknown2,
1215     DWORD dwUnknown3,
1216     DWORD dwUnknown4);
1217 
1218 DWORD
1219 NTAPI
1220 NtUserCalcMenuBar(
1221     HWND   hwnd,
1222     DWORD  x,
1223     DWORD  width,
1224     DWORD  y,
1225     LPRECT prc);
1226 
1227 DWORD
1228 NTAPI
1229 NtUserCheckMenuItem(
1230     HMENU hmenu,
1231     UINT uIDCheckItem,
1232     UINT uCheck);
1233 
1234 DWORD
1235 NTAPI
1236 NtUserCtxDisplayIOCtl(
1237     DWORD dwUnknown1,
1238     DWORD dwUnknown2,
1239     DWORD dwUnknown3);
1240 
1241 DWORD
1242 APIENTRY
1243 NtUserDbgWin32HeapFail(
1244     DWORD Unknown0,
1245     DWORD Unknown1);
1246 
1247 DWORD
1248 APIENTRY
1249 NtUserDbgWin32HeapStat(
1250     DWORD Unknown0,
1251     DWORD Unknown1);
1252 
1253 BOOL
1254 NTAPI
1255 NtUserDeleteMenu(
1256     HMENU hMenu,
1257     UINT uPosition,
1258     UINT uFlags);
1259 
1260 BOOL
1261 NTAPI
1262 NtUserDestroyMenu(
1263     HMENU hMenu);
1264 
1265 DWORD
1266 NTAPI
1267 NtUserDrawMenuBarTemp(
1268     HWND hWnd,
1269     HDC hDC,
1270     PRECT hRect,
1271     HMENU hMenu,
1272     HFONT hFont);
1273 
1274 UINT
1275 NTAPI
1276 NtUserEnableMenuItem(
1277     HMENU hMenu,
1278     UINT uIDEnableItem,
1279     UINT uEnable);
1280 
1281 BOOL
1282 NTAPI
1283 NtUserEndMenu(VOID);
1284 
1285 BOOL
1286 NTAPI
1287 NtUserGetMenuBarInfo(
1288     HWND hwnd,
1289     LONG idObject,
1290     LONG idItem,
1291     PMENUBARINFO pmbi);
1292 
1293 UINT
1294 NTAPI
1295 NtUserGetMenuIndex(
1296     HMENU hMenu,
1297     HMENU hSubMenu);
1298 
1299 BOOL
1300 NTAPI
1301 NtUserGetMenuItemRect(
1302     HWND hWnd,
1303     HMENU hMenu,
1304     UINT uItem,
1305     LPRECT lprcItem);
1306 
1307 HMENU
1308 NTAPI
1309 NtUserGetSystemMenu(
1310     HWND hWnd,
1311     BOOL bRevert);
1312 
1313 BOOL
1314 NTAPI
1315 NtUserHiliteMenuItem(
1316     HWND hWnd,
1317     HMENU hMenu,
1318     UINT uItemHilite,
1319     UINT uHilite);
1320 
1321 int
1322 NTAPI
1323 NtUserMenuItemFromPoint(
1324     HWND hWnd,
1325     HMENU hMenu,
1326     DWORD X,
1327     DWORD Y);
1328 
1329 BOOL
1330 NTAPI
1331 NtUserRemoveMenu(
1332     HMENU hMenu,
1333     UINT uPosition,
1334     UINT uFlags);
1335 
1336 BOOL
1337 NTAPI
1338 NtUserSetMenu(
1339     HWND hWnd,
1340     HMENU hMenu,
1341     BOOL bRepaint);
1342 
1343 BOOL
1344 NTAPI
1345 NtUserSetMenuContextHelpId(
1346     HMENU hmenu,
1347     DWORD dwContextHelpId);
1348 
1349 BOOL
1350 NTAPI
1351 NtUserSetMenuDefaultItem(
1352     HMENU hMenu,
1353     UINT uItem,
1354     UINT fByPos);
1355 
1356 BOOL
1357 NTAPI
1358 NtUserSetMenuFlagRtoL(
1359     HMENU hMenu);
1360 
1361 BOOL
1362 NTAPI
1363 NtUserSetSystemMenu(
1364     HWND hWnd,
1365     HMENU hMenu);
1366 
1367 BOOL
1368 NTAPI
1369 NtUserThunkedMenuInfo(
1370     HMENU hMenu,
1371     LPCMENUINFO lpcmi);
1372 
1373 BOOL
1374 NTAPI
1375 NtUserThunkedMenuItemInfo(
1376     HMENU hMenu,
1377     UINT uItem,
1378     BOOL fByPosition,
1379     BOOL bInsert,
1380     LPMENUITEMINFOW lpmii,
1381     PUNICODE_STRING lpszCaption);
1382 
1383 BOOL
1384 NTAPI
1385 NtUserTrackPopupMenuEx(
1386     HMENU hmenu,
1387     UINT fuFlags,
1388     int x,
1389     int y,
1390     HWND hwnd,
1391     LPTPMPARAMS lptpm);
1392 
1393 HKL
1394 NTAPI
1395 NtUserActivateKeyboardLayout(
1396     HKL hKl,
1397     ULONG Flags);
1398 
1399 DWORD
1400 NTAPI
1401 NtUserAlterWindowStyle(
1402     HWND hWnd,
1403     DWORD Index,
1404     LONG NewValue);
1405 
1406 BOOL
1407 NTAPI
1408 NtUserAttachThreadInput(
1409     IN DWORD idAttach,
1410     IN DWORD idAttachTo,
1411     IN BOOL fAttach);
1412 
1413 HDC NTAPI
1414 NtUserBeginPaint(
1415     HWND hWnd,
1416     PAINTSTRUCT *lPs);
1417 
1418 BOOL
1419 NTAPI
1420 NtUserBitBltSysBmp(
1421     HDC hdc,
1422     INT nXDest,
1423     INT nYDest,
1424     INT nWidth,
1425     INT nHeight,
1426     INT nXSrc,
1427     INT nYSrc,
1428     DWORD dwRop);
1429 
1430 BOOL
1431 NTAPI
1432 NtUserBlockInput(
1433     BOOL BlockIt);
1434 
1435 NTSTATUS
1436 NTAPI
1437 NtUserBuildHwndList(
1438     HDESK hDesktop,
1439     HWND hwndParent,
1440     BOOLEAN bChildren,
1441     ULONG dwThreadId,
1442     ULONG lParam,
1443     HWND *pWnd,
1444     ULONG *pBufSize);
1445 
1446 NTSTATUS
1447 NTAPI
1448 NtUserBuildNameList(
1449     HWINSTA hWinSta,
1450     ULONG dwSize,
1451     PVOID lpBuffer,
1452     PULONG pRequiredSize);
1453 
1454 NTSTATUS
1455 NTAPI
1456 NtUserBuildPropList(
1457     HWND hWnd,
1458     LPVOID Buffer,
1459     DWORD BufferSize,
1460     DWORD *Count);
1461 
1462 /* apfnSimpleCall indices from Windows XP SP 2 */
1463 /* TODO: Check for differences in Windows 2000, 2003 and 2008 */
1464 #define WIN32K_VERSION NTDDI_WINXPSP2 /* FIXME: this should go somewhere else */
1465 
1466 enum SimpleCallRoutines
1467 {
1468     NOPARAM_ROUTINE_CREATEMENU,
1469     NOPARAM_ROUTINE_CREATEMENUPOPUP,
1470 #if (WIN32K_VERSION >= NTDDI_VISTA)
1471     NOPARAM_ROUTINE_ALLOWFOREGNDACTIVATION,
1472     NOPARAM_ROUTINE_MSQCLEARWAKEMASK,
1473     NOPARAM_ROUTINE_CREATESYSTEMTHREADS,
1474     NOPARAM_ROUTINE_DESTROY_CARET,
1475 #endif
1476     NOPARAM_ROUTINE_ENABLEPROCWNDGHSTING,
1477 #if (WIN32K_VERSION < NTDDI_VISTA)
1478     NOPARAM_ROUTINE_MSQCLEARWAKEMASK,
1479     NOPARAM_ROUTINE_ALLOWFOREGNDACTIVATION,
1480     NOPARAM_ROUTINE_DESTROY_CARET,
1481 #endif
1482     NOPARAM_ROUTINE_GETDEVICECHANGEINFO,
1483     NOPARAM_ROUTINE_GETIMESHOWSTATUS,
1484     NOPARAM_ROUTINE_GETINPUTDESKTOP,
1485     NOPARAM_ROUTINE_GETMSESSAGEPOS,
1486 #if (WIN32K_VERSION >= NTDDI_VISTA)
1487     NOPARAM_ROUTINE_HANDLESYSTHRDCREATFAIL,
1488 #else
1489     NOPARAM_ROUTINE_GETREMOTEPROCESSID,
1490 #endif
1491     NOPARAM_ROUTINE_HIDECURSORNOCAPTURE,
1492     NOPARAM_ROUTINE_LOADCURSANDICOS,
1493 #if (WIN32K_VERSION >= NTDDI_VISTA)
1494     NOPARAM_ROUTINE_LOADUSERAPIHOOK,
1495     NOPARAM_ROUTINE_PREPAREFORLOGOFF, /* 0x0f */
1496 #endif
1497     NOPARAM_ROUTINE_RELEASECAPTURE,
1498     NOPARAM_ROUTINE_RESETDBLCLICK,
1499     NOPARAM_ROUTINE_ZAPACTIVEANDFOUS,
1500     NOPARAM_ROUTINE_REMOTECONSHDWSTOP,
1501     NOPARAM_ROUTINE_REMOTEDISCONNECT,
1502     NOPARAM_ROUTINE_REMOTELOGOFF,
1503     NOPARAM_ROUTINE_REMOTENTSECURITY,
1504     NOPARAM_ROUTINE_REMOTESHDWSETUP,
1505     NOPARAM_ROUTINE_REMOTESHDWSTOP,
1506     NOPARAM_ROUTINE_REMOTEPASSTHRUENABLE,
1507     NOPARAM_ROUTINE_REMOTEPASSTHRUDISABLE,
1508     NOPARAM_ROUTINE_REMOTECONNECTSTATE,
1509     NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING,
1510     NOPARAM_ROUTINE_USERPWRCALLOUTWORKER,
1511 #if (WIN32K_VERSION >= NTDDI_VISTA)
1512     NOPARAM_ROUTINE_WAKERITFORSHTDWN,
1513 #endif
1514     NOPARAM_ROUTINE_INIT_MESSAGE_PUMP,
1515     NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP,
1516 #if (WIN32K_VERSION < NTDDI_VISTA)
1517     NOPARAM_ROUTINE_LOADUSERAPIHOOK,
1518 #endif
1519     ONEPARAM_ROUTINE_BEGINDEFERWNDPOS,
1520 #if (WIN32K_VERSION >= NTDDI_VISTA)
1521     ONEPARAM_ROUTINE_GETSENDMSGRECVR,
1522 #endif
1523     ONEPARAM_ROUTINE_WINDOWFROMDC,
1524     ONEPARAM_ROUTINE_ALLOWSETFOREGND,
1525     ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT,
1526 #if (WIN32K_VERSION < NTDDI_VISTA)
1527     ONEPARAM_ROUTINE_CREATESYSTEMTHREADS,
1528 #endif
1529     ONEPARAM_ROUTINE_CSDDEUNINITIALIZE,
1530     ONEPARAM_ROUTINE_DIRECTEDYIELD,
1531     ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS,
1532 #if (WIN32K_VERSION < NTDDI_VISTA)
1533     ONEPARAM_ROUTINE_GETCURSORPOS,
1534 #endif
1535     ONEPARAM_ROUTINE_GETINPUTEVENT,
1536     ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT,
1537     ONEPARAM_ROUTINE_GETKEYBOARDTYPE,
1538     ONEPARAM_ROUTINE_GETPROCDEFLAYOUT,
1539     ONEPARAM_ROUTINE_GETQUEUESTATUS,
1540     ONEPARAM_ROUTINE_GETWINSTAINFO,
1541 #if (WIN32K_VERSION < NTDDI_VISTA)
1542     ONEPARAM_ROUTINE_HANDLESYSTHRDCREATFAIL,
1543 #endif
1544     ONEPARAM_ROUTINE_LOCKFOREGNDWINDOW,
1545     ONEPARAM_ROUTINE_LOADFONTS,
1546     ONEPARAM_ROUTINE_MAPDEKTOPOBJECT,
1547     ONEPARAM_ROUTINE_MESSAGEBEEP,
1548     ONEPARAM_ROUTINE_PLAYEVENTSOUND,
1549     ONEPARAM_ROUTINE_POSTQUITMESSAGE,
1550 #if (WIN32K_VERSION < NTDDI_VISTA)
1551     ONEPARAM_ROUTINE_PREPAREFORLOGOFF,
1552 #endif
1553     ONEPARAM_ROUTINE_REALIZEPALETTE,
1554     ONEPARAM_ROUTINE_REGISTERLPK,
1555 #if (WIN32K_VERSION >= NTDDI_VISTA)
1556     ONEPARAM_ROUTINE_REGISTERSYSTEMTHREAD,
1557 #endif
1558     ONEPARAM_ROUTINE_REMOTERECONNECT,
1559     ONEPARAM_ROUTINE_REMOTETHINWIRESTATUS,
1560     ONEPARAM_ROUTINE_RELEASEDC,
1561 #if (WIN32K_VERSION >= NTDDI_VISTA)
1562     ONEPARAM_ROUTINE_REMOTENOTIFY,
1563 #endif
1564     ONEPARAM_ROUTINE_REPLYMESSAGE,
1565     ONEPARAM_ROUTINE_SETCARETBLINKTIME,
1566     ONEPARAM_ROUTINE_SETDBLCLICKTIME,
1567 #if (WIN32K_VERSION < NTDDI_VISTA)
1568     ONEPARAM_ROUTINE_SETIMESHOWSTATUS,
1569 #endif
1570     ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO,
1571     ONEPARAM_ROUTINE_SETPROCDEFLAYOUT,
1572 #if (WIN32K_VERSION >= NTDDI_VISTA)
1573     ONEPARAM_ROUTINE_SETWATERMARKSTRINGS,
1574 #endif
1575     ONEPARAM_ROUTINE_SHOWCURSOR,
1576     ONEPARAM_ROUTINE_SHOWSTARTGLASS,
1577     ONEPARAM_ROUTINE_SWAPMOUSEBUTTON,
1578     X_ROUTINE_WOWMODULEUNLOAD,
1579 #if (WIN32K_VERSION < NTDDI_VISTA)
1580     X_ROUTINE_REMOTENOTIFY,
1581 #endif
1582     HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW,
1583     HWND_ROUTINE_DWP_GETENABLEDPOPUP,
1584     HWND_ROUTINE_GETWNDCONTEXTHLPID,
1585     HWND_ROUTINE_REGISTERSHELLHOOKWINDOW,
1586     HWND_ROUTINE_SETMSGBOX,
1587     HWNDOPT_ROUTINE_SETPROGMANWINDOW,
1588     HWNDOPT_ROUTINE_SETTASKMANWINDOW,
1589     HWNDPARAM_ROUTINE_GETCLASSICOCUR,
1590     HWNDPARAM_ROUTINE_CLEARWINDOWSTATE,
1591     HWNDPARAM_ROUTINE_KILLSYSTEMTIMER,
1592     HWNDPARAM_ROUTINE_SETDIALOGPOINTER,
1593     HWNDPARAM_ROUTINE_SETVISIBLE,
1594     HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID,
1595     HWNDPARAM_ROUTINE_SETWINDOWSTATE,
1596     HWNDLOCK_ROUTINE_WINDOWHASSHADOW, /* correct prefix ? */
1597     HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS,
1598     HWNDLOCK_ROUTINE_DRAWMENUBAR,
1599     HWNDLOCK_ROUTINE_CHECKIMESHOWSTATUSINTHRD,
1600     HWNDLOCK_ROUTINE_GETSYSMENUHANDLE,
1601     HWNDLOCK_ROUTINE_REDRAWFRAME,
1602     HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK,
1603     HWNDLOCK_ROUTINE_SETDLGSYSMENU,
1604     HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW,
1605     HWNDLOCK_ROUTINE_SETSYSMENU,
1606     HWNDLOCK_ROUTINE_UPDATECKIENTRECT,
1607     HWNDLOCK_ROUTINE_UPDATEWINDOW,
1608     X_ROUTINE_IMESHOWSTATUSCHANGE,
1609     TWOPARAM_ROUTINE_ENABLEWINDOW,
1610     TWOPARAM_ROUTINE_REDRAWTITLE,
1611     TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS,
1612     TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW,
1613     TWOPARAM_ROUTINE_UPDATEWINDOWS,
1614     TWOPARAM_ROUTINE_VALIDATERGN,
1615 #if (WIN32K_VERSION >= NTDDI_VISTA)
1616     TWOPARAM_ROUTINE_CHANGEWNDMSGFILTER,
1617     TWOPARAM_ROUTINE_GETCURSORPOS,
1618 #endif
1619     TWOPARAM_ROUTINE_GETHDEVNAME,
1620     TWOPARAM_ROUTINE_INITANSIOEM,
1621     TWOPARAM_ROUTINE_NLSSENDIMENOTIFY,
1622 #if (WIN32K_VERSION >= NTDDI_VISTA)
1623     TWOPARAM_ROUTINE_REGISTERGHSTWND,
1624 #endif
1625     TWOPARAM_ROUTINE_REGISTERLOGONPROCESS,
1626 #if (WIN32K_VERSION >= NTDDI_VISTA)
1627     TWOPARAM_ROUTINE_REGISTERSBLFROSTWND,
1628 #else
1629     TWOPARAM_ROUTINE_REGISTERSYSTEMTHREAD,
1630 #endif
1631     TWOPARAM_ROUTINE_REGISTERUSERHUNGAPPHANDLERS,
1632     TWOPARAM_ROUTINE_SHADOWCLEANUP,
1633     TWOPARAM_ROUTINE_REMOTESHADOWSTART,
1634     TWOPARAM_ROUTINE_SETCARETPOS,
1635     TWOPARAM_ROUTINE_SETCURSORPOS,
1636 #if (WIN32K_VERSION >= NTDDI_VISTA)
1637     TWOPARAM_ROUTINE_SETPHYSCURSORPOS,
1638 #endif
1639     TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK,
1640     TWOPARAM_ROUTINE_WOWCLEANUP
1641 };
1642 
1643 DWORD
1644 NTAPI
1645 NtUserCallHwnd(
1646     HWND hWnd,
1647     DWORD Routine);
1648 
1649 BOOL
1650 NTAPI
1651 NtUserCallHwndLock(
1652     HWND hWnd,
1653     DWORD Routine);
1654 
1655 HWND
1656 NTAPI
1657 NtUserCallHwndOpt(
1658     HWND hWnd,
1659     DWORD Routine);
1660 
1661 DWORD
1662 NTAPI
1663 NtUserCallHwndParam(
1664     HWND hWnd,
1665     DWORD_PTR Param,
1666     DWORD Routine);
1667 
1668 DWORD
1669 NTAPI
1670 NtUserCallHwndParamLock(
1671     HWND hWnd,
1672     DWORD_PTR Param,
1673     DWORD Routine);
1674 
1675 BOOL
1676 NTAPI
1677 NtUserCallMsgFilter(
1678     LPMSG msg,
1679     INT code);
1680 
1681 LRESULT
1682 NTAPI
1683 NtUserCallNextHookEx(
1684     int Code,
1685     WPARAM wParam,
1686     LPARAM lParam,
1687     BOOL Ansi);
1688 
1689 DWORD_PTR
1690 NTAPI
1691 NtUserCallNoParam(
1692     DWORD Routine);
1693 
1694 DWORD_PTR
1695 NTAPI
1696 NtUserCallOneParam(
1697     DWORD_PTR Param,
1698     DWORD Routine);
1699 
1700 DWORD_PTR
1701 NTAPI
1702 NtUserCallTwoParam(
1703     DWORD_PTR Param1,
1704     DWORD_PTR Param2,
1705     DWORD Routine);
1706 
1707 BOOL
1708 NTAPI
1709 NtUserChangeClipboardChain(
1710     HWND hWndRemove,
1711     HWND hWndNewNext);
1712 
1713 LONG
1714 NTAPI
1715 NtUserChangeDisplaySettings(
1716     PUNICODE_STRING lpszDeviceName,
1717     LPDEVMODEW lpDevMode,
1718     DWORD dwflags,
1719     LPVOID lParam);
1720 
1721 BOOL
1722 NTAPI
1723 NtUserCheckDesktopByThreadId(
1724     DWORD dwThreadId);
1725 
1726 BOOL
1727 NTAPI
1728 NtUserCheckWindowThreadDesktop(
1729     HWND hwnd,
1730     DWORD dwThreadId,
1731     ULONG ReturnValue);
1732 
1733 DWORD
1734 NTAPI
1735 NtUserCheckImeHotKey(
1736     DWORD dwUnknown1,
1737     LPARAM dwUnknown2);
1738 
1739 HWND NTAPI
1740 NtUserChildWindowFromPointEx(
1741     HWND Parent,
1742     LONG x,
1743     LONG y,
1744     UINT Flags);
1745 
1746 BOOL
1747 NTAPI
1748 NtUserClipCursor(
1749     RECT *lpRect);
1750 
1751 BOOL
1752 NTAPI
1753 NtUserCloseClipboard(VOID);
1754 
1755 BOOL
1756 NTAPI
1757 NtUserCloseDesktop(
1758     HDESK hDesktop);
1759 
1760 BOOL
1761 NTAPI
1762 NtUserCloseWindowStation(
1763     HWINSTA hWinSta);
1764 
1765 /* Console commands for NtUserConsoleControl */
1766 typedef enum _CONSOLECONTROL
1767 {
1768     ConsoleCtrlDesktopConsoleThread = 0,
1769     GuiConsoleWndClassAtom = 1,
1770     ConsoleMakePalettePublic = 5,
1771     ConsoleAcquireDisplayOwnership,
1772 } CONSOLECONTROL, *PCONSOLECONTROL;
1773 
1774 typedef struct _DESKTOP_CONSOLE_THREAD
1775 {
1776     HDESK DesktopHandle;
1777     ULONG_PTR ThreadId;
1778 } DESKTOP_CONSOLE_THREAD, *PDESKTOP_CONSOLE_THREAD;
1779 
1780 NTSTATUS
1781 APIENTRY
1782 NtUserConsoleControl(
1783     IN CONSOLECONTROL ConsoleCtrl,
1784     IN PVOID ConsoleCtrlInfo,
1785     IN ULONG ConsoleCtrlInfoLength);
1786 
1787 HANDLE
1788 NTAPI
1789 NtUserConvertMemHandle(
1790     PVOID pData,
1791     DWORD cbData);
1792 
1793 ULONG
1794 NTAPI
1795 NtUserCopyAcceleratorTable(
1796     HACCEL Table,
1797     LPACCEL Entries,
1798     ULONG EntriesCount);
1799 
1800 DWORD
1801 NTAPI
1802 NtUserCountClipboardFormats(VOID);
1803 
1804 HACCEL
1805 NTAPI
1806 NtUserCreateAcceleratorTable(
1807     LPACCEL Entries,
1808     ULONG EntriesCount);
1809 
1810 BOOL
1811 NTAPI
1812 NtUserCreateCaret(
1813     HWND hWnd,
1814     HBITMAP hBitmap,
1815     int nWidth,
1816     int nHeight);
1817 
1818 HDESK
1819 NTAPI
1820 NtUserCreateDesktop(
1821     POBJECT_ATTRIBUTES poa,
1822     PUNICODE_STRING lpszDesktopDevice,
1823     LPDEVMODEW lpdmw,
1824     DWORD dwFlags,
1825     ACCESS_MASK dwDesiredAccess);
1826 
1827 DWORD
1828 NTAPI
1829 NtUserCreateInputContext(
1830     DWORD dwUnknown1);
1831 
1832 NTSTATUS
1833 NTAPI
1834 NtUserCreateLocalMemHandle(
1835     HANDLE hMem,
1836     PVOID pData,
1837     DWORD cbData,
1838     DWORD *pcbData);
1839 
1840 HWND
1841 NTAPI
1842 NtUserCreateWindowEx(
1843     DWORD dwExStyle,
1844     PLARGE_STRING plstrClassName,
1845     PLARGE_STRING plstrClsVersion,
1846     PLARGE_STRING plstrWindowName,
1847     DWORD dwStyle,
1848     int x,
1849     int y,
1850     int nWidth,
1851     int nHeight,
1852     HWND hWndParent,
1853     HMENU hMenu,
1854     HINSTANCE hInstance,
1855     LPVOID lpParam,
1856     DWORD dwFlags,
1857     PVOID acbiBuffer);
1858 
1859 HWINSTA
1860 NTAPI
1861 NtUserCreateWindowStation(
1862     POBJECT_ATTRIBUTES ObjectAttributes,
1863     ACCESS_MASK dwDesiredAccess,
1864     DWORD Unknown2,
1865     DWORD Unknown3,
1866     DWORD Unknown4,
1867     DWORD Unknown5,
1868     DWORD Unknown6);
1869 
1870 BOOL
1871 NTAPI
1872 NtUserDdeGetQualityOfService(
1873     IN HWND hwndClient,
1874     IN HWND hWndServer,
1875     OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev);
1876 
1877 DWORD
1878 NTAPI
1879 NtUserDdeInitialize(
1880     DWORD Unknown0,
1881     DWORD Unknown1,
1882     DWORD Unknown2,
1883     DWORD Unknown3,
1884     DWORD Unknown4);
1885 
1886 BOOL
1887 NTAPI
1888 NtUserDdeSetQualityOfService(
1889     IN HWND hwndClient,
1890     IN PSECURITY_QUALITY_OF_SERVICE pqosNew,
1891     OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev);
1892 
1893 HDWP
1894 NTAPI
1895 NtUserDeferWindowPos(
1896     HDWP WinPosInfo,
1897     HWND Wnd,
1898     HWND WndInsertAfter,
1899     int x,
1900     int y,
1901     int cx,
1902     int cy,
1903     UINT Flags);
1904 
1905 BOOL
1906 NTAPI
1907 NtUserDefSetText(
1908     HWND WindowHandle,
1909     PLARGE_STRING WindowText);
1910 
1911 BOOLEAN
1912 NTAPI
1913 NtUserDestroyAcceleratorTable(
1914     HACCEL Table);
1915 
1916 BOOL
1917 NTAPI
1918 NtUserDestroyCursor(
1919   _In_ HANDLE Handle,
1920   _In_ BOOL bForce);
1921 
1922 DWORD
1923 NTAPI
1924 NtUserDestroyInputContext(
1925     DWORD dwUnknown1);
1926 
1927 BOOLEAN
1928 NTAPI
1929 NtUserDestroyWindow(
1930     HWND Wnd);
1931 
1932 DWORD
1933 NTAPI
1934 NtUserDisableThreadIme(
1935     DWORD dwUnknown1);
1936 
1937 LRESULT
1938 NTAPI
1939 NtUserDispatchMessage(
1940     PMSG pMsg);
1941 
1942 BOOL
1943 NTAPI
1944 NtUserDragDetect(
1945     HWND hWnd,
1946     POINT pt);
1947 
1948 DWORD
1949 NTAPI
1950 NtUserDragObject(
1951     HWND hwnd1,
1952     HWND hwnd2,
1953     UINT u1,
1954     DWORD dw1,
1955     HCURSOR hc1);
1956 
1957 BOOL
1958 NTAPI
1959 NtUserDrawAnimatedRects(
1960     HWND hwnd,
1961     INT idAni,
1962     RECT *lprcFrom,
1963     RECT *lprcTo);
1964 
1965 BOOL
1966 NTAPI
1967 NtUserDrawCaption(
1968     HWND hWnd,
1969     HDC hDc,
1970     LPCRECT lpRc,
1971     UINT uFlags);
1972 
1973 BOOL
1974 NTAPI
1975 NtUserDrawCaptionTemp(
1976     HWND hWnd,
1977     HDC hDC,
1978     LPCRECT lpRc,
1979     HFONT hFont,
1980     HICON hIcon,
1981     const PUNICODE_STRING str,
1982     UINT uFlags);
1983 
1984 /* Used with NtUserDrawIconEx, last parameter. */
1985 typedef struct _DRAWICONEXDATA
1986 {
1987     HBITMAP hbmMask;
1988     HBITMAP hbmColor;
1989     int cx;
1990     int cy;
1991 } DRAWICONEXDATA, *PDRAWICONEXDATA;
1992 
1993 BOOL
1994 NTAPI
1995 NtUserDrawIconEx(
1996     HDC hdc,
1997     int xLeft,
1998     int yTop,
1999     HICON hIcon,
2000     int cxWidth,
2001     int cyWidth,
2002     UINT istepIfAniCur,
2003     HBRUSH hbrFlickerFreeDraw,
2004     UINT diFlags,
2005     BOOL bMetaHDC,
2006     PVOID pDIXData);
2007 
2008 BOOL
2009 NTAPI
2010 NtUserEmptyClipboard(VOID);
2011 
2012 BOOL
2013 NTAPI
2014 NtUserEnableScrollBar(
2015     HWND hWnd,
2016     UINT wSBflags,
2017     UINT wArrows);
2018 
2019 BOOL
2020 NTAPI
2021 NtUserEndDeferWindowPosEx(
2022     HDWP WinPosInfo,
2023     DWORD Unknown1);
2024 
2025 BOOL
2026 NTAPI
2027 NtUserEndPaint(
2028     HWND hWnd,
2029     CONST PAINTSTRUCT *lPs);
2030 
2031 BOOL
2032 NTAPI
2033 NtUserEnumDisplayDevices(
2034     PUNICODE_STRING lpDevice, /* device name */
2035     DWORD iDevNum, /* display device */
2036     PDISPLAY_DEVICEW lpDisplayDevice, /* device information */
2037     DWORD dwFlags); /* reserved */
2038 
2039 /*
2040 BOOL
2041 NTAPI
2042 NtUserEnumDisplayMonitors(
2043     HDC hdc,
2044     LPCRECT lprcClip,
2045     MONITORENUMPROC lpfnEnum,
2046     LPARAM dwData);
2047 */
2048 /* FIXME:  The call below is ros-specific and should be rewritten to use the same params as the correct call above. */
2049 INT
2050 NTAPI
2051 NtUserEnumDisplayMonitors(
2052     OPTIONAL IN HDC hDC,
2053     OPTIONAL IN LPCRECT pRect,
2054     OPTIONAL OUT HMONITOR *hMonitorList,
2055     OPTIONAL OUT LPRECT monitorRectList,
2056     OPTIONAL IN DWORD listSize);
2057 
2058 
2059 NTSTATUS
2060 NTAPI
2061 NtUserEnumDisplaySettings(
2062     PUNICODE_STRING lpszDeviceName,
2063     DWORD iModeNum,
2064     LPDEVMODEW lpDevMode, /* FIXME is this correct? */
2065     DWORD dwFlags);
2066 
2067 DWORD
2068 NTAPI
2069 NtUserEvent(
2070     DWORD Unknown0);
2071 
2072 INT
2073 NTAPI
2074 NtUserExcludeUpdateRgn(
2075     HDC hDC,
2076     HWND hWnd);
2077 
2078 BOOL
2079 NTAPI
2080 NtUserFillWindow(
2081     HWND hWndPaint,
2082     HWND hWndPaint1,
2083     HDC hDC,
2084     HBRUSH hBrush);
2085 
2086 HWND
2087 NTAPI
2088 NtUserFindWindowEx(
2089     HWND hwndParent,
2090     HWND hwndChildAfter,
2091     PUNICODE_STRING ucClassName,
2092     PUNICODE_STRING ucWindowName,
2093     DWORD dwUnknown);
2094 
2095 BOOL
2096 NTAPI
2097 NtUserFlashWindowEx(
2098     IN PFLASHWINFO pfwi);
2099 
2100 BOOL
2101 NTAPI
2102 NtUserGetAltTabInfo(
2103     HWND hwnd,
2104     INT iItem,
2105     PALTTABINFO pati,
2106     LPWSTR pszItemText,
2107     UINT cchItemText,
2108     BOOL Ansi);
2109 
2110 HWND
2111 NTAPI
2112 NtUserGetAncestor(
2113     HWND hWnd,
2114     UINT Flags);
2115 
2116 DWORD
2117 NTAPI
2118 NtUserGetAppImeLevel(
2119     DWORD dwUnknown1);
2120 
2121 SHORT
2122 NTAPI
2123 NtUserGetAsyncKeyState(
2124     INT Key);
2125 
2126 _Success_(return != 0)
2127 _At_(pustrName->Buffer, _Out_z_bytecap_post_bytecount_(pustrName->MaximumLength, return * 2 + 2))
2128 ULONG
2129 APIENTRY
2130 NtUserGetAtomName(
2131     _In_ ATOM atom,
2132     _Inout_ PUNICODE_STRING pustrName);
2133 
2134 UINT
2135 NTAPI
2136 NtUserGetCaretBlinkTime(VOID);
2137 
2138 BOOL
2139 NTAPI
2140 NtUserGetCaretPos(
2141     LPPOINT lpPoint);
2142 
2143 BOOL
2144 NTAPI
2145 NtUserGetClassInfo(
2146     HINSTANCE hInstance,
2147     PUNICODE_STRING ClassName,
2148     LPWNDCLASSEXW wcex,
2149     LPWSTR *ppszMenuName,
2150     BOOL Ansi);
2151 
2152 INT
2153 NTAPI
2154 NtUserGetClassName(
2155     HWND hWnd,
2156     BOOL Real, /* 0 GetClassNameW, 1 RealGetWindowClassA/W */
2157     PUNICODE_STRING ClassName);
2158 
2159 HANDLE
2160 NTAPI
2161 NtUserGetClipboardData(
2162     UINT fmt,
2163     PGETCLIPBDATA pgcd);
2164 
2165 INT
2166 NTAPI
2167 NtUserGetClipboardFormatName(
2168     UINT uFormat,
2169     LPWSTR lpszFormatName,
2170     INT cchMaxCount);
2171 
2172 HWND
2173 NTAPI
2174 NtUserGetClipboardOwner(VOID);
2175 
2176 DWORD
2177 NTAPI
2178 NtUserGetClipboardSequenceNumber(VOID);
2179 
2180 HWND
2181 NTAPI
2182 NtUserGetClipboardViewer(VOID);
2183 
2184 BOOL
2185 NTAPI
2186 NtUserGetClipCursor(
2187     RECT *lpRect);
2188 
2189 BOOL
2190 NTAPI
2191 NtUserGetComboBoxInfo(
2192     HWND hWnd,
2193     PCOMBOBOXINFO pcbi);
2194 
2195 HBRUSH
2196 NTAPI
2197 NtUserGetControlBrush(
2198     HWND hwnd,
2199     HDC  hdc,
2200     UINT ctlType);
2201 
2202 HBRUSH
2203 NTAPI
2204 NtUserGetControlColor(
2205     HWND hwndParent,
2206     HWND hwnd,
2207     HDC hdc,
2208     UINT CtlMsg);
2209 
2210 ULONG_PTR
2211 NTAPI
2212 NtUserGetCPD(
2213     HWND hWnd,
2214     GETCPD Flags,
2215     ULONG_PTR Proc);
2216 
2217 HCURSOR
2218 NTAPI
2219 NtUserGetCursorFrameInfo(
2220     HCURSOR hCursor,
2221     DWORD istep,
2222     INT *rate_jiffies,
2223     DWORD *num_steps);
2224 
2225 BOOL
2226 NTAPI
2227 NtUserGetCursorInfo(
2228     PCURSORINFO pci);
2229 
2230 HDC
2231 NTAPI
2232 NtUserGetDC(
2233     HWND hWnd);
2234 
2235 HDC
2236 NTAPI
2237 NtUserGetDCEx(
2238     HWND hWnd,
2239     HANDLE hRegion,
2240     ULONG Flags);
2241 
2242 UINT
2243 NTAPI
2244 NtUserGetDoubleClickTime(VOID);
2245 
2246 HWND
2247 NTAPI
2248 NtUserGetForegroundWindow(VOID);
2249 
2250 DWORD
2251 NTAPI
2252 NtUserGetGuiResources(
2253     HANDLE hProcess,
2254     DWORD uiFlags);
2255 
2256 BOOL
2257 NTAPI
2258 NtUserGetGUIThreadInfo(
2259     DWORD idThread,
2260     LPGUITHREADINFO lpgui);
2261 
2262 _Success_(return != FALSE)
2263 BOOL
2264 NTAPI
2265 NtUserGetIconInfo(
2266     _In_ HANDLE hCurIcon,
2267     _Out_opt_ PICONINFO IconInfo,
2268     _Inout_opt_ PUNICODE_STRING lpInstName,
2269     _Inout_opt_ PUNICODE_STRING lpResName,
2270     _Out_opt_ LPDWORD pbpp,
2271     _In_ BOOL bInternal);
2272 
2273 BOOL
2274 NTAPI
2275 NtUserGetIconSize(
2276     HANDLE Handle,
2277     UINT istepIfAniCur,
2278     LONG *plcx,
2279     LONG *plcy);
2280 
2281 DWORD
2282 NTAPI
2283 NtUserGetImeHotKey(
2284     DWORD Unknown0,
2285     DWORD Unknown1,
2286     DWORD Unknown2,
2287     DWORD Unknown3);
2288 
2289 DWORD
2290 NTAPI
2291 NtUserGetImeInfoEx(
2292     PIMEINFOEX pImeInfoEx,
2293     DWORD dwUnknown2);
2294 
2295 DWORD
2296 NTAPI
2297 NtUserGetInternalWindowPos(
2298     HWND hwnd,
2299     LPRECT rectWnd,
2300     LPPOINT ptIcon);
2301 
2302 HKL
2303 NTAPI
2304 NtUserGetKeyboardLayout(
2305     DWORD dwThreadid);
2306 
2307 UINT
2308 NTAPI
2309 NtUserGetKeyboardLayoutList(
2310     ULONG nItems,
2311     HKL *pHklBuff);
2312 
2313 BOOL
2314 NTAPI
2315 NtUserGetKeyboardLayoutName(
2316     LPWSTR lpszName);
2317 
2318 DWORD
2319 NTAPI
2320 NtUserGetKeyboardState(
2321     LPBYTE Unknown0);
2322 
2323 DWORD
2324 NTAPI
2325 NtUserGetKeyboardType(
2326     DWORD TypeFlag);
2327 
2328 DWORD
2329 NTAPI
2330 NtUserGetKeyNameText(
2331     LONG lParam,
2332     LPWSTR lpString,
2333     int nSize);
2334 
2335 SHORT
2336 NTAPI
2337 NtUserGetKeyState(
2338     INT VirtKey);
2339 
2340 BOOL
2341 NTAPI
2342 NtUserGetLayeredWindowAttributes(
2343     HWND hwnd,
2344     COLORREF *pcrKey,
2345     BYTE *pbAlpha,
2346     DWORD *pdwFlags);
2347 
2348 DWORD
2349 NTAPI
2350 NtUserGetListBoxInfo(
2351     HWND hWnd);
2352 
2353 BOOL
2354 APIENTRY
2355 NtUserGetMessage(
2356     PMSG pMsg,
2357     HWND hWnd,
2358     UINT MsgFilterMin,
2359     UINT MsgFilterMax);
2360 
2361 DWORD
2362 NTAPI
2363 NtUserGetMouseMovePointsEx(
2364     UINT cbSize,
2365     LPMOUSEMOVEPOINT lppt,
2366     LPMOUSEMOVEPOINT lpptBuf,
2367     int nBufPoints,
2368     DWORD resolution);
2369 
2370 BOOL
2371 NTAPI
2372 NtUserGetObjectInformation(
2373     HANDLE hObject,
2374     DWORD nIndex,
2375     PVOID pvInformation,
2376     DWORD nLength,
2377     PDWORD nLengthNeeded);
2378 
2379 HWND
2380 NTAPI
2381 NtUserGetOpenClipboardWindow(VOID);
2382 
2383 INT
2384 NTAPI
2385 NtUserGetPriorityClipboardFormat(
2386     UINT *paFormatPriorityList,
2387     INT cFormats);
2388 
2389 HWINSTA
2390 NTAPI
2391 NtUserGetProcessWindowStation(VOID);
2392 
2393 DWORD
2394 NTAPI
2395 NtUserGetRawInputBuffer(
2396     PRAWINPUT pData,
2397     PUINT pcbSize,
2398     UINT cbSizeHeader);
2399 
2400 DWORD
2401 NTAPI
2402 NtUserGetRawInputData(
2403     HRAWINPUT hRawInput,
2404     UINT uiCommand,
2405     LPVOID pData,
2406     PUINT pcbSize,
2407     UINT cbSizeHeader);
2408 
2409 DWORD
2410 NTAPI
2411 NtUserGetRawInputDeviceInfo(
2412     HANDLE hDevice,
2413     UINT uiCommand,
2414     LPVOID pData,
2415     PUINT pcbSize);
2416 
2417 DWORD
2418 NTAPI
2419 NtUserGetRawInputDeviceList(
2420     PRAWINPUTDEVICELIST pRawInputDeviceList,
2421     PUINT puiNumDevices,
2422     UINT cbSize);
2423 
2424 DWORD
2425 NTAPI
2426 NtUserGetRegisteredRawInputDevices(
2427     PRAWINPUTDEVICE pRawInputDevices,
2428     PUINT puiNumDevices,
2429     UINT cbSize);
2430 
2431 BOOL
2432 NTAPI
2433 NtUserGetScrollBarInfo(
2434     HWND hWnd,
2435     LONG idObject,
2436     PSCROLLBARINFO psbi);
2437 
2438 HDESK
2439 NTAPI
2440 NtUserGetThreadDesktop(
2441     DWORD dwThreadId,
2442     HDESK hConsoleDesktop);
2443 
2444 enum ThreadStateRoutines
2445 {
2446     THREADSTATE_GETTHREADINFO,
2447     THREADSTATE_INSENDMESSAGE,
2448     THREADSTATE_FOCUSWINDOW,
2449     THREADSTATE_ACTIVEWINDOW,
2450     THREADSTATE_CAPTUREWINDOW,
2451     THREADSTATE_PROGMANWINDOW,
2452     THREADSTATE_TASKMANWINDOW,
2453     THREADSTATE_GETMESSAGETIME,
2454     THREADSTATE_GETINPUTSTATE,
2455     THREADSTATE_UPTIMELASTREAD,
2456     THREADSTATE_FOREGROUNDTHREAD,
2457     THREADSTATE_GETCURSOR,
2458     THREADSTATE_GETMESSAGEEXTRAINFO
2459 };
2460 
2461 DWORD_PTR
2462 NTAPI
2463 NtUserGetThreadState(
2464     DWORD Routine);
2465 
2466 BOOLEAN
2467 NTAPI
2468 NtUserGetTitleBarInfo(
2469     HWND hwnd,
2470     PTITLEBARINFO pti);
2471 
2472 BOOL
2473 NTAPI
2474 NtUserGetUpdateRect(
2475     HWND hWnd,
2476     LPRECT lpRect,
2477     BOOL fErase);
2478 
2479 INT
2480 NTAPI
2481 NtUserGetUpdateRgn(
2482     HWND hWnd,
2483     HRGN hRgn,
2484     BOOL bErase);
2485 
2486 HDC
2487 NTAPI
2488 NtUserGetWindowDC(
2489     HWND hWnd);
2490 
2491 BOOL
2492 NTAPI
2493 NtUserGetWindowPlacement(
2494     HWND hWnd,
2495     WINDOWPLACEMENT *lpwndpl);
2496 
2497 PCLS
2498 NTAPI
2499 NtUserGetWOWClass(
2500     HINSTANCE hInstance,
2501     PUNICODE_STRING ClassName);
2502 
2503 DWORD
2504 NTAPI
2505 NtUserHardErrorControl(
2506     DWORD dwUnknown1,
2507     DWORD dwUnknown2,
2508     DWORD dwUnknown3);
2509 
2510 BOOL
2511 NTAPI
2512 NtUserImpersonateDdeClientWindow(
2513     HWND hWndClient,
2514     HWND hWndServer);
2515 
2516 NTSTATUS
2517 NTAPI
2518 NtUserInitialize(
2519     DWORD dwWinVersion,
2520     HANDLE hPowerRequestEvent,
2521     HANDLE hMediaRequestEvent);
2522 
2523 NTSTATUS
2524 NTAPI
2525 NtUserInitializeClientPfnArrays(
2526     PPFNCLIENT pfnClientA,
2527     PPFNCLIENT pfnClientW,
2528     PPFNCLIENTWORKER pfnClientWorker,
2529     HINSTANCE hmodUser);
2530 
2531 DWORD
2532 NTAPI
2533 NtUserInitTask(
2534     DWORD Unknown0,
2535     DWORD Unknown1,
2536     DWORD Unknown2,
2537     DWORD Unknown3,
2538     DWORD Unknown4,
2539     DWORD Unknown5,
2540     DWORD Unknown6,
2541     DWORD Unknown7,
2542     DWORD Unknown8,
2543     DWORD Unknown9,
2544     DWORD Unknown10,
2545     DWORD Unknown11);
2546 
2547 INT
2548 NTAPI
2549 NtUserInternalGetWindowText(
2550     HWND hWnd,
2551     LPWSTR lpString,
2552     INT nMaxCount);
2553 
2554 BOOL
2555 NTAPI
2556 NtUserInvalidateRect(
2557     HWND hWnd,
2558     CONST RECT *lpRect,
2559     BOOL bErase);
2560 
2561 BOOL
2562 NTAPI
2563 NtUserInvalidateRgn(
2564     HWND hWnd,
2565     HRGN hRgn,
2566     BOOL bErase);
2567 
2568 BOOL
2569 NTAPI
2570 NtUserIsClipboardFormatAvailable(
2571     UINT format);
2572 
2573 BOOL
2574 NTAPI
2575 NtUserKillTimer(
2576     HWND hWnd,
2577     UINT_PTR uIDEvent);
2578 
2579 HKL
2580 NTAPI
2581 NtUserLoadKeyboardLayoutEx(
2582     IN HANDLE Handle,
2583     IN DWORD offTable,
2584     IN PUNICODE_STRING puszKeyboardName,
2585     IN HKL hKL,
2586     IN PUNICODE_STRING puszKLID,
2587     IN DWORD dwKLID,
2588     IN UINT Flags);
2589 
2590 BOOL
2591 NTAPI
2592 NtUserLockWindowStation(
2593     HWINSTA hWindowStation);
2594 
2595 BOOL
2596 NTAPI
2597 NtUserLockWindowUpdate(
2598     HWND hWnd);
2599 
2600 BOOL
2601 NTAPI
2602 NtUserLockWorkStation(VOID);
2603 
2604 UINT
2605 NTAPI
2606 NtUserMapVirtualKeyEx(
2607     UINT keyCode,
2608     UINT transType,
2609     DWORD keyboardId,
2610     HKL dwhkl);
2611 
2612 typedef struct tagDOSENDMESSAGE
2613 {
2614     UINT uFlags;
2615     UINT uTimeout;
2616     ULONG_PTR Result;
2617 }
2618 DOSENDMESSAGE, *PDOSENDMESSAGE;
2619 
2620 BOOL
2621 NTAPI
2622 NtUserMessageCall(
2623     HWND hWnd,
2624     UINT Msg,
2625     WPARAM wParam,
2626     LPARAM lParam,
2627     ULONG_PTR ResultInfo,
2628     DWORD dwType, /* FNID_XX types */
2629     BOOL Ansi);
2630 
2631 DWORD
2632 NTAPI
2633 NtUserMinMaximize(
2634     HWND hWnd,
2635     UINT cmd, /* Wine SW_ commands */
2636     BOOL Hide);
2637 
2638 DWORD
2639 NTAPI
2640 NtUserMNDragLeave(VOID);
2641 
2642 DWORD
2643 NTAPI
2644 NtUserMNDragOver(
2645     DWORD Unknown0,
2646     DWORD Unknown1);
2647 
2648 DWORD
2649 NTAPI
2650 NtUserModifyUserStartupInfoFlags(
2651     DWORD Unknown0,
2652     DWORD Unknown1);
2653 
2654 BOOL
2655 NTAPI
2656 NtUserMoveWindow(
2657     HWND hWnd,
2658     int X,
2659     int Y,
2660     int nWidth,
2661     int nHeight,
2662     BOOL bRepaint
2663 );
2664 
2665 DWORD
2666 NTAPI
2667 NtUserNotifyIMEStatus(
2668     DWORD Unknown0,
2669     DWORD Unknown1,
2670     DWORD Unknown2);
2671 
2672 BOOL
2673 NTAPI
2674 NtUserNotifyProcessCreate(
2675     HANDLE NewProcessId,
2676     HANDLE ParentThreadId,
2677     ULONG dwUnknown,
2678     ULONG CreateFlags);
2679 
2680 VOID
2681 NTAPI
2682 NtUserNotifyWinEvent(
2683     DWORD Event,
2684     HWND hWnd,
2685     LONG idObject,
2686     LONG idChild);
2687 
2688 BOOL
2689 NTAPI
2690 NtUserOpenClipboard(
2691     HWND hWnd,
2692     DWORD Unknown1);
2693 
2694 HDESK
2695 NTAPI
2696 NtUserOpenDesktop(
2697     POBJECT_ATTRIBUTES ObjectAttributes,
2698     DWORD dwFlags,
2699     ACCESS_MASK dwDesiredAccess);
2700 
2701 HDESK
2702 NTAPI
2703 NtUserOpenInputDesktop(
2704     DWORD dwFlags,
2705     BOOL fInherit,
2706     ACCESS_MASK dwDesiredAccess);
2707 
2708 HWINSTA
2709 NTAPI
2710 NtUserOpenWindowStation(
2711     POBJECT_ATTRIBUTES ObjectAttributes,
2712     ACCESS_MASK dwDesiredAccess);
2713 
2714 BOOL
2715 NTAPI
2716 NtUserPaintDesktop(
2717     HDC hDC);
2718 
2719 DWORD
2720 NTAPI
2721 NtUserPaintMenuBar(
2722     HWND hWnd,
2723     HDC hDC,
2724     ULONG left,    // x,
2725     ULONG right,   // width, // Scale the edge thickness, offset?
2726     ULONG top,     // y,
2727     BOOL bActive); // DWORD Flags); DC_ACTIVE or WS_ACTIVECAPTION, by checking WNDS_ACTIVEFRAME and foreground.
2728 
2729 BOOL
2730 APIENTRY
2731 NtUserPeekMessage(
2732     PMSG pMsg,
2733     HWND hWnd,
2734     UINT MsgFilterMin,
2735     UINT MsgFilterMax,
2736     UINT RemoveMsg);
2737 
2738 BOOL
2739 NTAPI
2740 NtUserPostMessage(
2741     HWND hWnd,
2742     UINT Msg,
2743     WPARAM wParam,
2744     LPARAM lParam);
2745 
2746 BOOL
2747 NTAPI
2748 NtUserPostThreadMessage(
2749     DWORD idThread,
2750     UINT Msg,
2751     WPARAM wParam,
2752     LPARAM lParam);
2753 
2754 BOOL
2755 NTAPI
2756 NtUserPrintWindow(
2757     HWND hwnd,
2758     HDC hdcBlt,
2759     UINT nFlags);
2760 
2761 NTSTATUS
2762 NTAPI
2763 NtUserProcessConnect(
2764     IN HANDLE ProcessHandle,
2765     OUT PUSERCONNECT pUserConnect,
2766     IN ULONG Size); /* sizeof(USERCONNECT) */
2767 
2768 NTSTATUS
2769 NTAPI
2770 NtUserQueryInformationThread(
2771     IN HANDLE ThreadHandle,
2772     IN USERTHREADINFOCLASS ThreadInformationClass,
2773     OUT PVOID ThreadInformation,
2774     IN ULONG ThreadInformationLength);
2775 
2776 DWORD
2777 NTAPI
2778 NtUserQueryInputContext(
2779     DWORD dwUnknown1,
2780     DWORD dwUnknown2);
2781 
2782 DWORD
2783 NTAPI
2784 NtUserQuerySendMessage(
2785     DWORD Unknown0);
2786 
2787 DWORD
2788 NTAPI
2789 NtUserQueryUserCounters(
2790     DWORD Unknown0,
2791     DWORD Unknown1,
2792     DWORD Unknown2,
2793     DWORD Unknown3,
2794     DWORD Unknown4);
2795 
2796 #define QUERY_WINDOW_UNIQUE_PROCESS_ID 0x00
2797 #define QUERY_WINDOW_UNIQUE_THREAD_ID  0x01
2798 #define QUERY_WINDOW_ACTIVE            0x02
2799 #define QUERY_WINDOW_FOCUS             0x03
2800 #define QUERY_WINDOW_ISHUNG            0x04
2801 #define QUERY_WINDOW_REAL_ID           0x05
2802 #define QUERY_WINDOW_FOREGROUND        0x06
2803 
2804 DWORD_PTR
2805 NTAPI
2806 NtUserQueryWindow(
2807     HWND hWnd,
2808     DWORD Index);
2809 
2810 BOOL
2811 NTAPI
2812 NtUserRealInternalGetMessage(
2813     LPMSG lpMsg,
2814     HWND hWnd,
2815     UINT wMsgFilterMin,
2816     UINT wMsgFilterMax,
2817     UINT wRemoveMsg,
2818     BOOL bGMSG);
2819 
2820 HWND
2821 NTAPI
2822 NtUserRealChildWindowFromPoint(
2823     HWND Parent,
2824     LONG x,
2825     LONG y);
2826 
2827 BOOL
2828 NTAPI
2829 NtUserRealWaitMessageEx(
2830     DWORD dwWakeMask,
2831     UINT uTimeout);
2832 
2833 BOOL
2834 NTAPI
2835 NtUserRedrawWindow(
2836     HWND hWnd,
2837     CONST RECT *lprcUpdate,
2838     HRGN hrgnUpdate,
2839     UINT flags);
2840 
2841 RTL_ATOM
2842 NTAPI
2843 NtUserRegisterClassExWOW(
2844     WNDCLASSEXW* lpwcx,
2845     PUNICODE_STRING pustrClassName,
2846     PUNICODE_STRING pustrCVersion,
2847     PCLSMENUNAME pClassMenuName,
2848     DWORD fnID,
2849     DWORD Flags,
2850     LPDWORD pWow);
2851 
2852 BOOL
2853 NTAPI
2854 NtUserRegisterRawInputDevices(
2855     IN PCRAWINPUTDEVICE pRawInputDevices,
2856     IN UINT uiNumDevices,
2857     IN UINT cbSize);
2858 
2859 BOOL
2860 NTAPI
2861 NtUserRegisterUserApiHook(
2862     PUNICODE_STRING m_dllname1,
2863     PUNICODE_STRING m_funname1,
2864     DWORD dwUnknown3,
2865     DWORD dwUnknown4);
2866 
2867 BOOL
2868 NTAPI
2869 NtUserRegisterHotKey(
2870     HWND hWnd,
2871     int id,
2872     UINT fsModifiers,
2873     UINT vk);
2874 
2875 DWORD
2876 NTAPI
2877 NtUserRegisterTasklist(
2878     DWORD Unknown0);
2879 
2880 UINT
2881 NTAPI
2882 NtUserRegisterWindowMessage(
2883     PUNICODE_STRING MessageName);
2884 
2885 DWORD
2886 NTAPI
2887 NtUserRemoteConnect(
2888     DWORD dwUnknown1,
2889     DWORD dwUnknown2,
2890     DWORD dwUnknown3);
2891 
2892 DWORD
2893 NTAPI
2894 NtUserRemoteRedrawRectangle(
2895     DWORD dwUnknown1,
2896     DWORD dwUnknown2,
2897     DWORD dwUnknown3,
2898     DWORD dwUnknown4);
2899 
2900 DWORD
2901 NTAPI
2902 NtUserRemoteRedrawScreen(VOID);
2903 
2904 DWORD
2905 NTAPI
2906 NtUserRemoteStopScreenUpdates(VOID);
2907 
2908 HANDLE
2909 NTAPI
2910 NtUserRemoveProp(
2911     HWND hWnd,
2912     ATOM Atom);
2913 
2914 HDESK
2915 NTAPI
2916 NtUserResolveDesktop(
2917     IN HANDLE ProcessHandle,
2918     IN PUNICODE_STRING DesktopPath,
2919     IN BOOL bInherit,
2920     OUT HWINSTA* phWinSta);
2921 
2922 DWORD
2923 NTAPI
2924 NtUserResolveDesktopForWOW(
2925     DWORD Unknown0);
2926 
2927 BOOL
2928 NTAPI
2929 NtUserSBGetParms(
2930     HWND hwnd,
2931     int fnBar,
2932     PSBDATA pSBData,
2933     LPSCROLLINFO lpsi);
2934 
2935 BOOL
2936 NTAPI
2937 NtUserScrollDC(
2938     HDC hDC,
2939     int dx,
2940     int dy,
2941     CONST RECT *lprcScroll,
2942     CONST RECT *lprcClip ,
2943     HRGN hrgnUpdate,
2944     LPRECT lprcUpdate);
2945 
2946 DWORD
2947 NTAPI
2948 NtUserScrollWindowEx(
2949     HWND hWnd,
2950     INT dx,
2951     INT dy,
2952     const RECT *rect,
2953     const RECT *clipRect,
2954     HRGN hrgnUpdate,
2955     LPRECT rcUpdate,
2956     UINT flags);
2957 
2958 UINT
2959 NTAPI
2960 NtUserSendInput(
2961     UINT nInputs,
2962     LPINPUT pInput,
2963     INT cbSize);
2964 
2965 HWND
2966 NTAPI
2967 NtUserSetActiveWindow(
2968     HWND Wnd);
2969 
2970 DWORD
2971 NTAPI
2972 NtUserSetAppImeLevel(
2973     DWORD dwUnknown1,
2974     DWORD dwUnknown2);
2975 
2976 HWND
2977 NTAPI
2978 NtUserSetCapture(
2979     HWND Wnd);
2980 
2981 ULONG_PTR
2982 NTAPI
2983 NtUserSetClassLong(
2984     HWND hWnd,
2985     INT Offset,
2986     ULONG_PTR dwNewLong,
2987     BOOL Ansi);
2988 
2989 WORD
2990 NTAPI
2991 NtUserSetClassWord(
2992     HWND hWnd,
2993     INT nIndex,
2994     WORD wNewWord);
2995 
2996 HANDLE
2997 NTAPI
2998 NtUserSetClipboardData(
2999     UINT fmt,
3000     HANDLE hMem,
3001     PSETCLIPBDATA scd);
3002 
3003 HWND
3004 NTAPI
3005 NtUserSetClipboardViewer(
3006     HWND hWndNewViewer);
3007 
3008 HPALETTE
3009 NTAPI
3010 NtUserSelectPalette(
3011     HDC hDC,
3012     HPALETTE hpal,
3013     BOOL ForceBackground);
3014 
3015 DWORD
3016 NTAPI
3017 NtUserSetConsoleReserveKeys(
3018     DWORD Unknown0,
3019     DWORD Unknown1);
3020 
3021 HCURSOR
3022 NTAPI
3023 NtUserSetCursor(
3024     HCURSOR hCursor);
3025 
3026 BOOL
3027 NTAPI
3028 NtUserSetCursorContents(
3029     HANDLE Handle,
3030     PICONINFO IconInfo);
3031 
3032 BOOL
3033 NTAPI
3034 NtUserSetCursorIconData(
3035     _In_ HCURSOR hCursor,
3036     _In_opt_ PUNICODE_STRING pustrModule,
3037     _In_opt_ PUNICODE_STRING puSrcName,
3038     _In_ const CURSORDATA *pCursorData);
3039 
3040 typedef struct _tagFINDEXISTINGCURICONPARAM
3041 {
3042     BOOL bIcon;
3043     LONG cx;
3044     LONG cy;
3045 } FINDEXISTINGCURICONPARAM;
3046 
3047 HICON
3048 NTAPI
3049 NtUserFindExistingCursorIcon(
3050     _In_ PUNICODE_STRING pustrModule,
3051     _In_ PUNICODE_STRING pustrRsrc,
3052     _In_ FINDEXISTINGCURICONPARAM *param);
3053 
3054 DWORD
3055 NTAPI
3056 NtUserSetDbgTag(
3057     DWORD Unknown0,
3058     DWORD Unknown1);
3059 
3060 DWORD
3061 APIENTRY
3062 NtUserSetDbgTagCount(
3063     DWORD Unknown0);
3064 
3065 HWND
3066 NTAPI
3067 NtUserSetFocus(
3068     HWND hWnd);
3069 
3070 DWORD
3071 NTAPI
3072 NtUserSetImeHotKey(
3073     DWORD Unknown0,
3074     DWORD Unknown1,
3075     DWORD Unknown2,
3076     DWORD Unknown3,
3077     DWORD Unknown4);
3078 
3079 DWORD
3080 NTAPI
3081 NtUserSetImeInfoEx(
3082     PIMEINFOEX pImeInfoEx);
3083 
3084 DWORD
3085 NTAPI
3086 NtUserSetImeOwnerWindow(
3087     DWORD Unknown0,
3088     DWORD Unknown1);
3089 
3090 DWORD
3091 NTAPI
3092 NtUserSetInformationProcess(
3093     DWORD dwUnknown1,
3094     DWORD dwUnknown2,
3095     DWORD dwUnknown3,
3096     DWORD dwUnknown4);
3097 
3098 NTSTATUS
3099 NTAPI
3100 NtUserSetInformationThread(
3101     IN HANDLE ThreadHandle,
3102     IN USERTHREADINFOCLASS ThreadInformationClass,
3103     IN PVOID ThreadInformation,
3104     IN ULONG ThreadInformationLength);
3105 
3106 DWORD
3107 NTAPI
3108 NtUserSetInternalWindowPos(
3109     HWND hwnd,
3110     UINT showCmd,
3111     LPRECT rect,
3112     LPPOINT pt);
3113 
3114 BOOL
3115 NTAPI
3116 NtUserSetKeyboardState(
3117     LPBYTE lpKeyState);
3118 
3119 BOOL
3120 NTAPI
3121 NtUserSetLayeredWindowAttributes(
3122     HWND hwnd,
3123     COLORREF crKey,
3124     BYTE bAlpha,
3125     DWORD dwFlags);
3126 
3127 BOOL
3128 NTAPI
3129 NtUserSetLogonNotifyWindow(
3130     HWND hWnd);
3131 
3132 BOOL
3133 NTAPI
3134 NtUserSetObjectInformation(
3135     HANDLE hObject,
3136     DWORD nIndex,
3137     PVOID pvInformation,
3138     DWORD nLength);
3139 
3140 HWND
3141 NTAPI
3142 NtUserSetParent(
3143     HWND hWndChild,
3144     HWND hWndNewParent);
3145 
3146 BOOL
3147 NTAPI
3148 NtUserSetProcessWindowStation(
3149     HWINSTA hWindowStation);
3150 
3151 BOOL
3152 NTAPI
3153 NtUserSetProp(
3154     HWND hWnd,
3155     ATOM Atom,
3156     HANDLE Data);
3157 
3158 DWORD
3159 NTAPI
3160 NtUserSetRipFlags(
3161     DWORD Unknown0);
3162 
3163 DWORD
3164 NTAPI
3165 NtUserSetScrollInfo(
3166     HWND hwnd,
3167     int fnBar,
3168     LPCSCROLLINFO lpsi,
3169     BOOL bRedraw);
3170 
3171 BOOL
3172 NTAPI
3173 NtUserSetShellWindowEx(
3174     HWND hwndShell,
3175     HWND hwndShellListView);
3176 
3177 BOOL
3178 NTAPI
3179 NtUserSetSysColors(
3180     int cElements,
3181     IN CONST INT *lpaElements,
3182     IN CONST COLORREF *lpaRgbValues,
3183     FLONG Flags);
3184 
3185 BOOL
3186 NTAPI
3187 NtUserSetSystemCursor(
3188     HCURSOR hcur,
3189     DWORD id);
3190 
3191 BOOL
3192 NTAPI
3193 NtUserSetThreadDesktop(
3194     HDESK hDesktop);
3195 
3196 DWORD
3197 NTAPI
3198 NtUserSetThreadState(
3199     DWORD Unknown0,
3200     DWORD Unknown1);
3201 
3202 UINT_PTR
3203 NTAPI
3204 NtUserSetSystemTimer(
3205     HWND hWnd,
3206     UINT_PTR nIDEvent,
3207     UINT uElapse,
3208     TIMERPROC lpTimerFunc);
3209 
3210 DWORD
3211 NTAPI
3212 NtUserSetThreadLayoutHandles(
3213     DWORD dwUnknown1,
3214     DWORD dwUnknown2);
3215 
3216 UINT_PTR
3217 NTAPI
3218 NtUserSetTimer(
3219     HWND hWnd,
3220     UINT_PTR nIDEvent,
3221     UINT uElapse,
3222     TIMERPROC lpTimerFunc);
3223 
3224 BOOL
3225 NTAPI
3226 NtUserSetWindowFNID(
3227     HWND hWnd,
3228     WORD fnID);
3229 
3230 LONG
3231 NTAPI
3232 NtUserSetWindowLong(
3233     HWND hWnd,
3234     DWORD Index,
3235     LONG NewValue,
3236     BOOL Ansi);
3237 
3238 #ifdef _WIN64
3239 LONG_PTR
3240 NTAPI
3241 NtUserSetWindowLongPtr(
3242     HWND hWnd,
3243     DWORD Index,
3244     LONG_PTR NewValue,
3245     BOOL Ansi);
3246 #endif // _WIN64
3247 
3248 BOOL
3249 NTAPI
3250 NtUserSetWindowPlacement(
3251     HWND hWnd,
3252     WINDOWPLACEMENT *lpwndpl);
3253 
3254 BOOL
3255 NTAPI
3256 NtUserSetWindowPos(
3257     HWND hWnd,
3258     HWND hWndInsertAfter,
3259     int X,
3260     int Y,
3261     int cx,
3262     int cy,
3263     UINT uFlags);
3264 
3265 INT
3266 NTAPI
3267 NtUserSetWindowRgn(
3268     HWND hWnd,
3269     HRGN hRgn,
3270     BOOL bRedraw);
3271 
3272 HHOOK
3273 NTAPI
3274 NtUserSetWindowsHookAW(
3275     int idHook,
3276     HOOKPROC lpfn,
3277     BOOL Ansi);
3278 
3279 HHOOK
3280 NTAPI
3281 NtUserSetWindowsHookEx(
3282     HINSTANCE Mod,
3283     PUNICODE_STRING ModuleName,
3284     DWORD ThreadId,
3285     int HookId,
3286     HOOKPROC HookProc,
3287     BOOL Ansi);
3288 
3289 BOOL
3290 NTAPI
3291 NtUserSetWindowStationUser(
3292     IN HWINSTA hWindowStation,
3293     IN PLUID pluid,
3294     IN PSID psid OPTIONAL,
3295     IN DWORD size);
3296 
3297 WORD
3298 NTAPI
3299 NtUserSetWindowWord(
3300     HWND hWnd,
3301     INT Index,
3302     WORD NewVal);
3303 
3304 HWINEVENTHOOK
3305 NTAPI
3306 NtUserSetWinEventHook(
3307     UINT eventMin,
3308     UINT eventMax,
3309     HMODULE hmodWinEventProc,
3310     PUNICODE_STRING puString,
3311     WINEVENTPROC lpfnWinEventProc,
3312     DWORD idProcess,
3313     DWORD idThread,
3314     UINT dwflags);
3315 
3316 BOOL
3317 NTAPI
3318 NtUserShowCaret(
3319     HWND hWnd);
3320 
3321 BOOL
3322 NTAPI
3323 NtUserHideCaret(
3324     HWND hWnd);
3325 
3326 DWORD
3327 NTAPI
3328 NtUserShowScrollBar(
3329     HWND hWnd,
3330     int wBar,
3331     DWORD bShow);
3332 
3333 BOOL
3334 NTAPI
3335 NtUserShowWindow(
3336     HWND hWnd,
3337     LONG nCmdShow);
3338 
3339 BOOL
3340 NTAPI
3341 NtUserShowWindowAsync(
3342     HWND hWnd,
3343     LONG nCmdShow);
3344 
3345 BOOL
3346 NTAPI
3347 NtUserSoundSentry(VOID);
3348 
3349 BOOL
3350 NTAPI
3351 NtUserSwitchDesktop(
3352     HDESK hDesktop);
3353 
3354 BOOL
3355 NTAPI
3356 NtUserSystemParametersInfo(
3357     UINT uiAction,
3358     UINT uiParam,
3359     PVOID pvParam,
3360     UINT fWinIni);
3361 
3362 DWORD
3363 NTAPI
3364 NtUserTestForInteractiveUser(
3365     DWORD dwUnknown1);
3366 
3367 INT
3368 NTAPI
3369 NtUserToUnicodeEx(
3370     UINT wVirtKey,
3371     UINT wScanCode,
3372     PBYTE lpKeyState,
3373     LPWSTR pwszBuff,
3374     int cchBuff,
3375     UINT wFlags,
3376     HKL dwhkl);
3377 
3378 BOOL
3379 NTAPI
3380 NtUserTrackMouseEvent(
3381     LPTRACKMOUSEEVENT lpEventTrack);
3382 
3383 int
3384 NTAPI
3385 NtUserTranslateAccelerator(
3386     HWND Window,
3387     HACCEL Table,
3388     LPMSG Message);
3389 
3390 BOOL
3391 NTAPI
3392 NtUserTranslateMessage(
3393     LPMSG lpMsg,
3394     UINT flags );
3395 
3396 BOOL
3397 NTAPI
3398 NtUserUnhookWindowsHookEx(
3399     HHOOK Hook);
3400 
3401 BOOL
3402 NTAPI
3403 NtUserUnhookWinEvent(
3404     HWINEVENTHOOK hWinEventHook);
3405 
3406 BOOL
3407 NTAPI
3408 NtUserUnloadKeyboardLayout(
3409     HKL hKl);
3410 
3411 BOOL
3412 NTAPI
3413 NtUserUnlockWindowStation(
3414     HWINSTA hWindowStation);
3415 
3416 BOOL
3417 NTAPI
3418 NtUserUnregisterClass(
3419     PUNICODE_STRING ClassNameOrAtom,
3420     HINSTANCE hInstance,
3421     PCLSMENUNAME pClassMenuName);
3422 
3423 BOOL
3424 NTAPI
3425 NtUserUnregisterHotKey(
3426     HWND hWnd,
3427     int id);
3428 
3429 BOOL
3430 NTAPI
3431 NtUserUnregisterUserApiHook(VOID);
3432 
3433 DWORD
3434 NTAPI
3435 NtUserUpdateInputContext(
3436     DWORD Unknown0,
3437     DWORD Unknown1,
3438     DWORD Unknown2);
3439 
3440 DWORD
3441 NTAPI
3442 NtUserUpdateInstance(
3443     DWORD Unknown0,
3444     DWORD Unknown1,
3445     DWORD Unknown2);
3446 
3447 BOOL
3448 NTAPI
3449 NtUserUpdateLayeredWindow(
3450     HWND hwnd,
3451     HDC hdcDst,
3452     POINT *pptDst,
3453     SIZE *psize,
3454     HDC hdcSrc,
3455     POINT *pptSrc,
3456     COLORREF crKey,
3457     BLENDFUNCTION *pblend,
3458     DWORD dwFlags,
3459     RECT *prcDirty);
3460 
3461 BOOL
3462 NTAPI
3463 NtUserUpdatePerUserSystemParameters(
3464     DWORD dwReserved,
3465     BOOL bEnable);
3466 
3467 BOOL
3468 NTAPI
3469 NtUserUserHandleGrantAccess(
3470     IN HANDLE hUserHandle,
3471     IN HANDLE hJob,
3472     IN BOOL bGrant);
3473 
3474 BOOL
3475 NTAPI
3476 NtUserValidateHandleSecure(
3477     HANDLE hHdl);
3478 
3479 BOOL
3480 NTAPI
3481 NtUserValidateRect(
3482     HWND hWnd,
3483     CONST RECT *lpRect);
3484 
3485 BOOL
3486 APIENTRY
3487 NtUserValidateTimerCallback(
3488     LPARAM lParam);
3489 
3490 DWORD
3491 NTAPI
3492 NtUserVkKeyScanEx(
3493     WCHAR wChar,
3494     HKL KeyboardLayout,
3495     BOOL bUsehHK);
3496 
3497 DWORD
3498 NTAPI
3499 NtUserWaitForInputIdle(
3500     IN HANDLE hProcess,
3501     IN DWORD dwMilliseconds,
3502     IN BOOL bSharedWow); /* Always FALSE */
3503 
3504 DWORD
3505 NTAPI
3506 NtUserWaitForMsgAndEvent(
3507     DWORD Unknown0);
3508 
3509 BOOL
3510 NTAPI
3511 NtUserWaitMessage(VOID);
3512 
3513 DWORD
3514 NTAPI
3515 NtUserWin32PoolAllocationStats(
3516     DWORD Unknown0,
3517     DWORD Unknown1,
3518     DWORD Unknown2,
3519     DWORD Unknown3,
3520     DWORD Unknown4,
3521     DWORD Unknown5);
3522 
3523 HWND
3524 NTAPI
3525 NtUserWindowFromPoint(
3526     LONG X,
3527     LONG Y);
3528 
3529 DWORD
3530 NTAPI
3531 NtUserYieldTask(VOID);
3532 
3533 /* NtUserBad
3534  * ReactOS-specific NtUser calls and their related structures, both which shouldn't exist.
3535  */
3536 
3537 #define NOPARAM_ROUTINE_ISCONSOLEMODE             0xffff0001
3538 #define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING     0xfffe000d
3539 #define ONEPARAM_ROUTINE_GETDESKTOPMAPPING        0xfffe000e
3540 #define TWOPARAM_ROUTINE_SETMENUBARHEIGHT         0xfffd0050
3541 #define TWOPARAM_ROUTINE_SETGUITHRDHANDLE         0xfffd0051
3542 #define HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE 0xfffd0052
3543 
3544 #define MSQ_STATE_CAPTURE   0x1
3545 #define MSQ_STATE_ACTIVE    0x2
3546 #define MSQ_STATE_FOCUS     0x3
3547 #define MSQ_STATE_MENUOWNER 0x4
3548 #define MSQ_STATE_MOVESIZE  0x5
3549 #define MSQ_STATE_CARET     0x6
3550 
3551 #define TWOPARAM_ROUTINE_ROS_UPDATEUISTATE   0x1004
3552 #define HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT 0x1005
3553 
3554 BOOL
3555 NTAPI
3556 NtUserGetMonitorInfo(
3557     IN HMONITOR hMonitor,
3558     OUT LPMONITORINFO pMonitorInfo);
3559 
3560 /* Should be done in usermode */
3561 
3562 HMONITOR
3563 NTAPI
3564 NtUserMonitorFromPoint(
3565     IN POINT point,
3566     IN DWORD dwFlags);
3567 
3568 HMONITOR
3569 NTAPI
3570 NtUserMonitorFromRect(
3571     IN LPCRECT pRect,
3572     IN DWORD dwFlags);
3573 
3574 HMONITOR
3575 NTAPI
3576 NtUserMonitorFromWindow(
3577     IN HWND hWnd,
3578     IN DWORD dwFlags);
3579 
3580 typedef struct _SETSCROLLBARINFO
3581 {
3582     int nTrackPos;
3583     int reserved;
3584     DWORD rgstate[CCHILDREN_SCROLLBAR + 1];
3585 } SETSCROLLBARINFO, *PSETSCROLLBARINFO;
3586 
3587 BOOL
3588 NTAPI
3589 NtUserSetScrollBarInfo(
3590     HWND hwnd,
3591     LONG idObject,
3592     SETSCROLLBARINFO *info);
3593 
3594 #endif /* __WIN32K_NTUSER_H */
3595 
3596 /* EOF */
3597