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