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