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