636392365fba8ce42c143678fef3ece81d1c2168
[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(
1321 DWORD dwUnknown1,
1322 DWORD dwUnknown2,
1323 DWORD dwUnknown3);
1324
1325 NTSTATUS
1326 NTAPI
1327 NtUserBuildHimcList(DWORD dwThreadId, DWORD dwCount, HIMC *phList, LPDWORD pdwCount);
1328
1329 DWORD
1330 NTAPI
1331 NtUserCalcMenuBar(
1332 HWND hwnd,
1333 DWORD x,
1334 DWORD width,
1335 DWORD y,
1336 LPRECT prc);
1337
1338 DWORD
1339 NTAPI
1340 NtUserCheckMenuItem(
1341 HMENU hmenu,
1342 UINT uIDCheckItem,
1343 UINT uCheck);
1344
1345 DWORD
1346 NTAPI
1347 NtUserCtxDisplayIOCtl(
1348 DWORD dwUnknown1,
1349 DWORD dwUnknown2,
1350 DWORD dwUnknown3);
1351
1352 DWORD
1353 APIENTRY
1354 NtUserDbgWin32HeapFail(
1355 DWORD Unknown0,
1356 DWORD Unknown1);
1357
1358 DWORD
1359 APIENTRY
1360 NtUserDbgWin32HeapStat(
1361 DWORD Unknown0,
1362 DWORD Unknown1);
1363
1364 BOOL
1365 NTAPI
1366 NtUserDeleteMenu(
1367 HMENU hMenu,
1368 UINT uPosition,
1369 UINT uFlags);
1370
1371 BOOL
1372 NTAPI
1373 NtUserDestroyMenu(
1374 HMENU hMenu);
1375
1376 DWORD
1377 NTAPI
1378 NtUserDrawMenuBarTemp(
1379 HWND hWnd,
1380 HDC hDC,
1381 PRECT hRect,
1382 HMENU hMenu,
1383 HFONT hFont);
1384
1385 UINT
1386 NTAPI
1387 NtUserEnableMenuItem(
1388 HMENU hMenu,
1389 UINT uIDEnableItem,
1390 UINT uEnable);
1391
1392 BOOL
1393 NTAPI
1394 NtUserEndMenu(VOID);
1395
1396 BOOL
1397 NTAPI
1398 NtUserGetMenuBarInfo(
1399 HWND hwnd,
1400 LONG idObject,
1401 LONG idItem,
1402 PMENUBARINFO pmbi);
1403
1404 UINT
1405 NTAPI
1406 NtUserGetMenuIndex(
1407 HMENU hMenu,
1408 HMENU hSubMenu);
1409
1410 BOOL
1411 NTAPI
1412 NtUserGetMenuItemRect(
1413 HWND hWnd,
1414 HMENU hMenu,
1415 UINT uItem,
1416 LPRECT lprcItem);
1417
1418 HMENU
1419 NTAPI
1420 NtUserGetSystemMenu(
1421 HWND hWnd,
1422 BOOL bRevert);
1423
1424 BOOL
1425 NTAPI
1426 NtUserHiliteMenuItem(
1427 HWND hWnd,
1428 HMENU hMenu,
1429 UINT uItemHilite,
1430 UINT uHilite);
1431
1432 int
1433 NTAPI
1434 NtUserMenuItemFromPoint(
1435 HWND hWnd,
1436 HMENU hMenu,
1437 DWORD X,
1438 DWORD Y);
1439
1440 BOOL
1441 NTAPI
1442 NtUserRemoveMenu(
1443 HMENU hMenu,
1444 UINT uPosition,
1445 UINT uFlags);
1446
1447 BOOL
1448 NTAPI
1449 NtUserSetMenu(
1450 HWND hWnd,
1451 HMENU hMenu,
1452 BOOL bRepaint);
1453
1454 BOOL
1455 NTAPI
1456 NtUserSetMenuContextHelpId(
1457 HMENU hmenu,
1458 DWORD dwContextHelpId);
1459
1460 BOOL
1461 NTAPI
1462 NtUserSetMenuDefaultItem(
1463 HMENU hMenu,
1464 UINT uItem,
1465 UINT fByPos);
1466
1467 BOOL
1468 NTAPI
1469 NtUserSetMenuFlagRtoL(
1470 HMENU hMenu);
1471
1472 BOOL
1473 NTAPI
1474 NtUserSetSystemMenu(
1475 HWND hWnd,
1476 HMENU hMenu);
1477
1478 BOOL
1479 NTAPI
1480 NtUserThunkedMenuInfo(
1481 HMENU hMenu,
1482 LPCMENUINFO lpcmi);
1483
1484 BOOL
1485 NTAPI
1486 NtUserThunkedMenuItemInfo(
1487 HMENU hMenu,
1488 UINT uItem,
1489 BOOL fByPosition,
1490 BOOL bInsert,
1491 LPMENUITEMINFOW lpmii,
1492 PUNICODE_STRING lpszCaption);
1493
1494 BOOL
1495 NTAPI
1496 NtUserTrackPopupMenuEx(
1497 HMENU hmenu,
1498 UINT fuFlags,
1499 int x,
1500 int y,
1501 HWND hwnd,
1502 LPTPMPARAMS lptpm);
1503
1504 HKL
1505 NTAPI
1506 NtUserActivateKeyboardLayout(
1507 HKL hKl,
1508 ULONG Flags);
1509
1510 DWORD
1511 NTAPI
1512 NtUserAlterWindowStyle(
1513 HWND hWnd,
1514 DWORD Index,
1515 LONG NewValue);
1516
1517 BOOL
1518 NTAPI
1519 NtUserAttachThreadInput(
1520 IN DWORD idAttach,
1521 IN DWORD idAttachTo,
1522 IN BOOL fAttach);
1523
1524 HDC NTAPI
1525 NtUserBeginPaint(
1526 HWND hWnd,
1527 PAINTSTRUCT *lPs);
1528
1529 BOOL
1530 NTAPI
1531 NtUserBitBltSysBmp(
1532 HDC hdc,
1533 INT nXDest,
1534 INT nYDest,
1535 INT nWidth,
1536 INT nHeight,
1537 INT nXSrc,
1538 INT nYSrc,
1539 DWORD dwRop);
1540
1541 BOOL
1542 NTAPI
1543 NtUserBlockInput(
1544 BOOL BlockIt);
1545
1546 NTSTATUS
1547 NTAPI
1548 NtUserBuildHwndList(
1549 HDESK hDesktop,
1550 HWND hwndParent,
1551 BOOLEAN bChildren,
1552 ULONG dwThreadId,
1553 ULONG lParam,
1554 HWND *pWnd,
1555 ULONG *pBufSize);
1556
1557 NTSTATUS
1558 NTAPI
1559 NtUserBuildNameList(
1560 HWINSTA hWinSta,
1561 ULONG dwSize,
1562 PVOID lpBuffer,
1563 PULONG pRequiredSize);
1564
1565 NTSTATUS
1566 NTAPI
1567 NtUserBuildPropList(
1568 HWND hWnd,
1569 LPVOID Buffer,
1570 DWORD BufferSize,
1571 DWORD *Count);
1572
1573 /* apfnSimpleCall indices from Windows XP SP 2 */
1574 /* TODO: Check for differences in Windows 2000, 2003 and 2008 */
1575 #define WIN32K_VERSION NTDDI_WINXPSP2 /* FIXME: this should go somewhere else */
1576
1577 enum SimpleCallRoutines
1578 {
1579 NOPARAM_ROUTINE_CREATEMENU,
1580 NOPARAM_ROUTINE_CREATEMENUPOPUP,
1581 #if (WIN32K_VERSION >= NTDDI_VISTA)
1582 NOPARAM_ROUTINE_ALLOWFOREGNDACTIVATION,
1583 NOPARAM_ROUTINE_MSQCLEARWAKEMASK,
1584 NOPARAM_ROUTINE_CREATESYSTEMTHREADS,
1585 NOPARAM_ROUTINE_DESTROY_CARET,
1586 #endif
1587 NOPARAM_ROUTINE_ENABLEPROCWNDGHSTING,
1588 #if (WIN32K_VERSION < NTDDI_VISTA)
1589 NOPARAM_ROUTINE_MSQCLEARWAKEMASK,
1590 NOPARAM_ROUTINE_ALLOWFOREGNDACTIVATION,
1591 NOPARAM_ROUTINE_DESTROY_CARET,
1592 #endif
1593 NOPARAM_ROUTINE_GETDEVICECHANGEINFO,
1594 NOPARAM_ROUTINE_GETIMESHOWSTATUS,
1595 NOPARAM_ROUTINE_GETINPUTDESKTOP,
1596 NOPARAM_ROUTINE_GETMSESSAGEPOS,
1597 #if (WIN32K_VERSION >= NTDDI_VISTA)
1598 NOPARAM_ROUTINE_HANDLESYSTHRDCREATFAIL,
1599 #else
1600 NOPARAM_ROUTINE_GETREMOTEPROCESSID,
1601 #endif
1602 NOPARAM_ROUTINE_HIDECURSORNOCAPTURE,
1603 NOPARAM_ROUTINE_LOADCURSANDICOS,
1604 #if (WIN32K_VERSION >= NTDDI_VISTA)
1605 NOPARAM_ROUTINE_LOADUSERAPIHOOK,
1606 NOPARAM_ROUTINE_PREPAREFORLOGOFF, /* 0x0f */
1607 #endif
1608 NOPARAM_ROUTINE_RELEASECAPTURE,
1609 NOPARAM_ROUTINE_RESETDBLCLICK,
1610 NOPARAM_ROUTINE_ZAPACTIVEANDFOUS,
1611 NOPARAM_ROUTINE_REMOTECONSHDWSTOP,
1612 NOPARAM_ROUTINE_REMOTEDISCONNECT,
1613 NOPARAM_ROUTINE_REMOTELOGOFF,
1614 NOPARAM_ROUTINE_REMOTENTSECURITY,
1615 NOPARAM_ROUTINE_REMOTESHDWSETUP,
1616 NOPARAM_ROUTINE_REMOTESHDWSTOP,
1617 NOPARAM_ROUTINE_REMOTEPASSTHRUENABLE,
1618 NOPARAM_ROUTINE_REMOTEPASSTHRUDISABLE,
1619 NOPARAM_ROUTINE_REMOTECONNECTSTATE,
1620 NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING,
1621 NOPARAM_ROUTINE_USERPWRCALLOUTWORKER,
1622 #if (WIN32K_VERSION >= NTDDI_VISTA)
1623 NOPARAM_ROUTINE_WAKERITFORSHTDWN,
1624 #endif
1625 NOPARAM_ROUTINE_INIT_MESSAGE_PUMP,
1626 NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP,
1627 #if (WIN32K_VERSION < NTDDI_VISTA)
1628 NOPARAM_ROUTINE_LOADUSERAPIHOOK,
1629 #endif
1630 ONEPARAM_ROUTINE_BEGINDEFERWNDPOS,
1631 #if (WIN32K_VERSION >= NTDDI_VISTA)
1632 ONEPARAM_ROUTINE_GETSENDMSGRECVR,
1633 #endif
1634 ONEPARAM_ROUTINE_WINDOWFROMDC,
1635 ONEPARAM_ROUTINE_ALLOWSETFOREGND,
1636 ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT,
1637 #if (WIN32K_VERSION < NTDDI_VISTA)
1638 ONEPARAM_ROUTINE_CREATESYSTEMTHREADS,
1639 #endif
1640 ONEPARAM_ROUTINE_CSDDEUNINITIALIZE,
1641 ONEPARAM_ROUTINE_DIRECTEDYIELD,
1642 ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS,
1643 #if (WIN32K_VERSION < NTDDI_VISTA)
1644 ONEPARAM_ROUTINE_GETCURSORPOS,
1645 #endif
1646 ONEPARAM_ROUTINE_GETINPUTEVENT,
1647 ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT,
1648 ONEPARAM_ROUTINE_GETKEYBOARDTYPE,
1649 ONEPARAM_ROUTINE_GETPROCDEFLAYOUT,
1650 ONEPARAM_ROUTINE_GETQUEUESTATUS,
1651 ONEPARAM_ROUTINE_GETWINSTAINFO,
1652 #if (WIN32K_VERSION < NTDDI_VISTA)
1653 ONEPARAM_ROUTINE_HANDLESYSTHRDCREATFAIL,
1654 #endif
1655 ONEPARAM_ROUTINE_LOCKFOREGNDWINDOW,
1656 ONEPARAM_ROUTINE_LOADFONTS,
1657 ONEPARAM_ROUTINE_MAPDEKTOPOBJECT,
1658 ONEPARAM_ROUTINE_MESSAGEBEEP,
1659 ONEPARAM_ROUTINE_PLAYEVENTSOUND,
1660 ONEPARAM_ROUTINE_POSTQUITMESSAGE,
1661 #if (WIN32K_VERSION < NTDDI_VISTA)
1662 ONEPARAM_ROUTINE_PREPAREFORLOGOFF,
1663 #endif
1664 ONEPARAM_ROUTINE_REALIZEPALETTE,
1665 ONEPARAM_ROUTINE_REGISTERLPK,
1666 #if (WIN32K_VERSION >= NTDDI_VISTA)
1667 ONEPARAM_ROUTINE_REGISTERSYSTEMTHREAD,
1668 #endif
1669 ONEPARAM_ROUTINE_REMOTERECONNECT,
1670 ONEPARAM_ROUTINE_REMOTETHINWIRESTATUS,
1671 ONEPARAM_ROUTINE_RELEASEDC,
1672 #if (WIN32K_VERSION >= NTDDI_VISTA)
1673 ONEPARAM_ROUTINE_REMOTENOTIFY,
1674 #endif
1675 ONEPARAM_ROUTINE_REPLYMESSAGE,
1676 ONEPARAM_ROUTINE_SETCARETBLINKTIME,
1677 ONEPARAM_ROUTINE_SETDBLCLICKTIME,
1678 #if (WIN32K_VERSION < NTDDI_VISTA)
1679 ONEPARAM_ROUTINE_SETIMESHOWSTATUS,
1680 #endif
1681 ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO,
1682 ONEPARAM_ROUTINE_SETPROCDEFLAYOUT,
1683 #if (WIN32K_VERSION >= NTDDI_VISTA)
1684 ONEPARAM_ROUTINE_SETWATERMARKSTRINGS,
1685 #endif
1686 ONEPARAM_ROUTINE_SHOWCURSOR,
1687 ONEPARAM_ROUTINE_SHOWSTARTGLASS,
1688 ONEPARAM_ROUTINE_SWAPMOUSEBUTTON,
1689 X_ROUTINE_WOWMODULEUNLOAD,
1690 #if (WIN32K_VERSION < NTDDI_VISTA)
1691 X_ROUTINE_REMOTENOTIFY,
1692 #endif
1693 HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW,
1694 HWND_ROUTINE_DWP_GETENABLEDPOPUP,
1695 HWND_ROUTINE_GETWNDCONTEXTHLPID,
1696 HWND_ROUTINE_REGISTERSHELLHOOKWINDOW,
1697 HWND_ROUTINE_SETMSGBOX,
1698 HWNDOPT_ROUTINE_SETPROGMANWINDOW,
1699 HWNDOPT_ROUTINE_SETTASKMANWINDOW,
1700 HWNDPARAM_ROUTINE_GETCLASSICOCUR,
1701 HWNDPARAM_ROUTINE_CLEARWINDOWSTATE,
1702 HWNDPARAM_ROUTINE_KILLSYSTEMTIMER,
1703 HWNDPARAM_ROUTINE_SETDIALOGPOINTER,
1704 HWNDPARAM_ROUTINE_SETVISIBLE,
1705 HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID,
1706 HWNDPARAM_ROUTINE_SETWINDOWSTATE,
1707 HWNDLOCK_ROUTINE_WINDOWHASSHADOW, /* correct prefix ? */
1708 HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS,
1709 HWNDLOCK_ROUTINE_DRAWMENUBAR,
1710 HWNDLOCK_ROUTINE_CHECKIMESHOWSTATUSINTHRD,
1711 HWNDLOCK_ROUTINE_GETSYSMENUHANDLE,
1712 HWNDLOCK_ROUTINE_REDRAWFRAME,
1713 HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK,
1714 HWNDLOCK_ROUTINE_SETDLGSYSMENU,
1715 HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW,
1716 HWNDLOCK_ROUTINE_SETSYSMENU,
1717 HWNDLOCK_ROUTINE_UPDATECKIENTRECT,
1718 HWNDLOCK_ROUTINE_UPDATEWINDOW,
1719 X_ROUTINE_IMESHOWSTATUSCHANGE,
1720 TWOPARAM_ROUTINE_ENABLEWINDOW,
1721 TWOPARAM_ROUTINE_REDRAWTITLE,
1722 TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS,
1723 TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW,
1724 TWOPARAM_ROUTINE_UPDATEWINDOWS,
1725 TWOPARAM_ROUTINE_VALIDATERGN,
1726 #if (WIN32K_VERSION >= NTDDI_VISTA)
1727 TWOPARAM_ROUTINE_CHANGEWNDMSGFILTER,
1728 TWOPARAM_ROUTINE_GETCURSORPOS,
1729 #endif
1730 TWOPARAM_ROUTINE_GETHDEVNAME,
1731 TWOPARAM_ROUTINE_INITANSIOEM,
1732 TWOPARAM_ROUTINE_NLSSENDIMENOTIFY,
1733 #if (WIN32K_VERSION >= NTDDI_VISTA)
1734 TWOPARAM_ROUTINE_REGISTERGHSTWND,
1735 #endif
1736 TWOPARAM_ROUTINE_REGISTERLOGONPROCESS,
1737 #if (WIN32K_VERSION >= NTDDI_VISTA)
1738 TWOPARAM_ROUTINE_REGISTERSBLFROSTWND,
1739 #else
1740 TWOPARAM_ROUTINE_REGISTERSYSTEMTHREAD,
1741 #endif
1742 TWOPARAM_ROUTINE_REGISTERUSERHUNGAPPHANDLERS,
1743 TWOPARAM_ROUTINE_SHADOWCLEANUP,
1744 TWOPARAM_ROUTINE_REMOTESHADOWSTART,
1745 TWOPARAM_ROUTINE_SETCARETPOS,
1746 TWOPARAM_ROUTINE_SETCURSORPOS,
1747 #if (WIN32K_VERSION >= NTDDI_VISTA)
1748 TWOPARAM_ROUTINE_SETPHYSCURSORPOS,
1749 #endif
1750 TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK,
1751 TWOPARAM_ROUTINE_WOWCLEANUP
1752 };
1753
1754 DWORD
1755 NTAPI
1756 NtUserCallHwnd(
1757 HWND hWnd,
1758 DWORD Routine);
1759
1760 BOOL
1761 NTAPI
1762 NtUserCallHwndLock(
1763 HWND hWnd,
1764 DWORD Routine);
1765
1766 HWND
1767 NTAPI
1768 NtUserCallHwndOpt(
1769 HWND hWnd,
1770 DWORD Routine);
1771
1772 DWORD
1773 NTAPI
1774 NtUserCallHwndParam(
1775 HWND hWnd,
1776 DWORD_PTR Param,
1777 DWORD Routine);
1778
1779 DWORD
1780 NTAPI
1781 NtUserCallHwndParamLock(
1782 HWND hWnd,
1783 DWORD_PTR Param,
1784 DWORD Routine);
1785
1786 BOOL
1787 NTAPI
1788 NtUserCallMsgFilter(
1789 LPMSG msg,
1790 INT code);
1791
1792 LRESULT
1793 NTAPI
1794 NtUserCallNextHookEx(
1795 int Code,
1796 WPARAM wParam,
1797 LPARAM lParam,
1798 BOOL Ansi);
1799
1800 DWORD_PTR
1801 NTAPI
1802 NtUserCallNoParam(
1803 DWORD Routine);
1804
1805 DWORD_PTR
1806 NTAPI
1807 NtUserCallOneParam(
1808 DWORD_PTR Param,
1809 DWORD Routine);
1810
1811 DWORD_PTR
1812 NTAPI
1813 NtUserCallTwoParam(
1814 DWORD_PTR Param1,
1815 DWORD_PTR Param2,
1816 DWORD Routine);
1817
1818 BOOL
1819 NTAPI
1820 NtUserChangeClipboardChain(
1821 HWND hWndRemove,
1822 HWND hWndNewNext);
1823
1824 LONG
1825 NTAPI
1826 NtUserChangeDisplaySettings(
1827 PUNICODE_STRING lpszDeviceName,
1828 LPDEVMODEW lpDevMode,
1829 DWORD dwflags,
1830 LPVOID lParam);
1831
1832 BOOL
1833 NTAPI
1834 NtUserCheckDesktopByThreadId(
1835 DWORD dwThreadId);
1836
1837 BOOL
1838 NTAPI
1839 NtUserCheckWindowThreadDesktop(
1840 HWND hwnd,
1841 DWORD dwThreadId,
1842 ULONG ReturnValue);
1843
1844 DWORD
1845 NTAPI
1846 NtUserCheckImeHotKey(
1847 DWORD dwUnknown1,
1848 LPARAM dwUnknown2);
1849
1850 HWND NTAPI
1851 NtUserChildWindowFromPointEx(
1852 HWND Parent,
1853 LONG x,
1854 LONG y,
1855 UINT Flags);
1856
1857 BOOL
1858 NTAPI
1859 NtUserClipCursor(
1860 RECT *lpRect);
1861
1862 BOOL
1863 NTAPI
1864 NtUserCloseClipboard(VOID);
1865
1866 BOOL
1867 NTAPI
1868 NtUserCloseDesktop(
1869 HDESK hDesktop);
1870
1871 BOOL
1872 NTAPI
1873 NtUserCloseWindowStation(
1874 HWINSTA hWinSta);
1875
1876 /* Console commands for NtUserConsoleControl */
1877 typedef enum _CONSOLECONTROL
1878 {
1879 ConsoleCtrlDesktopConsoleThread = 0,
1880 GuiConsoleWndClassAtom = 1,
1881 ConsoleMakePalettePublic = 5,
1882 ConsoleAcquireDisplayOwnership,
1883 } CONSOLECONTROL, *PCONSOLECONTROL;
1884
1885 typedef struct _DESKTOP_CONSOLE_THREAD
1886 {
1887 HDESK DesktopHandle;
1888 ULONG_PTR ThreadId;
1889 } DESKTOP_CONSOLE_THREAD, *PDESKTOP_CONSOLE_THREAD;
1890
1891 NTSTATUS
1892 APIENTRY
1893 NtUserConsoleControl(
1894 IN CONSOLECONTROL ConsoleCtrl,
1895 IN PVOID ConsoleCtrlInfo,
1896 IN ULONG ConsoleCtrlInfoLength);
1897
1898 HANDLE
1899 NTAPI
1900 NtUserConvertMemHandle(
1901 PVOID pData,
1902 DWORD cbData);
1903
1904 ULONG
1905 NTAPI
1906 NtUserCopyAcceleratorTable(
1907 HACCEL Table,
1908 LPACCEL Entries,
1909 ULONG EntriesCount);
1910
1911 DWORD
1912 NTAPI
1913 NtUserCountClipboardFormats(VOID);
1914
1915 HACCEL
1916 NTAPI
1917 NtUserCreateAcceleratorTable(
1918 LPACCEL Entries,
1919 ULONG EntriesCount);
1920
1921 BOOL
1922 NTAPI
1923 NtUserCreateCaret(
1924 HWND hWnd,
1925 HBITMAP hBitmap,
1926 int nWidth,
1927 int nHeight);
1928
1929 HDESK
1930 NTAPI
1931 NtUserCreateDesktop(
1932 POBJECT_ATTRIBUTES poa,
1933 PUNICODE_STRING lpszDesktopDevice,
1934 LPDEVMODEW lpdmw,
1935 DWORD dwFlags,
1936 ACCESS_MASK dwDesiredAccess);
1937
1938 HIMC
1939 NTAPI
1940 NtUserCreateInputContext(PCLIENTIMC pClientImc);
1941
1942 NTSTATUS
1943 NTAPI
1944 NtUserCreateLocalMemHandle(
1945 HANDLE hMem,
1946 PVOID pData,
1947 DWORD cbData,
1948 DWORD *pcbData);
1949
1950 HWND
1951 NTAPI
1952 NtUserCreateWindowEx(
1953 DWORD dwExStyle,
1954 PLARGE_STRING plstrClassName,
1955 PLARGE_STRING plstrClsVersion,
1956 PLARGE_STRING plstrWindowName,
1957 DWORD dwStyle,
1958 int x,
1959 int y,
1960 int nWidth,
1961 int nHeight,
1962 HWND hWndParent,
1963 HMENU hMenu,
1964 HINSTANCE hInstance,
1965 LPVOID lpParam,
1966 DWORD dwFlags,
1967 PVOID acbiBuffer);
1968
1969 HWINSTA
1970 NTAPI
1971 NtUserCreateWindowStation(
1972 POBJECT_ATTRIBUTES ObjectAttributes,
1973 ACCESS_MASK dwDesiredAccess,
1974 DWORD Unknown2,
1975 DWORD Unknown3,
1976 DWORD Unknown4,
1977 DWORD Unknown5,
1978 DWORD Unknown6);
1979
1980 BOOL
1981 NTAPI
1982 NtUserDdeGetQualityOfService(
1983 IN HWND hwndClient,
1984 IN HWND hWndServer,
1985 OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev);
1986
1987 DWORD
1988 NTAPI
1989 NtUserDdeInitialize(
1990 DWORD Unknown0,
1991 DWORD Unknown1,
1992 DWORD Unknown2,
1993 DWORD Unknown3,
1994 DWORD Unknown4);
1995
1996 BOOL
1997 NTAPI
1998 NtUserDdeSetQualityOfService(
1999 IN HWND hwndClient,
2000 IN PSECURITY_QUALITY_OF_SERVICE pqosNew,
2001 OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev);
2002
2003 HDWP
2004 NTAPI
2005 NtUserDeferWindowPos(
2006 HDWP WinPosInfo,
2007 HWND Wnd,
2008 HWND WndInsertAfter,
2009 int x,
2010 int y,
2011 int cx,
2012 int cy,
2013 UINT Flags);
2014
2015 BOOL
2016 NTAPI
2017 NtUserDefSetText(
2018 HWND WindowHandle,
2019 PLARGE_STRING WindowText);
2020
2021 BOOLEAN
2022 NTAPI
2023 NtUserDestroyAcceleratorTable(
2024 HACCEL Table);
2025
2026 BOOL
2027 NTAPI
2028 NtUserDestroyCursor(
2029 _In_ HANDLE Handle,
2030 _In_ BOOL bForce);
2031
2032 BOOL
2033 NTAPI
2034 NtUserDestroyInputContext(HIMC hIMC);
2035
2036 BOOLEAN
2037 NTAPI
2038 NtUserDestroyWindow(
2039 HWND Wnd);
2040
2041 DWORD
2042 NTAPI
2043 NtUserDisableThreadIme(
2044 DWORD dwUnknown1);
2045
2046 LRESULT
2047 NTAPI
2048 NtUserDispatchMessage(
2049 PMSG pMsg);
2050
2051 BOOL
2052 NTAPI
2053 NtUserDragDetect(
2054 HWND hWnd,
2055 POINT pt);
2056
2057 DWORD
2058 NTAPI
2059 NtUserDragObject(
2060 HWND hwnd1,
2061 HWND hwnd2,
2062 UINT u1,
2063 DWORD dw1,
2064 HCURSOR hc1);
2065
2066 BOOL
2067 NTAPI
2068 NtUserDrawAnimatedRects(
2069 HWND hwnd,
2070 INT idAni,
2071 RECT *lprcFrom,
2072 RECT *lprcTo);
2073
2074 BOOL
2075 NTAPI
2076 NtUserDrawCaption(
2077 HWND hWnd,
2078 HDC hDc,
2079 LPCRECT lpRc,
2080 UINT uFlags);
2081
2082 BOOL
2083 NTAPI
2084 NtUserDrawCaptionTemp(
2085 HWND hWnd,
2086 HDC hDC,
2087 LPCRECT lpRc,
2088 HFONT hFont,
2089 HICON hIcon,
2090 const PUNICODE_STRING str,
2091 UINT uFlags);
2092
2093 /* Used with NtUserDrawIconEx, last parameter. */
2094 typedef struct _DRAWICONEXDATA
2095 {
2096 HBITMAP hbmMask;
2097 HBITMAP hbmColor;
2098 int cx;
2099 int cy;
2100 } DRAWICONEXDATA, *PDRAWICONEXDATA;
2101
2102 BOOL
2103 NTAPI
2104 NtUserDrawIconEx(
2105 HDC hdc,
2106 int xLeft,
2107 int yTop,
2108 HICON hIcon,
2109 int cxWidth,
2110 int cyWidth,
2111 UINT istepIfAniCur,
2112 HBRUSH hbrFlickerFreeDraw,
2113 UINT diFlags,
2114 BOOL bMetaHDC,
2115 PVOID pDIXData);
2116
2117 BOOL
2118 NTAPI
2119 NtUserEmptyClipboard(VOID);
2120
2121 BOOL
2122 NTAPI
2123 NtUserEnableScrollBar(
2124 HWND hWnd,
2125 UINT wSBflags,
2126 UINT wArrows);
2127
2128 BOOL
2129 NTAPI
2130 NtUserEndDeferWindowPosEx(
2131 HDWP WinPosInfo,
2132 DWORD Unknown1);
2133
2134 BOOL
2135 NTAPI
2136 NtUserEndPaint(
2137 HWND hWnd,
2138 CONST PAINTSTRUCT *lPs);
2139
2140 BOOL
2141 NTAPI
2142 NtUserEnumDisplayDevices(
2143 PUNICODE_STRING lpDevice, /* device name */
2144 DWORD iDevNum, /* display device */
2145 PDISPLAY_DEVICEW lpDisplayDevice, /* device information */
2146 DWORD dwFlags); /* reserved */
2147
2148 /*
2149 BOOL
2150 NTAPI
2151 NtUserEnumDisplayMonitors(
2152 HDC hdc,
2153 LPCRECT lprcClip,
2154 MONITORENUMPROC lpfnEnum,
2155 LPARAM dwData);
2156 */
2157 /* FIXME: The call below is ros-specific and should be rewritten to use the same params as the correct call above. */
2158 INT
2159 NTAPI
2160 NtUserEnumDisplayMonitors(
2161 OPTIONAL IN HDC hDC,
2162 OPTIONAL IN LPCRECT pRect,
2163 OPTIONAL OUT HMONITOR *hMonitorList,
2164 OPTIONAL OUT LPRECT monitorRectList,
2165 OPTIONAL IN DWORD listSize);
2166
2167
2168 NTSTATUS
2169 NTAPI
2170 NtUserEnumDisplaySettings(
2171 PUNICODE_STRING lpszDeviceName,
2172 DWORD iModeNum,
2173 LPDEVMODEW lpDevMode, /* FIXME is this correct? */
2174 DWORD dwFlags);
2175
2176 DWORD
2177 NTAPI
2178 NtUserEvent(
2179 DWORD Unknown0);
2180
2181 INT
2182 NTAPI
2183 NtUserExcludeUpdateRgn(
2184 HDC hDC,
2185 HWND hWnd);
2186
2187 BOOL
2188 NTAPI
2189 NtUserFillWindow(
2190 HWND hWndPaint,
2191 HWND hWndPaint1,
2192 HDC hDC,
2193 HBRUSH hBrush);
2194
2195 HWND
2196 NTAPI
2197 NtUserFindWindowEx(
2198 HWND hwndParent,
2199 HWND hwndChildAfter,
2200 PUNICODE_STRING ucClassName,
2201 PUNICODE_STRING ucWindowName,
2202 DWORD dwUnknown);
2203
2204 BOOL
2205 NTAPI
2206 NtUserFlashWindowEx(
2207 IN PFLASHWINFO pfwi);
2208
2209 BOOL
2210 NTAPI
2211 NtUserGetAltTabInfo(
2212 HWND hwnd,
2213 INT iItem,
2214 PALTTABINFO pati,
2215 LPWSTR pszItemText,
2216 UINT cchItemText,
2217 BOOL Ansi);
2218
2219 HWND
2220 NTAPI
2221 NtUserGetAncestor(
2222 HWND hWnd,
2223 UINT Flags);
2224
2225 DWORD
2226 NTAPI
2227 NtUserGetAppImeLevel(HWND hWnd);
2228
2229 SHORT
2230 NTAPI
2231 NtUserGetAsyncKeyState(
2232 INT Key);
2233
2234 _Success_(return != 0)
2235 _At_(pustrName->Buffer, _Out_z_bytecap_post_bytecount_(pustrName->MaximumLength, return * 2 + 2))
2236 ULONG
2237 APIENTRY
2238 NtUserGetAtomName(
2239 _In_ ATOM atom,
2240 _Inout_ PUNICODE_STRING pustrName);
2241
2242 UINT
2243 NTAPI
2244 NtUserGetCaretBlinkTime(VOID);
2245
2246 BOOL
2247 NTAPI
2248 NtUserGetCaretPos(
2249 LPPOINT lpPoint);
2250
2251 BOOL
2252 NTAPI
2253 NtUserGetClassInfo(
2254 HINSTANCE hInstance,
2255 PUNICODE_STRING ClassName,
2256 LPWNDCLASSEXW wcex,
2257 LPWSTR *ppszMenuName,
2258 BOOL Ansi);
2259
2260 INT
2261 NTAPI
2262 NtUserGetClassName(
2263 HWND hWnd,
2264 BOOL Real, /* 0 GetClassNameW, 1 RealGetWindowClassA/W */
2265 PUNICODE_STRING ClassName);
2266
2267 HANDLE
2268 NTAPI
2269 NtUserGetClipboardData(
2270 UINT fmt,
2271 PGETCLIPBDATA pgcd);
2272
2273 INT
2274 NTAPI
2275 NtUserGetClipboardFormatName(
2276 UINT uFormat,
2277 LPWSTR lpszFormatName,
2278 INT cchMaxCount);
2279
2280 HWND
2281 NTAPI
2282 NtUserGetClipboardOwner(VOID);
2283
2284 DWORD
2285 NTAPI
2286 NtUserGetClipboardSequenceNumber(VOID);
2287
2288 HWND
2289 NTAPI
2290 NtUserGetClipboardViewer(VOID);
2291
2292 BOOL
2293 NTAPI
2294 NtUserGetClipCursor(
2295 RECT *lpRect);
2296
2297 BOOL
2298 NTAPI
2299 NtUserGetComboBoxInfo(
2300 HWND hWnd,
2301 PCOMBOBOXINFO pcbi);
2302
2303 HBRUSH
2304 NTAPI
2305 NtUserGetControlBrush(
2306 HWND hwnd,
2307 HDC hdc,
2308 UINT ctlType);
2309
2310 HBRUSH
2311 NTAPI
2312 NtUserGetControlColor(
2313 HWND hwndParent,
2314 HWND hwnd,
2315 HDC hdc,
2316 UINT CtlMsg);
2317
2318 ULONG_PTR
2319 NTAPI
2320 NtUserGetCPD(
2321 HWND hWnd,
2322 GETCPD Flags,
2323 ULONG_PTR Proc);
2324
2325 HCURSOR
2326 NTAPI
2327 NtUserGetCursorFrameInfo(
2328 HCURSOR hCursor,
2329 DWORD istep,
2330 INT *rate_jiffies,
2331 DWORD *num_steps);
2332
2333 BOOL
2334 NTAPI
2335 NtUserGetCursorInfo(
2336 PCURSORINFO pci);
2337
2338 HDC
2339 NTAPI
2340 NtUserGetDC(
2341 HWND hWnd);
2342
2343 HDC
2344 NTAPI
2345 NtUserGetDCEx(
2346 HWND hWnd,
2347 HANDLE hRegion,
2348 ULONG Flags);
2349
2350 UINT
2351 NTAPI
2352 NtUserGetDoubleClickTime(VOID);
2353
2354 HWND
2355 NTAPI
2356 NtUserGetForegroundWindow(VOID);
2357
2358 DWORD
2359 NTAPI
2360 NtUserGetGuiResources(
2361 HANDLE hProcess,
2362 DWORD uiFlags);
2363
2364 BOOL
2365 NTAPI
2366 NtUserGetGUIThreadInfo(
2367 DWORD idThread,
2368 LPGUITHREADINFO lpgui);
2369
2370 _Success_(return != FALSE)
2371 BOOL
2372 NTAPI
2373 NtUserGetIconInfo(
2374 _In_ HANDLE hCurIcon,
2375 _Out_opt_ PICONINFO IconInfo,
2376 _Inout_opt_ PUNICODE_STRING lpInstName,
2377 _Inout_opt_ PUNICODE_STRING lpResName,
2378 _Out_opt_ LPDWORD pbpp,
2379 _In_ BOOL bInternal);
2380
2381 BOOL
2382 NTAPI
2383 NtUserGetIconSize(
2384 HANDLE Handle,
2385 UINT istepIfAniCur,
2386 LONG *plcx,
2387 LONG *plcy);
2388
2389 BOOL NTAPI
2390 NtUserGetImeHotKey(IN DWORD dwHotKey,
2391 OUT LPUINT lpuModifiers,
2392 OUT LPUINT lpuVKey,
2393 OUT LPHKL lphKL);
2394
2395 BOOL
2396 NTAPI
2397 NtUserGetImeInfoEx(
2398 PIMEINFOEX pImeInfoEx,
2399 IMEINFOEXCLASS SearchType);
2400
2401 DWORD
2402 NTAPI
2403 NtUserGetInternalWindowPos(
2404 HWND hwnd,
2405 LPRECT rectWnd,
2406 LPPOINT ptIcon);
2407
2408 HKL
2409 NTAPI
2410 NtUserGetKeyboardLayout(
2411 DWORD dwThreadid);
2412
2413 UINT
2414 NTAPI
2415 NtUserGetKeyboardLayoutList(
2416 ULONG nItems,
2417 HKL *pHklBuff);
2418
2419 BOOL
2420 NTAPI
2421 NtUserGetKeyboardLayoutName(
2422 LPWSTR lpszName);
2423
2424 DWORD
2425 NTAPI
2426 NtUserGetKeyboardState(
2427 LPBYTE Unknown0);
2428
2429 DWORD
2430 NTAPI
2431 NtUserGetKeyboardType(
2432 DWORD TypeFlag);
2433
2434 DWORD
2435 NTAPI
2436 NtUserGetKeyNameText(
2437 LONG lParam,
2438 LPWSTR lpString,
2439 int nSize);
2440
2441 SHORT
2442 NTAPI
2443 NtUserGetKeyState(
2444 INT VirtKey);
2445
2446 BOOL
2447 NTAPI
2448 NtUserGetLayeredWindowAttributes(
2449 HWND hwnd,
2450 COLORREF *pcrKey,
2451 BYTE *pbAlpha,
2452 DWORD *pdwFlags);
2453
2454 DWORD
2455 NTAPI
2456 NtUserGetListBoxInfo(
2457 HWND hWnd);
2458
2459 BOOL
2460 APIENTRY
2461 NtUserGetMessage(
2462 PMSG pMsg,
2463 HWND hWnd,
2464 UINT MsgFilterMin,
2465 UINT MsgFilterMax);
2466
2467 DWORD
2468 NTAPI
2469 NtUserGetMouseMovePointsEx(
2470 UINT cbSize,
2471 LPMOUSEMOVEPOINT lppt,
2472 LPMOUSEMOVEPOINT lpptBuf,
2473 int nBufPoints,
2474 DWORD resolution);
2475
2476 BOOL
2477 NTAPI
2478 NtUserGetObjectInformation(
2479 HANDLE hObject,
2480 DWORD nIndex,
2481 PVOID pvInformation,
2482 DWORD nLength,
2483 PDWORD nLengthNeeded);
2484
2485 HWND
2486 NTAPI
2487 NtUserGetOpenClipboardWindow(VOID);
2488
2489 INT
2490 NTAPI
2491 NtUserGetPriorityClipboardFormat(
2492 UINT *paFormatPriorityList,
2493 INT cFormats);
2494
2495 HWINSTA
2496 NTAPI
2497 NtUserGetProcessWindowStation(VOID);
2498
2499 DWORD
2500 NTAPI
2501 NtUserGetRawInputBuffer(
2502 PRAWINPUT pData,
2503 PUINT pcbSize,
2504 UINT cbSizeHeader);
2505
2506 DWORD
2507 NTAPI
2508 NtUserGetRawInputData(
2509 HRAWINPUT hRawInput,
2510 UINT uiCommand,
2511 LPVOID pData,
2512 PUINT pcbSize,
2513 UINT cbSizeHeader);
2514
2515 DWORD
2516 NTAPI
2517 NtUserGetRawInputDeviceInfo(
2518 HANDLE hDevice,
2519 UINT uiCommand,
2520 LPVOID pData,
2521 PUINT pcbSize);
2522
2523 DWORD
2524 NTAPI
2525 NtUserGetRawInputDeviceList(
2526 PRAWINPUTDEVICELIST pRawInputDeviceList,
2527 PUINT puiNumDevices,
2528 UINT cbSize);
2529
2530 DWORD
2531 NTAPI
2532 NtUserGetRegisteredRawInputDevices(
2533 PRAWINPUTDEVICE pRawInputDevices,
2534 PUINT puiNumDevices,
2535 UINT cbSize);
2536
2537 BOOL
2538 NTAPI
2539 NtUserGetScrollBarInfo(
2540 HWND hWnd,
2541 LONG idObject,
2542 PSCROLLBARINFO psbi);
2543
2544 HDESK
2545 NTAPI
2546 NtUserGetThreadDesktop(
2547 DWORD dwThreadId,
2548 HDESK hConsoleDesktop);
2549
2550 enum ThreadStateRoutines
2551 {
2552 THREADSTATE_GETTHREADINFO,
2553 THREADSTATE_INSENDMESSAGE,
2554 THREADSTATE_FOCUSWINDOW,
2555 THREADSTATE_ACTIVEWINDOW,
2556 THREADSTATE_CAPTUREWINDOW,
2557 THREADSTATE_PROGMANWINDOW,
2558 THREADSTATE_TASKMANWINDOW,
2559 THREADSTATE_GETMESSAGETIME,
2560 THREADSTATE_GETINPUTSTATE,
2561 THREADSTATE_UPTIMELASTREAD,
2562 THREADSTATE_FOREGROUNDTHREAD,
2563 THREADSTATE_GETCURSOR,
2564 THREADSTATE_GETMESSAGEEXTRAINFO,
2565 THREADSTATE_UNKNOWN13
2566 };
2567
2568 DWORD_PTR
2569 NTAPI
2570 NtUserGetThreadState(
2571 DWORD Routine);
2572
2573 BOOLEAN
2574 NTAPI
2575 NtUserGetTitleBarInfo(
2576 HWND hwnd,
2577 PTITLEBARINFO pti);
2578
2579 BOOL
2580 NTAPI
2581 NtUserGetUpdateRect(
2582 HWND hWnd,
2583 LPRECT lpRect,
2584 BOOL fErase);
2585
2586 INT
2587 NTAPI
2588 NtUserGetUpdateRgn(
2589 HWND hWnd,
2590 HRGN hRgn,
2591 BOOL bErase);
2592
2593 HDC
2594 NTAPI
2595 NtUserGetWindowDC(
2596 HWND hWnd);
2597
2598 BOOL
2599 NTAPI
2600 NtUserGetWindowPlacement(
2601 HWND hWnd,
2602 WINDOWPLACEMENT *lpwndpl);
2603
2604 PCLS
2605 NTAPI
2606 NtUserGetWOWClass(
2607 HINSTANCE hInstance,
2608 PUNICODE_STRING ClassName);
2609
2610 DWORD
2611 NTAPI
2612 NtUserHardErrorControl(
2613 DWORD dwUnknown1,
2614 DWORD dwUnknown2,
2615 DWORD dwUnknown3);
2616
2617 BOOL
2618 NTAPI
2619 NtUserImpersonateDdeClientWindow(
2620 HWND hWndClient,
2621 HWND hWndServer);
2622
2623 NTSTATUS
2624 NTAPI
2625 NtUserInitialize(
2626 DWORD dwWinVersion,
2627 HANDLE hPowerRequestEvent,
2628 HANDLE hMediaRequestEvent);
2629
2630 NTSTATUS
2631 NTAPI
2632 NtUserInitializeClientPfnArrays(
2633 PPFNCLIENT pfnClientA,
2634 PPFNCLIENT pfnClientW,
2635 PPFNCLIENTWORKER pfnClientWorker,
2636 HINSTANCE hmodUser);
2637
2638 DWORD
2639 NTAPI
2640 NtUserInitTask(
2641 DWORD Unknown0,
2642 DWORD Unknown1,
2643 DWORD Unknown2,
2644 DWORD Unknown3,
2645 DWORD Unknown4,
2646 DWORD Unknown5,
2647 DWORD Unknown6,
2648 DWORD Unknown7,
2649 DWORD Unknown8,
2650 DWORD Unknown9,
2651 DWORD Unknown10,
2652 DWORD Unknown11);
2653
2654 INT
2655 NTAPI
2656 NtUserInternalGetWindowText(
2657 HWND hWnd,
2658 LPWSTR lpString,
2659 INT nMaxCount);
2660
2661 BOOL
2662 NTAPI
2663 NtUserInvalidateRect(
2664 HWND hWnd,
2665 CONST RECT *lpRect,
2666 BOOL bErase);
2667
2668 BOOL
2669 NTAPI
2670 NtUserInvalidateRgn(
2671 HWND hWnd,
2672 HRGN hRgn,
2673 BOOL bErase);
2674
2675 BOOL
2676 NTAPI
2677 NtUserIsClipboardFormatAvailable(
2678 UINT format);
2679
2680 BOOL
2681 NTAPI
2682 NtUserKillTimer(
2683 HWND hWnd,
2684 UINT_PTR uIDEvent);
2685
2686 HKL
2687 NTAPI
2688 NtUserLoadKeyboardLayoutEx(
2689 IN HANDLE Handle,
2690 IN DWORD offTable,
2691 IN PUNICODE_STRING puszKeyboardName,
2692 IN HKL hKL,
2693 IN PUNICODE_STRING puszKLID,
2694 IN DWORD dwKLID,
2695 IN UINT Flags);
2696
2697 BOOL
2698 NTAPI
2699 NtUserLockWindowStation(
2700 HWINSTA hWindowStation);
2701
2702 BOOL
2703 NTAPI
2704 NtUserLockWindowUpdate(
2705 HWND hWnd);
2706
2707 BOOL
2708 NTAPI
2709 NtUserLockWorkStation(VOID);
2710
2711 UINT
2712 NTAPI
2713 NtUserMapVirtualKeyEx(
2714 UINT keyCode,
2715 UINT transType,
2716 DWORD keyboardId,
2717 HKL dwhkl);
2718
2719 typedef struct tagDOSENDMESSAGE
2720 {
2721 UINT uFlags;
2722 UINT uTimeout;
2723 ULONG_PTR Result;
2724 }
2725 DOSENDMESSAGE, *PDOSENDMESSAGE;
2726
2727 BOOL
2728 NTAPI
2729 NtUserMessageCall(
2730 HWND hWnd,
2731 UINT Msg,
2732 WPARAM wParam,
2733 LPARAM lParam,
2734 ULONG_PTR ResultInfo,
2735 DWORD dwType, /* FNID_XX types */
2736 BOOL Ansi);
2737
2738 DWORD
2739 NTAPI
2740 NtUserMinMaximize(
2741 HWND hWnd,
2742 UINT cmd, /* Wine SW_ commands */
2743 BOOL Hide);
2744
2745 DWORD
2746 NTAPI
2747 NtUserMNDragLeave(VOID);
2748
2749 DWORD
2750 NTAPI
2751 NtUserMNDragOver(
2752 DWORD Unknown0,
2753 DWORD Unknown1);
2754
2755 DWORD
2756 NTAPI
2757 NtUserModifyUserStartupInfoFlags(
2758 DWORD Unknown0,
2759 DWORD Unknown1);
2760
2761 BOOL
2762 NTAPI
2763 NtUserMoveWindow(
2764 HWND hWnd,
2765 int X,
2766 int Y,
2767 int nWidth,
2768 int nHeight,
2769 BOOL bRepaint
2770 );
2771
2772 DWORD
2773 NTAPI
2774 NtUserNotifyIMEStatus(
2775 HWND hwnd,
2776 HIMC hIMC,
2777 DWORD dwConversion);
2778
2779 BOOL
2780 NTAPI
2781 NtUserNotifyProcessCreate(
2782 HANDLE NewProcessId,
2783 HANDLE ParentThreadId,
2784 ULONG dwUnknown,
2785 ULONG CreateFlags);
2786
2787 VOID
2788 NTAPI
2789 NtUserNotifyWinEvent(
2790 DWORD Event,
2791 HWND hWnd,
2792 LONG idObject,
2793 LONG idChild);
2794
2795 BOOL
2796 NTAPI
2797 NtUserOpenClipboard(
2798 HWND hWnd,
2799 DWORD Unknown1);
2800
2801 HDESK
2802 NTAPI
2803 NtUserOpenDesktop(
2804 POBJECT_ATTRIBUTES ObjectAttributes,
2805 DWORD dwFlags,
2806 ACCESS_MASK dwDesiredAccess);
2807
2808 HDESK
2809 NTAPI
2810 NtUserOpenInputDesktop(
2811 DWORD dwFlags,
2812 BOOL fInherit,
2813 ACCESS_MASK dwDesiredAccess);
2814
2815 HWINSTA
2816 NTAPI
2817 NtUserOpenWindowStation(
2818 POBJECT_ATTRIBUTES ObjectAttributes,
2819 ACCESS_MASK dwDesiredAccess);
2820
2821 BOOL
2822 NTAPI
2823 NtUserPaintDesktop(
2824 HDC hDC);
2825
2826 DWORD
2827 NTAPI
2828 NtUserPaintMenuBar(
2829 HWND hWnd,
2830 HDC hDC,
2831 ULONG left, // x,
2832 ULONG right, // width, // Scale the edge thickness, offset?
2833 ULONG top, // y,
2834 BOOL bActive); // DWORD Flags); DC_ACTIVE or WS_ACTIVECAPTION, by checking WNDS_ACTIVEFRAME and foreground.
2835
2836 BOOL
2837 APIENTRY
2838 NtUserPeekMessage(
2839 PMSG pMsg,
2840 HWND hWnd,
2841 UINT MsgFilterMin,
2842 UINT MsgFilterMax,
2843 UINT RemoveMsg);
2844
2845 BOOL
2846 NTAPI
2847 NtUserPostMessage(
2848 HWND hWnd,
2849 UINT Msg,
2850 WPARAM wParam,
2851 LPARAM lParam);
2852
2853 BOOL
2854 NTAPI
2855 NtUserPostThreadMessage(
2856 DWORD idThread,
2857 UINT Msg,
2858 WPARAM wParam,
2859 LPARAM lParam);
2860
2861 BOOL
2862 NTAPI
2863 NtUserPrintWindow(
2864 HWND hwnd,
2865 HDC hdcBlt,
2866 UINT nFlags);
2867
2868 NTSTATUS
2869 NTAPI
2870 NtUserProcessConnect(
2871 IN HANDLE ProcessHandle,
2872 OUT PUSERCONNECT pUserConnect,
2873 IN ULONG Size); /* sizeof(USERCONNECT) */
2874
2875 NTSTATUS
2876 NTAPI
2877 NtUserQueryInformationThread(
2878 IN HANDLE ThreadHandle,
2879 IN USERTHREADINFOCLASS ThreadInformationClass,
2880 OUT PVOID ThreadInformation,
2881 IN ULONG ThreadInformationLength);
2882
2883 DWORD
2884 NTAPI
2885 NtUserQueryInputContext(
2886 HIMC hIMC,
2887 DWORD dwUnknown2);
2888
2889 DWORD
2890 NTAPI
2891 NtUserQuerySendMessage(
2892 DWORD Unknown0);
2893
2894 DWORD
2895 NTAPI
2896 NtUserQueryUserCounters(
2897 DWORD Unknown0,
2898 DWORD Unknown1,
2899 DWORD Unknown2,
2900 DWORD Unknown3,
2901 DWORD Unknown4);
2902
2903 #define QUERY_WINDOW_UNIQUE_PROCESS_ID 0x00
2904 #define QUERY_WINDOW_UNIQUE_THREAD_ID 0x01
2905 #define QUERY_WINDOW_ACTIVE 0x02
2906 #define QUERY_WINDOW_FOCUS 0x03
2907 #define QUERY_WINDOW_ISHUNG 0x04
2908 #define QUERY_WINDOW_REAL_ID 0x05
2909 #define QUERY_WINDOW_FOREGROUND 0x06
2910 #define QUERY_WINDOW_DEFAULT_IME 0x07
2911 #define QUERY_WINDOW_DEFAULT_ICONTEXT 0x08
2912 #define QUERY_WINDOW_ACTIVE_IME 0x09
2913
2914 DWORD_PTR
2915 NTAPI
2916 NtUserQueryWindow(
2917 HWND hWnd,
2918 DWORD Index);
2919
2920 BOOL
2921 NTAPI
2922 NtUserRealInternalGetMessage(
2923 LPMSG lpMsg,
2924 HWND hWnd,
2925 UINT wMsgFilterMin,
2926 UINT wMsgFilterMax,
2927 UINT wRemoveMsg,
2928 BOOL bGMSG);
2929
2930 HWND
2931 NTAPI
2932 NtUserRealChildWindowFromPoint(
2933 HWND Parent,
2934 LONG x,
2935 LONG y);
2936
2937 BOOL
2938 NTAPI
2939 NtUserRealWaitMessageEx(
2940 DWORD dwWakeMask,
2941 UINT uTimeout);
2942
2943 BOOL
2944 NTAPI
2945 NtUserRedrawWindow(
2946 HWND hWnd,
2947 CONST RECT *lprcUpdate,
2948 HRGN hrgnUpdate,
2949 UINT flags);
2950
2951 RTL_ATOM
2952 NTAPI
2953 NtUserRegisterClassExWOW(
2954 WNDCLASSEXW* lpwcx,
2955 PUNICODE_STRING pustrClassName,
2956 PUNICODE_STRING pustrCVersion,
2957 PCLSMENUNAME pClassMenuName,
2958 DWORD fnID,
2959 DWORD Flags,
2960 LPDWORD pWow);
2961
2962 BOOL
2963 NTAPI
2964 NtUserRegisterRawInputDevices(
2965 IN PCRAWINPUTDEVICE pRawInputDevices,
2966 IN UINT uiNumDevices,
2967 IN UINT cbSize);
2968
2969 BOOL
2970 NTAPI
2971 NtUserRegisterUserApiHook(
2972 PUNICODE_STRING m_dllname1,
2973 PUNICODE_STRING m_funname1,
2974 DWORD dwUnknown3,
2975 DWORD dwUnknown4);
2976
2977 BOOL
2978 NTAPI
2979 NtUserRegisterHotKey(
2980 HWND hWnd,
2981 int id,
2982 UINT fsModifiers,
2983 UINT vk);
2984
2985 DWORD
2986 NTAPI
2987 NtUserRegisterTasklist(
2988 DWORD Unknown0);
2989
2990 UINT
2991 NTAPI
2992 NtUserRegisterWindowMessage(
2993 PUNICODE_STRING MessageName);
2994
2995 DWORD
2996 NTAPI
2997 NtUserRemoteConnect(
2998 DWORD dwUnknown1,
2999 DWORD dwUnknown2,
3000 DWORD dwUnknown3);
3001
3002 DWORD
3003 NTAPI
3004 NtUserRemoteRedrawRectangle(
3005 DWORD dwUnknown1,
3006 DWORD dwUnknown2,
3007 DWORD dwUnknown3,
3008 DWORD dwUnknown4);
3009
3010 DWORD
3011 NTAPI
3012 NtUserRemoteRedrawScreen(VOID);
3013
3014 DWORD
3015 NTAPI
3016 NtUserRemoteStopScreenUpdates(VOID);
3017
3018 HANDLE
3019 NTAPI
3020 NtUserRemoveProp(
3021 HWND hWnd,
3022 ATOM Atom);
3023
3024 HDESK
3025 NTAPI
3026 NtUserResolveDesktop(
3027 IN HANDLE ProcessHandle,
3028 IN PUNICODE_STRING DesktopPath,
3029 IN BOOL bInherit,
3030 OUT HWINSTA* phWinSta);
3031
3032 DWORD
3033 NTAPI
3034 NtUserResolveDesktopForWOW(
3035 DWORD Unknown0);
3036
3037 BOOL
3038 NTAPI
3039 NtUserSBGetParms(
3040 HWND hwnd,
3041 int fnBar,
3042 PSBDATA pSBData,
3043 LPSCROLLINFO lpsi);
3044
3045 BOOL
3046 NTAPI
3047 NtUserScrollDC(
3048 HDC hDC,
3049 int dx,
3050 int dy,
3051 CONST RECT *lprcScroll,
3052 CONST RECT *lprcClip ,
3053 HRGN hrgnUpdate,
3054 LPRECT lprcUpdate);
3055
3056 DWORD
3057 NTAPI
3058 NtUserScrollWindowEx(
3059 HWND hWnd,
3060 INT dx,
3061 INT dy,
3062 const RECT *rect,
3063 const RECT *clipRect,
3064 HRGN hrgnUpdate,
3065 LPRECT rcUpdate,
3066 UINT flags);
3067
3068 UINT
3069 NTAPI
3070 NtUserSendInput(
3071 UINT nInputs,
3072 LPINPUT pInput,
3073 INT cbSize);
3074
3075 HWND
3076 NTAPI
3077 NtUserSetActiveWindow(
3078 HWND Wnd);
3079
3080 DWORD
3081 NTAPI
3082 NtUserSetAppImeLevel(
3083 DWORD dwUnknown1,
3084 DWORD dwUnknown2);
3085
3086 HWND
3087 NTAPI
3088 NtUserSetCapture(
3089 HWND Wnd);
3090
3091 ULONG_PTR
3092 NTAPI
3093 NtUserSetClassLong(
3094 HWND hWnd,
3095 INT Offset,
3096 ULONG_PTR dwNewLong,
3097 BOOL Ansi);
3098
3099 WORD
3100 NTAPI
3101 NtUserSetClassWord(
3102 HWND hWnd,
3103 INT nIndex,
3104 WORD wNewWord);
3105
3106 HANDLE
3107 NTAPI
3108 NtUserSetClipboardData(
3109 UINT fmt,
3110 HANDLE hMem,
3111 PSETCLIPBDATA scd);
3112
3113 HWND
3114 NTAPI
3115 NtUserSetClipboardViewer(
3116 HWND hWndNewViewer);
3117
3118 HPALETTE
3119 NTAPI
3120 NtUserSelectPalette(
3121 HDC hDC,
3122 HPALETTE hpal,
3123 BOOL ForceBackground);
3124
3125 DWORD
3126 NTAPI
3127 NtUserSetConsoleReserveKeys(
3128 DWORD Unknown0,
3129 DWORD Unknown1);
3130
3131 HCURSOR
3132 NTAPI
3133 NtUserSetCursor(
3134 HCURSOR hCursor);
3135
3136 BOOL
3137 NTAPI
3138 NtUserSetCursorContents(
3139 HANDLE Handle,
3140 PICONINFO IconInfo);
3141
3142 BOOL
3143 NTAPI
3144 NtUserSetCursorIconData(
3145 _In_ HCURSOR hCursor,
3146 _In_opt_ PUNICODE_STRING pustrModule,
3147 _In_opt_ PUNICODE_STRING puSrcName,
3148 _In_ const CURSORDATA *pCursorData);
3149
3150 typedef struct _tagFINDEXISTINGCURICONPARAM
3151 {
3152 BOOL bIcon;
3153 LONG cx;
3154 LONG cy;
3155 } FINDEXISTINGCURICONPARAM;
3156
3157 HICON
3158 NTAPI
3159 NtUserFindExistingCursorIcon(
3160 _In_ PUNICODE_STRING pustrModule,
3161 _In_ PUNICODE_STRING pustrRsrc,
3162 _In_ FINDEXISTINGCURICONPARAM *param);
3163
3164 DWORD
3165 NTAPI
3166 NtUserSetDbgTag(
3167 DWORD Unknown0,
3168 DWORD Unknown1);
3169
3170 DWORD
3171 APIENTRY
3172 NtUserSetDbgTagCount(
3173 DWORD Unknown0);
3174
3175 HWND
3176 NTAPI
3177 NtUserSetFocus(
3178 HWND hWnd);
3179
3180 DWORD
3181 NTAPI
3182 NtUserSetImeHotKey(
3183 DWORD Unknown0,
3184 DWORD Unknown1,
3185 DWORD Unknown2,
3186 DWORD Unknown3,
3187 DWORD Unknown4);
3188
3189 DWORD
3190 NTAPI
3191 NtUserSetImeInfoEx(
3192 PIMEINFOEX pImeInfoEx);
3193
3194 DWORD
3195 NTAPI
3196 NtUserSetImeOwnerWindow(PIMEINFOEX pImeInfoEx, BOOL fFlag);
3197
3198 DWORD
3199 NTAPI
3200 NtUserSetInformationProcess(
3201 DWORD dwUnknown1,
3202 DWORD dwUnknown2,
3203 DWORD dwUnknown3,
3204 DWORD dwUnknown4);
3205
3206 NTSTATUS
3207 NTAPI
3208 NtUserSetInformationThread(
3209 IN HANDLE ThreadHandle,
3210 IN USERTHREADINFOCLASS ThreadInformationClass,
3211 IN PVOID ThreadInformation,
3212 IN ULONG ThreadInformationLength);
3213
3214 DWORD
3215 NTAPI
3216 NtUserSetInternalWindowPos(
3217 HWND hwnd,
3218 UINT showCmd,
3219 LPRECT rect,
3220 LPPOINT pt);
3221
3222 BOOL
3223 NTAPI
3224 NtUserSetKeyboardState(
3225 LPBYTE lpKeyState);
3226
3227 BOOL
3228 NTAPI
3229 NtUserSetLayeredWindowAttributes(
3230 HWND hwnd,
3231 COLORREF crKey,
3232 BYTE bAlpha,
3233 DWORD dwFlags);
3234
3235 BOOL
3236 NTAPI
3237 NtUserSetLogonNotifyWindow(
3238 HWND hWnd);
3239
3240 BOOL
3241 NTAPI
3242 NtUserSetObjectInformation(
3243 HANDLE hObject,
3244 DWORD nIndex,
3245 PVOID pvInformation,
3246 DWORD nLength);
3247
3248 HWND
3249 NTAPI
3250 NtUserSetParent(
3251 HWND hWndChild,
3252 HWND hWndNewParent);
3253
3254 BOOL
3255 NTAPI
3256 NtUserSetProcessWindowStation(
3257 HWINSTA hWindowStation);
3258
3259 BOOL
3260 NTAPI
3261 NtUserSetProp(
3262 HWND hWnd,
3263 ATOM Atom,
3264 HANDLE Data);
3265
3266 DWORD
3267 NTAPI
3268 NtUserSetRipFlags(
3269 DWORD Unknown0);
3270
3271 DWORD
3272 NTAPI
3273 NtUserSetScrollInfo(
3274 HWND hwnd,
3275 int fnBar,
3276 LPCSCROLLINFO lpsi,
3277 BOOL bRedraw);
3278
3279 BOOL
3280 NTAPI
3281 NtUserSetShellWindowEx(
3282 HWND hwndShell,
3283 HWND hwndShellListView);
3284
3285 BOOL
3286 NTAPI
3287 NtUserSetSysColors(
3288 int cElements,
3289 IN CONST INT *lpaElements,
3290 IN CONST COLORREF *lpaRgbValues,
3291 FLONG Flags);
3292
3293 BOOL
3294 NTAPI
3295 NtUserSetSystemCursor(
3296 HCURSOR hcur,
3297 DWORD id);
3298
3299 BOOL
3300 NTAPI
3301 NtUserSetThreadDesktop(
3302 HDESK hDesktop);
3303
3304 DWORD
3305 NTAPI
3306 NtUserSetThreadState(
3307 DWORD Unknown0,
3308 DWORD Unknown1);
3309
3310 UINT_PTR
3311 NTAPI
3312 NtUserSetSystemTimer(
3313 HWND hWnd,
3314 UINT_PTR nIDEvent,
3315 UINT uElapse,
3316 TIMERPROC lpTimerFunc);
3317
3318 DWORD
3319 NTAPI
3320 NtUserSetThreadLayoutHandles(
3321 DWORD dwUnknown1,
3322 DWORD dwUnknown2);
3323
3324 UINT_PTR
3325 NTAPI
3326 NtUserSetTimer(
3327 HWND hWnd,
3328 UINT_PTR nIDEvent,
3329 UINT uElapse,
3330 TIMERPROC lpTimerFunc);
3331
3332 BOOL
3333 NTAPI
3334 NtUserSetWindowFNID(
3335 HWND hWnd,
3336 WORD fnID);
3337
3338 LONG
3339 NTAPI
3340 NtUserSetWindowLong(
3341 HWND hWnd,
3342 DWORD Index,
3343 LONG NewValue,
3344 BOOL Ansi);
3345
3346 #ifdef _WIN64
3347 LONG_PTR
3348 NTAPI
3349 NtUserSetWindowLongPtr(
3350 HWND hWnd,
3351 DWORD Index,
3352 LONG_PTR NewValue,
3353 BOOL Ansi);
3354 #endif // _WIN64
3355
3356 BOOL
3357 NTAPI
3358 NtUserSetWindowPlacement(
3359 HWND hWnd,
3360 WINDOWPLACEMENT *lpwndpl);
3361
3362 BOOL
3363 NTAPI
3364 NtUserSetWindowPos(
3365 HWND hWnd,
3366 HWND hWndInsertAfter,
3367 int X,
3368 int Y,
3369 int cx,
3370 int cy,
3371 UINT uFlags);
3372
3373 INT
3374 NTAPI
3375 NtUserSetWindowRgn(
3376 HWND hWnd,
3377 HRGN hRgn,
3378 BOOL bRedraw);
3379
3380 HHOOK
3381 NTAPI
3382 NtUserSetWindowsHookAW(
3383 int idHook,
3384 HOOKPROC lpfn,
3385 BOOL Ansi);
3386
3387 HHOOK
3388 NTAPI
3389 NtUserSetWindowsHookEx(
3390 HINSTANCE Mod,
3391 PUNICODE_STRING ModuleName,
3392 DWORD ThreadId,
3393 int HookId,
3394 HOOKPROC HookProc,
3395 BOOL Ansi);
3396
3397 BOOL
3398 NTAPI
3399 NtUserSetWindowStationUser(
3400 IN HWINSTA hWindowStation,
3401 IN PLUID pluid,
3402 IN PSID psid OPTIONAL,
3403 IN DWORD size);
3404
3405 WORD
3406 NTAPI
3407 NtUserSetWindowWord(
3408 HWND hWnd,
3409 INT Index,
3410 WORD NewVal);
3411
3412 HWINEVENTHOOK
3413 NTAPI
3414 NtUserSetWinEventHook(
3415 UINT eventMin,
3416 UINT eventMax,
3417 HMODULE hmodWinEventProc,
3418 PUNICODE_STRING puString,
3419 WINEVENTPROC lpfnWinEventProc,
3420 DWORD idProcess,
3421 DWORD idThread,
3422 UINT dwflags);
3423
3424 BOOL
3425 NTAPI
3426 NtUserShowCaret(
3427 HWND hWnd);
3428
3429 BOOL
3430 NTAPI
3431 NtUserHideCaret(
3432 HWND hWnd);
3433
3434 DWORD
3435 NTAPI
3436 NtUserShowScrollBar(
3437 HWND hWnd,
3438 int wBar,
3439 DWORD bShow);
3440
3441 BOOL
3442 NTAPI
3443 NtUserShowWindow(
3444 HWND hWnd,
3445 LONG nCmdShow);
3446
3447 BOOL
3448 NTAPI
3449 NtUserShowWindowAsync(
3450 HWND hWnd,
3451 LONG nCmdShow);
3452
3453 BOOL
3454 NTAPI
3455 NtUserSoundSentry(VOID);
3456
3457 BOOL
3458 NTAPI
3459 NtUserSwitchDesktop(
3460 HDESK hDesktop);
3461
3462 BOOL
3463 NTAPI
3464 NtUserSystemParametersInfo(
3465 UINT uiAction,
3466 UINT uiParam,
3467 PVOID pvParam,
3468 UINT fWinIni);
3469
3470 DWORD
3471 NTAPI
3472 NtUserTestForInteractiveUser(
3473 DWORD dwUnknown1);
3474
3475 INT
3476 NTAPI
3477 NtUserToUnicodeEx(
3478 UINT wVirtKey,
3479 UINT wScanCode,
3480 PBYTE lpKeyState,
3481 LPWSTR pwszBuff,
3482 int cchBuff,
3483 UINT wFlags,
3484 HKL dwhkl);
3485
3486 BOOL
3487 NTAPI
3488 NtUserTrackMouseEvent(
3489 LPTRACKMOUSEEVENT lpEventTrack);
3490
3491 int
3492 NTAPI
3493 NtUserTranslateAccelerator(
3494 HWND Window,
3495 HACCEL Table,
3496 LPMSG Message);
3497
3498 BOOL
3499 NTAPI
3500 NtUserTranslateMessage(
3501 LPMSG lpMsg,
3502 UINT flags );
3503
3504 BOOL
3505 NTAPI
3506 NtUserUnhookWindowsHookEx(
3507 HHOOK Hook);
3508
3509 BOOL
3510 NTAPI
3511 NtUserUnhookWinEvent(
3512 HWINEVENTHOOK hWinEventHook);
3513
3514 BOOL
3515 NTAPI
3516 NtUserUnloadKeyboardLayout(
3517 HKL hKl);
3518
3519 BOOL
3520 NTAPI
3521 NtUserUnlockWindowStation(
3522 HWINSTA hWindowStation);
3523
3524 BOOL
3525 NTAPI
3526 NtUserUnregisterClass(
3527 PUNICODE_STRING ClassNameOrAtom,
3528 HINSTANCE hInstance,
3529 PCLSMENUNAME pClassMenuName);
3530
3531 BOOL
3532 NTAPI
3533 NtUserUnregisterHotKey(
3534 HWND hWnd,
3535 int id);
3536
3537 BOOL
3538 NTAPI
3539 NtUserUnregisterUserApiHook(VOID);
3540
3541 DWORD
3542 NTAPI
3543 NtUserUpdateInputContext(
3544 HIMC hIMC,
3545 DWORD Unknown1,
3546 LPVOID pClientImc);
3547
3548 DWORD
3549 NTAPI
3550 NtUserUpdateInstance(
3551 DWORD Unknown0,
3552 DWORD Unknown1,
3553 DWORD Unknown2);
3554
3555 BOOL
3556 NTAPI
3557 NtUserUpdateLayeredWindow(
3558 HWND hwnd,
3559 HDC hdcDst,
3560 POINT *pptDst,
3561 SIZE *psize,
3562 HDC hdcSrc,
3563 POINT *pptSrc,
3564 COLORREF crKey,
3565 BLENDFUNCTION *pblend,
3566 DWORD dwFlags,
3567 RECT *prcDirty);
3568
3569 BOOL
3570 NTAPI
3571 NtUserUpdatePerUserSystemParameters(
3572 DWORD dwReserved,
3573 BOOL bEnable);
3574
3575 BOOL
3576 NTAPI
3577 NtUserUserHandleGrantAccess(
3578 IN HANDLE hUserHandle,
3579 IN HANDLE hJob,
3580 IN BOOL bGrant);
3581
3582 BOOL
3583 NTAPI
3584 NtUserValidateHandleSecure(
3585 HANDLE hHdl);
3586
3587 BOOL
3588 NTAPI
3589 NtUserValidateRect(
3590 HWND hWnd,
3591 CONST RECT *lpRect);
3592
3593 BOOL
3594 APIENTRY
3595 NtUserValidateTimerCallback(
3596 LPARAM lParam);
3597
3598 DWORD
3599 NTAPI
3600 NtUserVkKeyScanEx(
3601 WCHAR wChar,
3602 HKL KeyboardLayout,
3603 BOOL bUsehHK);
3604
3605 DWORD
3606 NTAPI
3607 NtUserWaitForInputIdle(
3608 IN HANDLE hProcess,
3609 IN DWORD dwMilliseconds,
3610 IN BOOL bSharedWow); /* Always FALSE */
3611
3612 DWORD
3613 NTAPI
3614 NtUserWaitForMsgAndEvent(
3615 DWORD Unknown0);
3616
3617 BOOL
3618 NTAPI
3619 NtUserWaitMessage(VOID);
3620
3621 DWORD
3622 NTAPI
3623 NtUserWin32PoolAllocationStats(
3624 DWORD Unknown0,
3625 DWORD Unknown1,
3626 DWORD Unknown2,
3627 DWORD Unknown3,
3628 DWORD Unknown4,
3629 DWORD Unknown5);
3630
3631 HWND
3632 NTAPI
3633 NtUserWindowFromPoint(
3634 LONG X,
3635 LONG Y);
3636
3637 DWORD
3638 NTAPI
3639 NtUserYieldTask(VOID);
3640
3641 /* NtUserBad
3642 * ReactOS-specific NtUser calls and their related structures, both which shouldn't exist.
3643 */
3644
3645 #define NOPARAM_ROUTINE_ISCONSOLEMODE 0xffff0001
3646 #define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d
3647 #define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e
3648 #define TWOPARAM_ROUTINE_SETMENUBARHEIGHT 0xfffd0050
3649 #define TWOPARAM_ROUTINE_SETGUITHRDHANDLE 0xfffd0051
3650 #define HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE 0xfffd0052
3651
3652 #define MSQ_STATE_CAPTURE 0x1
3653 #define MSQ_STATE_ACTIVE 0x2
3654 #define MSQ_STATE_FOCUS 0x3
3655 #define MSQ_STATE_MENUOWNER 0x4
3656 #define MSQ_STATE_MOVESIZE 0x5
3657 #define MSQ_STATE_CARET 0x6
3658
3659 #define TWOPARAM_ROUTINE_ROS_UPDATEUISTATE 0x1004
3660 #define HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT 0x1005
3661
3662 BOOL
3663 NTAPI
3664 NtUserGetMonitorInfo(
3665 IN HMONITOR hMonitor,
3666 OUT LPMONITORINFO pMonitorInfo);
3667
3668 /* Should be done in usermode */
3669
3670 HMONITOR
3671 NTAPI
3672 NtUserMonitorFromPoint(
3673 IN POINT point,
3674 IN DWORD dwFlags);
3675
3676 HMONITOR
3677 NTAPI
3678 NtUserMonitorFromRect(
3679 IN LPCRECT pRect,
3680 IN DWORD dwFlags);
3681
3682 HMONITOR
3683 NTAPI
3684 NtUserMonitorFromWindow(
3685 IN HWND hWnd,
3686 IN DWORD dwFlags);
3687
3688 typedef struct _SETSCROLLBARINFO
3689 {
3690 int nTrackPos;
3691 int reserved;
3692 DWORD rgstate[CCHILDREN_SCROLLBAR + 1];
3693 } SETSCROLLBARINFO, *PSETSCROLLBARINFO;
3694
3695 BOOL
3696 NTAPI
3697 NtUserSetScrollBarInfo(
3698 HWND hwnd,
3699 LONG idObject,
3700 SETSCROLLBARINFO *info);
3701
3702 #endif /* __WIN32K_NTUSER_H */
3703
3704 /* EOF */