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