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