wined3d: Rename WINED3D_MAX_TEXTURES to WINED3D_MAX_FFP_TEXTURES.
[wine.git] / include / ntuser.h
bloba8e8f4d6da0b10350ad19d5d3ac90c4745a3b184
1 /*
2 * Copyright 2021 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _NTUSER_
20 #define _NTUSER_
22 #include <winuser.h>
23 #include <wingdi.h>
24 #include <imm.h>
25 #include <immdev.h>
26 #include <winternl.h>
28 /* KernelCallbackTable codes, not compatible with Windows */
29 enum
31 /* user32 callbacks */
32 NtUserCallEnumDisplayMonitor,
33 NtUserCallSendAsyncCallback,
34 NtUserCallWinEventHook,
35 NtUserCallWinProc,
36 NtUserCallWindowsHook,
37 NtUserCopyImage,
38 NtUserDrawNonClientButton,
39 NtUserDrawScrollBar,
40 NtUserDrawText,
41 NtUserFreeCachedClipboardData,
42 NtUserImmProcessKey,
43 NtUserImmTranslateMessage,
44 NtUserInitBuiltinClasses,
45 NtUserLoadDriver,
46 NtUserLoadImage,
47 NtUserLoadSysMenu,
48 NtUserPostDDEMessage,
49 NtUserRenderSynthesizedFormat,
50 NtUserUnpackDDEMessage,
51 /* win16 hooks */
52 NtUserCallFreeIcon,
53 NtUserThunkLock,
54 /* Vulkan support */
55 NtUserCallVulkanDebugReportCallback,
56 NtUserCallVulkanDebugUtilsCallback,
57 /* OpenGL support */
58 NtUserCallOpenGLDebugMessageCallback,
59 /* Driver-specific callbacks */
60 NtUserDriverCallbackFirst,
61 NtUserDriverCallbackLast = NtUserDriverCallbackFirst + 9,
62 NtUserCallCount
65 /* TEB thread info, not compatible with Windows */
66 struct ntuser_thread_info
68 UINT64 driver_data; /* driver-specific data */
69 DWORD message_time; /* value for GetMessageTime */
70 DWORD message_pos; /* value for GetMessagePos */
71 UINT64 message_extra; /* value for GetMessageExtraInfo */
72 INPUT_MESSAGE_SOURCE msg_source; /* Message source for current message */
73 WORD recursion_count; /* SendMessage recursion counter */
74 UINT receive_flags; /* currently received message flags */
75 UINT top_window; /* desktop window */
76 UINT msg_window; /* HWND_MESSAGE parent window */
77 DPI_AWARENESS dpi_awareness; /* DPI awareness */
78 UINT default_imc; /* default input context */
79 UINT64 client_imm; /* client IMM thread info */
80 UINT64 wmchar_data; /* client data for WM_CHAR mappings */
83 static inline struct ntuser_thread_info *NtUserGetThreadInfo(void)
85 #ifndef _WIN64
86 if (NtCurrentTeb()->GdiBatchCount)
88 TEB64 *teb64 = (TEB64 *)(UINT_PTR)NtCurrentTeb()->GdiBatchCount;
89 return (struct ntuser_thread_info *)teb64->Win32ClientInfo;
91 #endif
92 return (struct ntuser_thread_info *)NtCurrentTeb()->Win32ClientInfo;
95 /* NtUserCallEnumDisplayMonitor params */
96 struct enum_display_monitor_params
98 MONITORENUMPROC proc;
99 HMONITOR monitor;
100 HDC hdc;
101 RECT rect;
102 LPARAM lparam;
105 /* NtUserCallSendAsyncCallback params */
106 struct send_async_params
108 SENDASYNCPROC callback;
109 HWND hwnd;
110 UINT msg;
111 ULONG_PTR data;
112 LRESULT result;
115 /* NtUserCallWinEventHook params */
116 struct win_event_hook_params
118 DWORD event;
119 HWND hwnd;
120 LONG object_id;
121 LONG child_id;
122 void *handle;
123 DWORD tid;
124 DWORD time;
125 WINEVENTPROC proc;
126 WCHAR module[MAX_PATH];
129 /* type of message-sending functions that need special WM_CHAR handling */
130 enum wm_char_mapping
132 WMCHAR_MAP_POSTMESSAGE,
133 WMCHAR_MAP_SENDMESSAGE,
134 WMCHAR_MAP_SENDMESSAGETIMEOUT,
135 WMCHAR_MAP_RECVMESSAGE,
136 WMCHAR_MAP_DISPATCHMESSAGE,
137 WMCHAR_MAP_CALLWINDOWPROC,
138 WMCHAR_MAP_ISDIALOGMESSAGE,
139 WMCHAR_MAP_COUNT,
140 WMCHAR_MAP_NOMAPPING = WMCHAR_MAP_COUNT
143 /* NtUserCallWindowProc params */
144 struct win_proc_params
146 WNDPROC func;
147 HWND hwnd;
148 UINT msg;
149 WPARAM wparam;
150 LPARAM lparam;
151 BOOL ansi;
152 BOOL ansi_dst;
153 enum wm_char_mapping mapping;
154 DPI_AWARENESS_CONTEXT dpi_awareness;
155 WNDPROC procA;
156 WNDPROC procW;
159 /* NtUserCallWindowsHook params */
160 struct win_hook_params
162 void *proc;
163 void *handle;
164 DWORD pid;
165 DWORD tid;
166 int id;
167 int code;
168 WPARAM wparam;
169 LPARAM lparam;
170 BOOL prev_unicode;
171 BOOL next_unicode;
172 WCHAR module[1];
175 /* NtUserCopyImage params */
176 struct copy_image_params
178 HANDLE hwnd;
179 UINT type;
180 INT dx;
181 INT dy;
182 UINT flags;
185 /* NtUserDrawText params */
186 struct draw_text_params
188 HDC hdc;
189 int count;
190 RECT rect;
191 UINT flags;
192 WCHAR str[1];
195 /* NtUserFreeCachedClipboardData params */
196 struct free_cached_data_params
198 UINT format;
199 HANDLE handle;
202 /* NtUserImmProcessKey params */
203 struct imm_process_key_params
205 HWND hwnd;
206 HKL hkl;
207 UINT vkey;
208 LPARAM key_data;
211 /* NtUserImmTranslateMessage params */
212 struct imm_translate_message_params
214 HWND hwnd;
215 UINT msg;
216 WPARAM wparam;
217 LPARAM key_data;
220 /* NtUserLoadImage params */
221 struct load_image_params
223 HINSTANCE hinst;
224 const WCHAR *name;
225 UINT type;
226 INT dx;
227 INT dy;
228 UINT flags;
231 /* NtUserLoadSysMenu params */
232 struct load_sys_menu_params
234 BOOL mdi;
237 /* NtUserPostDDEMessage params */
238 struct post_dde_message_params
240 HWND hwnd;
241 UINT msg;
242 WPARAM wparam;
243 LPARAM lparam;
244 DWORD dest_tid;
245 DWORD type;
248 /* NtUserRenderSynthesizedFormat params */
249 struct render_synthesized_format_params
251 UINT format;
252 UINT from;
255 /* NtUserUnpackDDEMessage params */
256 struct unpack_dde_message_result
258 WPARAM wparam;
259 LPARAM lparam;
262 struct unpack_dde_message_params
264 struct unpack_dde_message_result *result; /* FIXME: Use NtCallbackReturn instead */
265 HWND hwnd;
266 UINT message;
267 WPARAM wparam;
268 LPARAM lparam;
269 char data[1];
272 /* process DPI awareness contexts */
273 #define NTUSER_DPI_UNAWARE 0x00006010
274 #define NTUSER_DPI_SYSTEM_AWARE 0x00006011
275 #define NTUSER_DPI_PER_MONITOR_AWARE 0x00000012
276 #define NTUSER_DPI_PER_MONITOR_AWARE_V2 0x00000022
277 #define NTUSER_DPI_PER_UNAWARE_GDISCALED 0x40006010
279 /* message spy definitions */
280 #define SPY_DISPATCHMESSAGE 0x0100
281 #define SPY_SENDMESSAGE 0x0101
282 #define SPY_DEFWNDPROC 0x0102
284 #define SPY_RESULT_OK 0x0001
285 #define SPY_RESULT_DEFWND 0x0002
287 /* CreateDesktop wine specific flag */
288 #define DF_WINE_CREATE_DESKTOP 0x80000000
290 /* NtUserMessageCall codes */
291 enum
293 NtUserScrollBarWndProc = 0x029a,
294 NtUserPopupMenuWndProc = 0x029c,
295 NtUserDesktopWindowProc = 0x029d,
296 NtUserDefWindowProc = 0x029e,
297 NtUserCallWindowProc = 0x02ab,
298 NtUserSendMessage = 0x02b1,
299 NtUserSendMessageTimeout = 0x02b3,
300 NtUserSendNotifyMessage = 0x02b7,
301 NtUserSendMessageCallback = 0x02b8,
302 /* Wine-specific exports */
303 NtUserClipboardWindowProc = 0x0300,
304 NtUserGetDispatchParams = 0x3001,
305 NtUserSpyGetMsgName = 0x3002,
306 NtUserSpyEnter = 0x0303,
307 NtUserSpyExit = 0x0304,
308 NtUserImeDriverCall = 0x0305,
311 /* NtUserThunkedMenuItemInfo codes */
312 enum
314 NtUserSetMenuItemInfo,
315 NtUserInsertMenuItem,
316 /* Wine extensions */
317 NtUserCheckMenuRadioItem,
318 NtUserGetMenuDefaultItem,
319 NtUserGetMenuItemID,
320 NtUserGetMenuItemInfoA,
321 NtUserGetMenuItemInfoW,
322 NtUserGetMenuState,
323 NtUserGetSubMenu,
326 struct send_message_timeout_params
328 UINT flags;
329 UINT timeout;
330 DWORD_PTR result;
333 struct send_message_callback_params
335 SENDASYNCPROC callback;
336 ULONG_PTR data;
339 /* color index used to retrieve system 55aa brush */
340 #define COLOR_55AA_BRUSH 0x100
342 /* user object types */
343 #define NTUSER_OBJ_WINDOW 0x01
344 #define NTUSER_OBJ_MENU 0x02
345 #define NTUSER_OBJ_ICON 0x03
346 #define NTUSER_OBJ_WINPOS 0x04
347 #define NTUSER_OBJ_ACCEL 0x08
348 #define NTUSER_OBJ_HOOK 0x0f
349 #define NTUSER_OBJ_IMC 0x11
351 /* NtUserScrollWindowEx flag */
352 #define SW_NODCCACHE 0x8000
354 /* NtUserSetScrollInfo flag */
355 #define SIF_RETURNPREV 0x1000
357 /* NtUserInitializeClientPfnArrays parameter, not compatible with Windows */
358 struct user_client_procs
360 WNDPROC pButtonWndProc;
361 WNDPROC pComboWndProc;
362 WNDPROC pDefWindowProc;
363 WNDPROC pDefDlgProc;
364 WNDPROC pEditWndProc;
365 WNDPROC pListBoxWndProc;
366 WNDPROC pMDIClientWndProc;
367 WNDPROC pScrollBarWndProc;
368 WNDPROC pStaticWndProc;
369 WNDPROC pImeWndProc;
370 WNDPROC pDesktopWndProc;
371 WNDPROC pIconTitleWndProc;
372 WNDPROC pPopupMenuWndProc;
373 WNDPROC pMessageWndProc;
376 /* NtUserSetCursorIconData parameter, not compatible with Windows */
377 struct cursoricon_frame
379 UINT width; /* frame-specific width */
380 UINT height; /* frame-specific height */
381 HBITMAP color; /* color bitmap */
382 HBITMAP alpha; /* pre-multiplied alpha bitmap for 32-bpp icons */
383 HBITMAP mask; /* mask bitmap (followed by color for 1-bpp icons) */
384 POINT hotspot;
387 struct cursoricon_desc
389 UINT flags;
390 UINT num_steps;
391 UINT num_frames;
392 UINT delay;
393 struct cursoricon_frame *frames;
394 DWORD *frame_seq;
395 DWORD *frame_rates;
396 HRSRC rsrc;
399 struct client_menu_name
401 char *nameA;
402 WCHAR *nameW;
403 UNICODE_STRING *nameUS;
406 /* NtUserGetClipboardData params, not compatible with Windows */
407 struct get_clipboard_params
409 void *data;
410 size_t size;
411 size_t data_size;
412 UINT seqno;
413 BOOL data_only;
416 /* NtUserSetClipboardData params, not compatible with Windows */
417 struct set_clipboard_params
419 void *data;
420 size_t size;
421 BOOL cache_only;
422 UINT seqno;
425 /* NtUserNonClientButton params */
426 struct draw_non_client_button_params
428 HWND hwnd;
429 HDC hdc;
430 enum NONCLIENT_BUTTON_TYPE type;
431 RECT rect;
432 BOOL down;
433 BOOL grayed;
436 /* NtUserDrawScrollBar params */
437 struct draw_scroll_bar_params
439 HWND hwnd;
440 HDC hdc;
441 INT bar;
442 UINT hit_test;
443 struct SCROLL_TRACKING_INFO tracking_info;
444 BOOL arrows;
445 BOOL interior;
446 RECT rect;
447 UINT enable_flags;
448 INT arrow_size;
449 INT thumb_pos;
450 INT thumb_size;
451 BOOL vertical;
454 /* NtUserUpdateInputContext param, not compatible with Window */
455 enum input_context_attr
457 NtUserInputContextClientPtr,
458 NtUserInputContextThreadId,
461 /* NtUserAssociateInputContext result */
462 enum associate_input_context_result
464 AICR_OK,
465 AICR_FOCUS_CHANGED,
466 AICR_FAILED,
469 /* internal messages codes */
470 enum wine_internal_message
472 WM_WINE_DESTROYWINDOW = 0x80000000,
473 WM_WINE_SETWINDOWPOS,
474 WM_WINE_SHOWWINDOW,
475 WM_WINE_SETPARENT,
476 WM_WINE_SETWINDOWLONG,
477 WM_WINE_SETSTYLE,
478 WM_WINE_SETACTIVEWINDOW,
479 WM_WINE_KEYBOARD_LL_HOOK,
480 WM_WINE_MOUSE_LL_HOOK,
481 WM_WINE_CLIPCURSOR,
482 WM_WINE_SETCURSOR,
483 WM_WINE_UPDATEWINDOWSTATE,
484 WM_WINE_FIRST_DRIVER_MSG = 0x80001000, /* range of messages reserved for the USER driver */
485 WM_WINE_LAST_DRIVER_MSG = 0x80001fff
488 /* internal IME message */
489 #define WM_IME_INTERNAL 0x287
490 #define IME_INTERNAL_ACTIVATE 0x17
491 #define IME_INTERNAL_DEACTIVATE 0x18
492 #define IME_INTERNAL_HKL_ACTIVATE 0x19
493 #define IME_INTERNAL_HKL_DEACTIVATE 0x20
495 /* internal WM_IME_NOTIFY wparams, not compatible with Windows */
496 #define IMN_WINE_SET_OPEN_STATUS 0x000f
497 #define IMN_WINE_SET_COMP_STRING 0x0010
499 /* builtin IME driver calls */
500 enum wine_ime_call
502 WINE_IME_PROCESS_KEY,
503 WINE_IME_TO_ASCII_EX,
506 /* NtUserImeDriverCall params */
507 struct ime_driver_call_params
509 HIMC himc;
510 const BYTE *state;
511 COMPOSITIONSTRING *compstr;
514 #define WM_SYSTIMER 0x0118
517 HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags );
518 BOOL WINAPI NtUserAddClipboardFormatListener( HWND hwnd );
519 UINT WINAPI NtUserAssociateInputContext( HWND hwnd, HIMC ctx, ULONG flags );
520 BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach );
521 HDC WINAPI NtUserBeginPaint( HWND hwnd, PAINTSTRUCT *ps );
522 NTSTATUS WINAPI NtUserBuildHimcList( UINT thread_id, UINT count, HIMC *buffer, UINT *size );
523 NTSTATUS WINAPI NtUserBuildHwndList( HDESK desktop, ULONG unk2, ULONG unk3, ULONG unk4,
524 ULONG thread_id, ULONG count, HWND *buffer, ULONG *size );
525 ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code );
526 ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code );
527 LRESULT WINAPI NtUserCallNextHookEx( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam );
528 BOOL WINAPI NtUserCallMsgFilter( MSG *msg, INT code );
529 ULONG_PTR WINAPI NtUserCallNoParam( ULONG code );
530 ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code );
531 ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code );
532 BOOL WINAPI NtUserChangeClipboardChain( HWND hwnd, HWND next );
533 LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
534 DWORD flags, void *lparam );
535 DWORD WINAPI NtUserCheckMenuItem( HMENU handle, UINT id, UINT flags );
536 HWND WINAPI NtUserChildWindowFromPointEx( HWND parent, LONG x, LONG y, UINT flags );
537 BOOL WINAPI NtUserClipCursor( const RECT *rect );
538 BOOL WINAPI NtUserCloseClipboard(void);
539 BOOL WINAPI NtUserCloseDesktop( HDESK handle );
540 BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
541 INT WINAPI NtUserCopyAcceleratorTable( HACCEL src, ACCEL *dst, INT count );
542 INT WINAPI NtUserCountClipboardFormats(void);
543 HACCEL WINAPI NtUserCreateAcceleratorTable( ACCEL *table, INT count );
544 BOOL WINAPI NtUserCreateCaret( HWND hwnd, HBITMAP bitmap, int width, int height );
545 HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *device,
546 DEVMODEW *devmode, DWORD flags, ACCESS_MASK access,
547 ULONG heap_size );
548 HIMC WINAPI NtUserCreateInputContext( UINT_PTR client_ptr );
549 HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
550 UNICODE_STRING *version, UNICODE_STRING *window_name,
551 DWORD style, INT x, INT y, INT cx, INT cy,
552 HWND parent, HMENU menu, HINSTANCE instance, void *params,
553 DWORD flags, HINSTANCE client_instance, DWORD unk, BOOL ansi );
554 HWINSTA WINAPI NtUserCreateWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK mask, ULONG arg3,
555 ULONG arg4, ULONG arg5, ULONG arg6, ULONG arg7 );
556 HDWP WINAPI NtUserDeferWindowPosAndBand( HDWP hdwp, HWND hwnd, HWND after, INT x, INT y,
557 INT cx, INT cy, UINT flags, UINT unk1, UINT unk2 );
558 BOOL WINAPI NtUserDeleteMenu( HMENU menu, UINT id, UINT flags );
559 BOOL WINAPI NtUserDestroyAcceleratorTable( HACCEL handle );
560 BOOL WINAPI NtUserDestroyCursor( HCURSOR cursor, ULONG arg );
561 BOOL WINAPI NtUserDestroyInputContext( HIMC handle );
562 BOOL WINAPI NtUserDestroyMenu( HMENU menu );
563 BOOL WINAPI NtUserDestroyWindow( HWND hwnd );
564 BOOL WINAPI NtUserDisableThreadIme( DWORD thread_id );
565 LRESULT WINAPI NtUserDispatchMessage( const MSG *msg );
566 NTSTATUS WINAPI NtUserDisplayConfigGetDeviceInfo( DISPLAYCONFIG_DEVICE_INFO_HEADER *packet );
567 BOOL WINAPI NtUserDragDetect( HWND hwnd, int x, int y );
568 DWORD WINAPI NtUserDragObject( HWND parent, HWND hwnd, UINT fmt, ULONG_PTR data, HCURSOR cursor );
569 BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT font,
570 HICON icon, const WCHAR *str, UINT flags );
571 BOOL WINAPI NtUserDrawIconEx( HDC hdc, INT x0, INT y0, HICON icon, INT width,
572 INT height, UINT istep, HBRUSH hbr, UINT flags );
573 DWORD WINAPI NtUserDrawMenuBarTemp( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font );
574 BOOL WINAPI NtUserEmptyClipboard(void);
575 BOOL WINAPI NtUserEnableMenuItem( HMENU handle, UINT id, UINT flags );
576 BOOL WINAPI NtUserEnableMouseInPointer( BOOL );
577 BOOL WINAPI NtUserEnableScrollBar( HWND hwnd, UINT bar, UINT flags );
578 BOOL WINAPI NtUserEndDeferWindowPosEx( HDWP hdwp, BOOL async );
579 BOOL WINAPI NtUserEndMenu(void);
580 BOOL WINAPI NtUserEndPaint( HWND hwnd, const PAINTSTRUCT *ps );
581 NTSTATUS WINAPI NtUserEnumDisplayDevices( UNICODE_STRING *device, DWORD index,
582 DISPLAY_DEVICEW *info, DWORD flags );
583 BOOL WINAPI NtUserEnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC proc, LPARAM lp );
584 BOOL WINAPI NtUserEnumDisplaySettings( UNICODE_STRING *device, DWORD mode,
585 DEVMODEW *dev_mode, DWORD flags );
586 INT WINAPI NtUserExcludeUpdateRgn( HDC hdc, HWND hwnd );
587 HICON WINAPI NtUserFindExistingCursorIcon( UNICODE_STRING *module, UNICODE_STRING *res_name,
588 void *desc );
589 HWND WINAPI NtUserFindWindowEx( HWND parent, HWND child, UNICODE_STRING *class,
590 UNICODE_STRING *title, ULONG unk );
591 BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info );
592 HWND WINAPI NtUserGetAncestor( HWND hwnd, UINT type );
593 SHORT WINAPI NtUserGetAsyncKeyState( INT key );
594 ULONG WINAPI NtUserGetAtomName( ATOM atom, UNICODE_STRING *name );
595 UINT WINAPI NtUserGetCaretBlinkTime(void);
596 BOOL WINAPI NtUserGetCaretPos( POINT *point );
597 ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc,
598 struct client_menu_name *menu_name, BOOL ansi );
599 INT WINAPI NtUserGetClassName( HWND hwnd, BOOL real, UNICODE_STRING *name );
600 HANDLE WINAPI NtUserGetClipboardData( UINT format, struct get_clipboard_params *params );
601 INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT maxlen );
602 HWND WINAPI NtUserGetClipboardOwner(void);
603 DWORD WINAPI NtUserGetClipboardSequenceNumber(void);
604 HWND WINAPI NtUserGetClipboardViewer(void);
605 HCURSOR WINAPI NtUserGetCursor(void);
606 HCURSOR WINAPI NtUserGetCursorFrameInfo( HCURSOR hCursor, DWORD istep, DWORD *rate_jiffies,
607 DWORD *num_steps );
608 BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info );
609 HDC WINAPI NtUserGetDC( HWND hwnd );
610 HDC WINAPI NtUserGetDCEx( HWND hwnd, HRGN clip_rgn, DWORD flags );
611 LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info,
612 UINT32 *num_mode_info );
613 UINT WINAPI NtUserGetDoubleClickTime(void);
614 BOOL WINAPI NtUserGetDpiForMonitor( HMONITOR monitor, UINT type, UINT *x, UINT *y );
615 HWND WINAPI NtUserGetForegroundWindow(void);
616 BOOL WINAPI NtUserGetGUIThreadInfo( DWORD id, GUITHREADINFO *info );
617 BOOL WINAPI NtUserGetIconInfo( HICON icon, ICONINFO *info, UNICODE_STRING *module,
618 UNICODE_STRING *res_name, DWORD *bpp, LONG unk );
619 BOOL WINAPI NtUserGetIconSize( HICON handle, UINT step, LONG *width, LONG *height );
620 UINT WINAPI NtUserGetInternalWindowPos( HWND hwnd, RECT *rect, POINT *pt );
621 INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size );
622 SHORT WINAPI NtUserGetKeyState( INT vkey );
623 HKL WINAPI NtUserGetKeyboardLayout( DWORD thread_id );
624 UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts );
625 BOOL WINAPI NtUserGetKeyboardLayoutName( WCHAR *name );
626 BOOL WINAPI NtUserGetKeyboardState( BYTE *state );
627 BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags );
628 BOOL WINAPI NtUserGetMenuBarInfo( HWND hwnd, LONG id, LONG item, MENUBARINFO *info );
629 BOOL WINAPI NtUserGetMenuItemRect( HWND hwnd, HMENU menu, UINT item, RECT *rect );
630 BOOL WINAPI NtUserGetMessage( MSG *msg, HWND hwnd, UINT first, UINT last );
631 int WINAPI NtUserGetMouseMovePointsEx( UINT size, MOUSEMOVEPOINT *ptin, MOUSEMOVEPOINT *ptout,
632 int count, DWORD resolution );
633 BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
634 DWORD len, DWORD *needed );
635 HWND WINAPI NtUserGetOpenClipboardWindow(void);
636 BOOL WINAPI NtUserGetPointerInfoList( UINT32 id, POINTER_INPUT_TYPE type, UINT_PTR, UINT_PTR, SIZE_T size,
637 UINT32 *entry_count, UINT32 *pointer_count, void *pointer_info );
638 INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count );
639 HWINSTA WINAPI NtUserGetProcessWindowStation(void);
640 HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str );
641 ULONG WINAPI NtUserGetProcessDpiAwarenessContext( HANDLE process );
642 DWORD WINAPI NtUserGetQueueStatus( UINT flags );
643 UINT WINAPI NtUserGetRawInputBuffer( RAWINPUT *data, UINT *data_size, UINT header_size );
644 UINT WINAPI NtUserGetRawInputData( HRAWINPUT rawinput, UINT command, void *data, UINT *data_size, UINT header_size );
645 UINT WINAPI NtUserGetRawInputDeviceInfo( HANDLE handle, UINT command, void *data, UINT *data_size );
646 UINT WINAPI NtUserGetRawInputDeviceList( RAWINPUTDEVICELIST *devices, UINT *device_count, UINT size );
647 UINT WINAPI NtUserGetRegisteredRawInputDevices( RAWINPUTDEVICE *devices, UINT *device_count, UINT size );
648 BOOL WINAPI NtUserGetScrollBarInfo( HWND hwnd, LONG id, SCROLLBARINFO *info );
649 ULONG WINAPI NtUserGetSystemDpiForProcess( HANDLE process );
650 HMENU WINAPI NtUserGetSystemMenu( HWND hwnd, BOOL revert );
651 HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
652 BOOL WINAPI NtUserGetTitleBarInfo( HWND hwnd, TITLEBARINFO *info );
653 INT WINAPI NtUserGetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase );
654 BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
655 BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase );
656 HDC WINAPI NtUserGetWindowDC( HWND hwnd );
657 BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement );
658 int WINAPI NtUserGetWindowRgnEx( HWND hwnd, HRGN hrgn, UINT unk );
659 BOOL WINAPI NtUserHideCaret( HWND hwnd );
660 BOOL WINAPI NtUserHiliteMenuItem( HWND hwnd, HMENU handle, UINT item, UINT hilite );
661 NTSTATUS WINAPI NtUserInitializeClientPfnArrays( const struct user_client_procs *client_procsA,
662 const struct user_client_procs *client_procsW,
663 const void *client_workers, HINSTANCE user_module );
664 HICON WINAPI NtUserInternalGetWindowIcon( HWND hwnd, UINT type );
665 INT WINAPI NtUserInternalGetWindowText( HWND hwnd, WCHAR *text, INT count );
666 BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format );
667 BOOL WINAPI NtUserIsMouseInPointerEnabled(void);
668 BOOL WINAPI NtUserInvalidateRect( HWND hwnd, const RECT *rect, BOOL erase );
669 BOOL WINAPI NtUserInvalidateRgn( HWND hwnd, HRGN hrgn, BOOL erase );
670 BOOL WINAPI NtUserKillTimer( HWND hwnd, UINT_PTR id );
671 BOOL WINAPI NtUserLockWindowUpdate( HWND hwnd );
672 BOOL WINAPI NtUserLogicalToPerMonitorDPIPhysicalPoint( HWND hwnd, POINT *pt );
673 UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout );
674 INT WINAPI NtUserMenuItemFromPoint( HWND hwnd, HMENU handle, int x, int y );
675 LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
676 void *result_info, DWORD type, BOOL ansi );
677 BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint );
678 DWORD WINAPI NtUserMsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
679 DWORD timeout, DWORD mask, DWORD flags );
680 void WINAPI NtUserNotifyIMEStatus( HWND hwnd, UINT status );
681 void WINAPI NtUserNotifyWinEvent( DWORD event, HWND hwnd, LONG object_id, LONG child_id );
682 HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK access );
683 BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk );
684 HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access );
685 HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access );
686 BOOL WINAPI NtUserPeekMessage( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT flags );
687 BOOL WINAPI NtUserPerMonitorDPIPhysicalToLogicalPoint( HWND hwnd, POINT *pt );
688 BOOL WINAPI NtUserPostMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam );
689 BOOL WINAPI NtUserPostThreadMessage( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam );
690 BOOL WINAPI NtUserPrintWindow( HWND hwnd, HDC hdc, UINT flags );
691 LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *paths_count, DISPLAYCONFIG_PATH_INFO *paths,
692 UINT32 *modes_count, DISPLAYCONFIG_MODE_INFO *modes,
693 DISPLAYCONFIG_TOPOLOGY_ID *topology_id);
694 UINT_PTR WINAPI NtUserQueryInputContext( HIMC handle, UINT attr );
695 HWND WINAPI NtUserRealChildWindowFromPoint( HWND parent, LONG x, LONG y );
696 BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags );
697 ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version,
698 struct client_menu_name *client_menu_name, DWORD fnid, DWORD flags,
699 DWORD *wow );
700 BOOL WINAPI NtUserRegisterHotKey( HWND hwnd, INT id, UINT modifiers, UINT vk );
701 BOOL WINAPI NtUserRegisterRawInputDevices( const RAWINPUTDEVICE *devices, UINT device_count, UINT size );
702 INT WINAPI NtUserReleaseDC( HWND hwnd, HDC hdc );
703 BOOL WINAPI NtUserRemoveClipboardFormatListener( HWND hwnd );
704 BOOL WINAPI NtUserRemoveMenu( HMENU menu, UINT id, UINT flags );
705 HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str );
706 BOOL WINAPI NtUserScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
707 HRGN ret_update_rgn, RECT *update_rect );
708 INT WINAPI NtUserScrollWindowEx( HWND hwnd, INT dx, INT dy, const RECT *rect,
709 const RECT *clip_rect, HRGN update_rgn,
710 RECT *update_rect, UINT flags ) DECLSPEC_HIDDEN;
711 HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE palette, WORD force_background );
712 UINT WINAPI NtUserSendInput( UINT count, INPUT *inputs, int size );
713 HWND WINAPI NtUserSetActiveWindow( HWND hwnd );
714 HWND WINAPI NtUserSetCapture( HWND hwnd );
715 DWORD WINAPI NtUserSetClassLong( HWND hwnd, INT offset, LONG newval, BOOL ansi );
716 ULONG_PTR WINAPI NtUserSetClassLongPtr( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi );
717 WORD WINAPI NtUserSetClassWord( HWND hwnd, INT offset, WORD newval );
718 NTSTATUS WINAPI NtUserSetClipboardData( UINT format, HANDLE handle, struct set_clipboard_params *params );
719 HWND WINAPI NtUserSetClipboardViewer( HWND hwnd );
720 HCURSOR WINAPI NtUserSetCursor( HCURSOR cursor );
721 BOOL WINAPI NtUserSetCursorIconData( HCURSOR cursor, UNICODE_STRING *module, UNICODE_STRING *res_name,
722 struct cursoricon_desc *desc );
723 BOOL WINAPI NtUserSetCursorPos( INT x, INT y );
724 HWND WINAPI NtUserSetFocus( HWND hwnd );
725 void WINAPI NtUserSetInternalWindowPos( HWND hwnd, UINT cmd, RECT *rect, POINT *pt );
726 BOOL WINAPI NtUserSetKeyboardState( BYTE *state );
727 BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags );
728 BOOL WINAPI NtUserSetMenu( HWND hwnd, HMENU menu );
729 BOOL WINAPI NtUserSetMenuContextHelpId( HMENU handle, DWORD id );
730 BOOL WINAPI NtUserSetMenuDefaultItem( HMENU handle, UINT item, UINT bypos );
731 BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
732 HWND WINAPI NtUserSetParent( HWND hwnd, HWND parent );
733 BOOL WINAPI NtUserSetProcessDpiAwarenessContext( ULONG awareness, ULONG unknown );
734 BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
735 BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle );
736 INT WINAPI NtUserSetScrollInfo( HWND hwnd, INT bar, const SCROLLINFO *info, BOOL redraw );
737 BOOL WINAPI NtUserSetShellWindowEx( HWND shell, HWND list_view );
738 BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *values );
739 BOOL WINAPI NtUserSetSystemMenu( HWND hwnd, HMENU menu );
740 UINT_PTR WINAPI NtUserSetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout );
741 BOOL WINAPI NtUserSetThreadDesktop( HDESK handle );
742 UINT_PTR WINAPI NtUserSetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc, ULONG tolerance );
743 LONG WINAPI NtUserSetWindowLong( HWND hwnd, INT offset, LONG newval, BOOL ansi );
744 LONG_PTR WINAPI NtUserSetWindowLongPtr( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi );
745 BOOL WINAPI NtUserSetWindowPlacement( HWND hwnd, const WINDOWPLACEMENT *wpl );
746 BOOL WINAPI NtUserSetWindowPos( HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags );
747 int WINAPI NtUserSetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw );
748 WORD WINAPI NtUserSetWindowWord( HWND hwnd, INT offset, WORD newval );
749 HHOOK WINAPI NtUserSetWindowsHookEx( HINSTANCE inst, UNICODE_STRING *module, DWORD tid, INT id,
750 HOOKPROC proc, BOOL ansi );
751 HWINEVENTHOOK WINAPI NtUserSetWinEventHook( DWORD event_min, DWORD event_max, HMODULE inst,
752 UNICODE_STRING *module, WINEVENTPROC proc,
753 DWORD pid, DWORD tid, DWORD flags );
754 BOOL WINAPI NtUserShowCaret( HWND hwnd );
755 INT WINAPI NtUserShowCursor( BOOL show );
756 BOOL WINAPI NtUserShowScrollBar( HWND hwnd, INT bar, BOOL show );
757 BOOL WINAPI NtUserShowWindow( HWND hwnd, INT cmd );
758 BOOL WINAPI NtUserShowWindowAsync( HWND hwnd, INT cmd );
759 BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, void *ptr, UINT winini );
760 BOOL WINAPI NtUserSystemParametersInfoForDpi( UINT action, UINT val, PVOID ptr, UINT winini, UINT dpi );
761 BOOL WINAPI NtUserThunkedMenuInfo( HMENU menu, const MENUINFO *info );
762 UINT WINAPI NtUserThunkedMenuItemInfo( HMENU menu, UINT pos, UINT flags, UINT method,
763 MENUITEMINFOW *info, UNICODE_STRING *str );
764 INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
765 WCHAR *str, int size, UINT flags, HKL layout );
766 BOOL WINAPI NtUserTrackMouseEvent( TRACKMOUSEEVENT *info );
767 BOOL WINAPI NtUserTrackPopupMenuEx( HMENU handle, UINT flags, INT x, INT y, HWND hwnd, TPMPARAMS *params );
768 INT WINAPI NtUserTranslateAccelerator( HWND hwnd, HACCEL accel, MSG *msg );
769 BOOL WINAPI NtUserTranslateMessage( const MSG *msg, UINT flags );
770 BOOL WINAPI NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook );
771 BOOL WINAPI NtUserUnhookWindowsHookEx( HHOOK handle );
772 BOOL WINAPI NtUserUnregisterClass( UNICODE_STRING *name, HINSTANCE instance,
773 struct client_menu_name *client_menu_name );
774 BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id );
775 BOOL WINAPI NtUserUpdateInputContext( HIMC handle, UINT attr, UINT_PTR value );
776 BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *pts_dst, const SIZE *size,
777 HDC hdc_src, const POINT *pts_src, COLORREF key,
778 const BLENDFUNCTION *blend, DWORD flags, const RECT *dirty );
779 BOOL WINAPI NtUserValidateRect( HWND hwnd, const RECT *rect );
780 WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout );
781 DWORD WINAPI NtUserWaitForInputIdle( HANDLE process, DWORD timeout, BOOL wow );
782 BOOL WINAPI NtUserWaitMessage(void);
783 HWND WINAPI NtUserWindowFromDC( HDC hdc );
784 HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y );
786 /* NtUserCallNoParam codes, not compatible with Windows */
787 enum
789 NtUserCallNoParam_DestroyCaret,
790 NtUserCallNoParam_GetDesktopWindow,
791 NtUserCallNoParam_GetDialogBaseUnits,
792 NtUserCallNoParam_GetInputState,
793 NtUserCallNoParam_GetProcessDefaultLayout,
794 NtUserCallNoParam_GetProgmanWindow,
795 NtUserCallNoParam_GetShellWindow,
796 NtUserCallNoParam_GetTaskmanWindow,
797 NtUserCallNoParam_ReleaseCapture,
798 /* temporary exports */
799 NtUserExitingThread,
800 NtUserThreadDetach,
803 static inline BOOL NtUserDestroyCaret(void)
805 return NtUserCallNoParam( NtUserCallNoParam_DestroyCaret );
808 static inline HWND NtUserGetDesktopWindow(void)
810 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetDesktopWindow ));
813 static inline DWORD NtUserGetDialogBaseUnits(void)
815 return NtUserCallNoParam( NtUserCallNoParam_GetDialogBaseUnits );
818 static inline BOOL NtUserGetInputState(void)
820 return NtUserCallNoParam( NtUserCallNoParam_GetInputState );
823 static inline DWORD NtUserGetProcessDefaultLayout(void)
825 return NtUserCallNoParam( NtUserCallNoParam_GetProcessDefaultLayout );
828 static inline HWND NtUserGetProgmanWindow(void)
830 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetProgmanWindow ));
833 static inline HWND NtUserGetShellWindow(void)
835 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetShellWindow ));
838 static inline HWND NtUserGetTaskmanWindow(void)
840 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetTaskmanWindow ));
843 static inline BOOL NtUserReleaseCapture(void)
845 return NtUserCallNoParam( NtUserCallNoParam_ReleaseCapture );
848 /* NtUserCallOneParam codes, not compatible with Windows */
849 enum
851 NtUserCallOneParam_BeginDeferWindowPos,
852 NtUserCallOneParam_CreateCursorIcon,
853 NtUserCallOneParam_CreateMenu,
854 NtUserCallOneParam_EnableDC,
855 NtUserCallOneParam_EnableThunkLock,
856 NtUserCallOneParam_EnumClipboardFormats,
857 NtUserCallOneParam_GetClipCursor,
858 NtUserCallOneParam_GetCursorPos,
859 NtUserCallOneParam_GetIconParam,
860 NtUserCallOneParam_GetMenuItemCount,
861 NtUserCallOneParam_GetPrimaryMonitorRect,
862 NtUserCallOneParam_GetSysColor,
863 NtUserCallOneParam_GetSysColorBrush,
864 NtUserCallOneParam_GetSysColorPen,
865 NtUserCallOneParam_GetSystemMetrics,
866 NtUserCallOneParam_GetVirtualScreenRect,
867 NtUserCallOneParam_IsWindowRectFullScreen,
868 NtUserCallOneParam_MessageBeep,
869 NtUserCallOneParam_RealizePalette,
870 NtUserCallOneParam_ReplyMessage,
871 NtUserCallOneParam_SetCaretBlinkTime,
872 NtUserCallOneParam_SetProcessDefaultLayout,
873 /* temporary exports */
874 NtUserGetDeskPattern,
877 static inline HDWP NtUserBeginDeferWindowPos( INT count )
879 return UlongToHandle( NtUserCallOneParam( count, NtUserCallOneParam_BeginDeferWindowPos ));
882 static inline HICON NtUserCreateCursorIcon( BOOL is_icon )
884 return UlongToHandle( NtUserCallOneParam( is_icon, NtUserCallOneParam_CreateCursorIcon ));
887 static inline HMENU NtUserCreateMenu( BOOL is_popup )
889 return UlongToHandle( NtUserCallOneParam( is_popup, NtUserCallOneParam_CreateMenu ));
892 static inline WORD NtUserEnableDC( HDC hdc )
894 return NtUserCallOneParam( HandleToUlong(hdc), NtUserCallOneParam_EnableDC );
897 static inline void NtUserEnableThunkLock( BOOL enable )
899 NtUserCallOneParam( enable, NtUserCallOneParam_EnableThunkLock );
902 static inline UINT NtUserEnumClipboardFormats( UINT format )
904 return NtUserCallOneParam( format, NtUserCallOneParam_EnumClipboardFormats );
907 static inline BOOL NtUserGetClipCursor( RECT *rect )
909 return NtUserCallOneParam( (UINT_PTR)rect, NtUserCallOneParam_GetClipCursor );
912 static inline BOOL NtUserGetCursorPos( POINT *pt )
914 return NtUserCallOneParam( (UINT_PTR)pt, NtUserCallOneParam_GetCursorPos );
917 static inline UINT_PTR NtUserGetIconParam( HICON icon )
919 return NtUserCallOneParam( HandleToUlong(icon), NtUserCallOneParam_GetIconParam );
922 static inline UINT_PTR NtUserGetMenuItemCount( HMENU menu )
924 return NtUserCallOneParam( HandleToUlong(menu), NtUserCallOneParam_GetMenuItemCount );
927 static inline RECT NtUserGetPrimaryMonitorRect(void)
929 RECT primary;
930 NtUserCallOneParam( (UINT_PTR)&primary, NtUserCallOneParam_GetPrimaryMonitorRect );
931 return primary;
934 static inline BOOL NtUserSetCaretBlinkTime( unsigned int time )
936 return NtUserCallOneParam( time, NtUserCallOneParam_SetCaretBlinkTime );
939 static inline COLORREF NtUserGetSysColor( INT index )
941 return NtUserCallOneParam( index, NtUserCallOneParam_GetSysColor );
944 static inline HBRUSH NtUserGetSysColorBrush( INT index )
946 return UlongToHandle( NtUserCallOneParam( index, NtUserCallOneParam_GetSysColorBrush ));
949 static inline HPEN NtUserGetSysColorPen( INT index )
951 return UlongToHandle( NtUserCallOneParam( index, NtUserCallOneParam_GetSysColorPen ));
954 static inline INT NtUserGetSystemMetrics( INT index )
956 return NtUserCallOneParam( index, NtUserCallOneParam_GetSystemMetrics );
959 static inline RECT NtUserGetVirtualScreenRect(void)
961 RECT virtual;
962 NtUserCallOneParam( (UINT_PTR)&virtual, NtUserCallOneParam_GetVirtualScreenRect );
963 return virtual;
966 static inline BOOL NtUserIsWindowRectFullScreen( const RECT *rect )
968 return NtUserCallOneParam( (UINT_PTR)rect, NtUserCallOneParam_IsWindowRectFullScreen );
971 static inline BOOL NtUserMessageBeep( UINT i )
973 return NtUserCallOneParam( i, NtUserCallOneParam_MessageBeep );
976 static inline UINT NtUserRealizePalette( HDC hdc )
978 return NtUserCallOneParam( HandleToUlong(hdc), NtUserCallOneParam_RealizePalette );
981 static inline BOOL NtUserReplyMessage( LRESULT result )
983 return NtUserCallOneParam( result, NtUserCallOneParam_ReplyMessage );
986 static inline UINT NtUserSetProcessDefaultLayout( DWORD layout )
988 return NtUserCallOneParam( layout, NtUserCallOneParam_SetProcessDefaultLayout );
991 /* NtUserCallTwoParam codes, not compatible with Windows */
992 enum
994 NtUserCallTwoParam_GetDialogProc,
995 NtUserCallTwoParam_GetMenuInfo,
996 NtUserCallTwoParam_GetMonitorInfo,
997 NtUserCallTwoParam_GetSystemMetricsForDpi,
998 NtUserCallTwoParam_MonitorFromRect,
999 NtUserCallTwoParam_SetCaretPos,
1000 NtUserCallTwoParam_SetIconParam,
1001 NtUserCallTwoParam_UnhookWindowsHook,
1002 /* temporary exports */
1003 NtUserAllocWinProc,
1006 static inline DLGPROC NtUserGetDialogProc( DLGPROC proc, BOOL ansi )
1008 return (DLGPROC)NtUserCallTwoParam( (UINT_PTR)proc, ansi, NtUserCallTwoParam_GetDialogProc );
1011 static inline BOOL NtUserGetMenuInfo( HMENU menu, MENUINFO *info )
1013 return NtUserCallTwoParam( HandleToUlong(menu), (ULONG_PTR)info,
1014 NtUserCallTwoParam_GetMenuInfo );
1017 static inline BOOL NtUserGetMonitorInfo( HMONITOR monitor, MONITORINFO *info )
1019 return NtUserCallTwoParam( HandleToUlong(monitor), (ULONG_PTR)info,
1020 NtUserCallTwoParam_GetMonitorInfo );
1023 static inline INT NtUserGetSystemMetricsForDpi( INT index, UINT dpi )
1025 return NtUserCallTwoParam( index, dpi, NtUserCallTwoParam_GetSystemMetricsForDpi );
1028 static inline HMONITOR NtUserMonitorFromRect( const RECT *rect, DWORD flags )
1030 ULONG ret = NtUserCallTwoParam( (LONG_PTR)rect, flags, NtUserCallTwoParam_MonitorFromRect );
1031 return UlongToHandle( ret );
1034 static inline BOOL NtUserSetCaretPos( int x, int y )
1036 return NtUserCallTwoParam( x, y, NtUserCallTwoParam_SetCaretPos );
1039 static inline UINT_PTR NtUserSetIconParam( HICON icon, ULONG_PTR param )
1041 return NtUserCallTwoParam( HandleToUlong(icon), param, NtUserCallTwoParam_SetIconParam );
1044 static inline BOOL NtUserUnhookWindowsHook( INT id, HOOKPROC proc )
1046 return NtUserCallTwoParam( id, (UINT_PTR)proc, NtUserCallTwoParam_UnhookWindowsHook );
1049 /* NtUserCallHwnd codes, not compatible with Windows */
1050 enum
1052 NtUserCallHwnd_ActivateOtherWindow,
1053 NtUserCallHwnd_ArrangeIconicWindows,
1054 NtUserCallHwnd_DrawMenuBar,
1055 NtUserCallHwnd_GetDefaultImeWindow,
1056 NtUserCallHwnd_GetDialogInfo,
1057 NtUserCallHwnd_GetDpiForWindow,
1058 NtUserCallHwnd_GetMDIClientInfo,
1059 NtUserCallHwnd_GetParent,
1060 NtUserCallHwnd_GetWindowContextHelpId,
1061 NtUserCallHwnd_GetWindowDpiAwarenessContext,
1062 NtUserCallHwnd_GetWindowInputContext,
1063 NtUserCallHwnd_GetWindowSysSubMenu,
1064 NtUserCallHwnd_GetWindowTextLength,
1065 NtUserCallHwnd_IsWindow,
1066 NtUserCallHwnd_IsWindowEnabled,
1067 NtUserCallHwnd_IsWindowUnicode,
1068 NtUserCallHwnd_IsWindowVisible,
1069 NtUserCallHwnd_SetForegroundWindow,
1070 NtUserCallHwnd_SetProgmanWindow,
1071 NtUserCallHwnd_SetTaskmanWindow,
1072 /* temporary exports */
1073 NtUserGetFullWindowHandle,
1074 NtUserIsCurrehtProcessWindow,
1075 NtUserIsCurrehtThreadWindow,
1078 static inline void NtUserActivateOtherWindow( HWND hwnd )
1080 NtUserCallHwnd( hwnd, NtUserCallHwnd_ActivateOtherWindow );
1083 static inline UINT NtUserArrangeIconicWindows( HWND parent )
1085 return NtUserCallHwnd( parent, NtUserCallHwnd_ArrangeIconicWindows );
1088 static inline BOOL NtUserDrawMenuBar( HWND hwnd )
1090 return NtUserCallHwnd( hwnd, NtUserCallHwnd_DrawMenuBar );
1093 static inline DWORD NtUserGetWindowContextHelpId( HWND hwnd )
1095 return NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowContextHelpId );
1098 static inline HWND NtUserGetDefaultImeWindow( HWND hwnd )
1100 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetDefaultImeWindow ));
1103 static inline void *NtUserGetDialogInfo( HWND hwnd )
1105 return (void *)NtUserCallHwnd( hwnd, NtUserCallHwnd_GetDialogInfo );
1108 static inline UINT NtUserGetDpiForWindow( HWND hwnd )
1110 return NtUserCallHwnd( hwnd, NtUserCallHwnd_GetDpiForWindow );
1113 static inline void *NtUserGetMDIClientInfo( HWND hwnd )
1115 return (void *)NtUserCallHwnd( hwnd, NtUserCallHwnd_GetMDIClientInfo );
1118 static inline HWND NtUserGetParent( HWND hwnd )
1120 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetParent ));
1123 static inline DPI_AWARENESS_CONTEXT NtUserGetWindowDpiAwarenessContext( HWND hwnd )
1125 return (DPI_AWARENESS_CONTEXT)NtUserCallHwnd( hwnd,
1126 NtUserCallHwnd_GetWindowDpiAwarenessContext );
1129 static inline HIMC NtUserGetWindowInputContext( HWND hwnd )
1131 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowInputContext ));
1134 static inline HMENU NtUserGetWindowSysSubMenu( HWND hwnd )
1136 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowSysSubMenu ));
1139 static inline INT NtUserGetWindowTextLength( HWND hwnd )
1141 return NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowTextLength );
1144 static inline BOOL NtUserIsWindow( HWND hwnd )
1146 return NtUserCallHwnd( hwnd, NtUserCallHwnd_IsWindow );
1149 static inline BOOL NtUserIsWindowEnabled( HWND hwnd )
1151 return NtUserCallHwnd( hwnd, NtUserCallHwnd_IsWindowEnabled );
1154 static inline BOOL NtUserIsWindowUnicode( HWND hwnd )
1156 return NtUserCallHwnd( hwnd, NtUserCallHwnd_IsWindowUnicode );
1159 static inline BOOL NtUserIsWindowVisible( HWND hwnd )
1161 return NtUserCallHwnd( hwnd, NtUserCallHwnd_IsWindowVisible );
1164 static inline BOOL NtUserSetForegroundWindow( HWND hwnd )
1166 return NtUserCallHwnd( hwnd, NtUserCallHwnd_SetForegroundWindow );
1169 static inline HWND NtUserSetProgmanWindow( HWND hwnd )
1171 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_SetProgmanWindow ));
1174 static inline HWND NtUserSetTaskmanWindow( HWND hwnd )
1176 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_SetTaskmanWindow ));
1179 /* NtUserCallHwndParam codes, not compatible with Windows */
1180 enum
1182 NtUserCallHwndParam_ClientToScreen,
1183 NtUserCallHwndParam_EnableWindow,
1184 NtUserCallHwndParam_GetChildRect,
1185 NtUserCallHwndParam_GetClassLongA,
1186 NtUserCallHwndParam_GetClassLongW,
1187 NtUserCallHwndParam_GetClassLongPtrA,
1188 NtUserCallHwndParam_GetClassLongPtrW,
1189 NtUserCallHwndParam_GetClassWord,
1190 NtUserCallHwndParam_GetClientRect,
1191 NtUserCallHwndParam_GetScrollInfo,
1192 NtUserCallHwndParam_GetWindowInfo,
1193 NtUserCallHwndParam_GetWindowLongA,
1194 NtUserCallHwndParam_GetWindowLongW,
1195 NtUserCallHwndParam_GetWindowLongPtrA,
1196 NtUserCallHwndParam_GetWindowLongPtrW,
1197 NtUserCallHwndParam_GetWindowRect,
1198 NtUserCallHwndParam_GetWindowRelative,
1199 NtUserCallHwndParam_GetWindowThread,
1200 NtUserCallHwndParam_GetWindowWord,
1201 NtUserCallHwndParam_IsChild,
1202 NtUserCallHwndParam_KillSystemTimer,
1203 NtUserCallHwndParam_MapWindowPoints,
1204 NtUserCallHwndParam_MirrorRgn,
1205 NtUserCallHwndParam_MonitorFromWindow,
1206 NtUserCallHwndParam_ScreenToClient,
1207 NtUserCallHwndParam_SetDialogInfo,
1208 NtUserCallHwndParam_SetMDIClientInfo,
1209 NtUserCallHwndParam_SetWindowContextHelpId,
1210 NtUserCallHwndParam_ShowOwnedPopups,
1211 /* temporary exports */
1212 NtUserSetWindowStyle,
1215 static inline BOOL NtUserClientToScreen( HWND hwnd, POINT *pt )
1217 return NtUserCallHwndParam( hwnd, (UINT_PTR)pt, NtUserCallHwndParam_ClientToScreen );
1220 static inline BOOL NtUserEnableWindow( HWND hwnd, BOOL enable )
1222 return NtUserCallHwndParam( hwnd, enable, NtUserCallHwndParam_EnableWindow );
1225 static inline BOOL NtUserGetChildRect( HWND hwnd, RECT *rect )
1227 return NtUserCallHwndParam( hwnd, (UINT_PTR)rect, NtUserCallHwndParam_GetChildRect );
1230 static inline DWORD NtUserGetClassLongA( HWND hwnd, INT offset )
1232 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetClassLongA );
1235 static inline ULONG_PTR NtUserGetClassLongPtrA( HWND hwnd, INT offset )
1237 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetClassLongPtrA );
1240 static inline ULONG_PTR NtUserGetClassLongPtrW( HWND hwnd, INT offset )
1242 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetClassLongPtrW );
1245 static inline DWORD NtUserGetClassLongW( HWND hwnd, INT offset )
1247 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetClassLongW );
1250 static inline WORD NtUserGetClassWord( HWND hwnd, INT offset )
1252 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetClassWord );
1255 static inline BOOL NtUserGetClientRect( HWND hwnd, RECT *rect )
1257 return NtUserCallHwndParam( hwnd, (UINT_PTR)rect, NtUserCallHwndParam_GetClientRect );
1260 struct get_scroll_info_params
1262 int bar;
1263 SCROLLINFO *info;
1266 static inline BOOL NtUserGetScrollInfo( HWND hwnd, INT bar, SCROLLINFO *info )
1268 struct get_scroll_info_params params = { .bar = bar, .info = info };
1269 return NtUserCallHwndParam( hwnd, (UINT_PTR)&params, NtUserCallHwndParam_GetScrollInfo );
1272 static inline BOOL NtUserGetWindowInfo( HWND hwnd, WINDOWINFO *info )
1274 return NtUserCallHwndParam( hwnd, (UINT_PTR)info, NtUserCallHwndParam_GetWindowInfo );
1277 static inline LONG NtUserGetWindowLongA( HWND hwnd, INT offset )
1279 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowLongA );
1282 static inline LONG_PTR NtUserGetWindowLongPtrA( HWND hwnd, INT offset )
1284 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowLongPtrA );
1287 static inline LONG_PTR NtUserGetWindowLongPtrW( HWND hwnd, INT offset )
1289 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowLongPtrW );
1292 static inline LONG NtUserGetWindowLongW( HWND hwnd, INT offset )
1294 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowLongW );
1297 static inline BOOL NtUserGetWindowRect( HWND hwnd, RECT *rect )
1299 return NtUserCallHwndParam( hwnd, (UINT_PTR)rect, NtUserCallHwndParam_GetWindowRect );
1302 static inline HWND NtUserGetWindowRelative( HWND hwnd, UINT rel )
1304 return UlongToHandle( NtUserCallHwndParam( hwnd, rel,
1305 NtUserCallHwndParam_GetWindowRelative ));
1308 static inline DWORD NtUserGetWindowThread( HWND hwnd, DWORD *process )
1310 return NtUserCallHwndParam( hwnd, (UINT_PTR)process, NtUserCallHwndParam_GetWindowThread );
1313 static inline WORD NtUserGetWindowWord( HWND hwnd, INT offset )
1315 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowWord );
1318 static inline BOOL NtUserIsChild( HWND parent, HWND child )
1320 return NtUserCallHwndParam( parent, HandleToUlong(child), NtUserCallHwndParam_IsChild );
1323 static inline BOOL NtUserKillSystemTimer( HWND hwnd, UINT_PTR id )
1325 return NtUserCallHwndParam( hwnd, id, NtUserCallHwndParam_KillSystemTimer );
1328 struct map_window_points_params
1330 HWND hwnd_to;
1331 POINT *points;
1332 UINT count;
1335 static inline int NtUserMapWindowPoints( HWND hwnd_from, HWND hwnd_to, POINT *points, UINT count )
1337 struct map_window_points_params params;
1338 params.hwnd_to = hwnd_to;
1339 params.points = points;
1340 params.count = count;
1341 return NtUserCallHwndParam( hwnd_from, (UINT_PTR)&params,
1342 NtUserCallHwndParam_MapWindowPoints );
1345 static inline BOOL NtUserMirrorRgn( HWND hwnd, HRGN hrgn )
1347 return NtUserCallHwndParam( hwnd, HandleToUlong(hrgn), NtUserCallHwndParam_MirrorRgn );
1350 static inline HMONITOR NtUserMonitorFromWindow( HWND hwnd, DWORD flags )
1352 ULONG ret = NtUserCallHwndParam( hwnd, flags, NtUserCallHwndParam_MonitorFromWindow );
1353 return UlongToHandle( ret );
1356 static inline BOOL NtUserScreenToClient( HWND hwnd, POINT *pt )
1358 return NtUserCallHwndParam( hwnd, (UINT_PTR)pt, NtUserCallHwndParam_ScreenToClient );
1361 static inline void NtUserSetDialogInfo( HWND hwnd, void *info )
1363 NtUserCallHwndParam( hwnd, (UINT_PTR)info, NtUserCallHwndParam_SetDialogInfo );
1366 static inline void NtUserSetMDIClientInfo( HWND hwnd, void *info )
1368 NtUserCallHwndParam( hwnd, (UINT_PTR)info, NtUserCallHwndParam_SetMDIClientInfo );
1371 static inline BOOL NtUserSetWindowContextHelpId( HWND hwnd, DWORD id )
1373 return NtUserCallHwndParam( hwnd, id, NtUserCallHwndParam_SetWindowContextHelpId );
1376 static inline BOOL NtUserShowOwnedPopups( HWND hwnd, BOOL show )
1378 return NtUserCallHwndParam( hwnd, show, NtUserCallHwndParam_ShowOwnedPopups );
1381 /* Wine extensions */
1382 BOOL WINAPI __wine_send_input( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput );
1384 #endif /* _NTUSER_ */