winegstreamer: Create media source presentation descriptor as needed.
[wine.git] / include / ntuser.h
blob3d43eb476e4a855487a0b2bc60c4992950eeace0
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 <winternl.h>
27 /* KernelCallbackTable codes, not compatible with Windows */
28 enum
30 /* user32 callbacks */
31 NtUserCallEnumDisplayMonitor,
32 NtUserCallSendAsyncCallback,
33 NtUserCallWinEventHook,
34 NtUserCallWinProc,
35 NtUserCallWindowsHook,
36 NtUserCopyImage,
37 NtUserDrawNonClientButton,
38 NtUserDrawScrollBar,
39 NtUserDrawText,
40 NtUserFreeCachedClipboardData,
41 NtUserImmProcessKey,
42 NtUserImmTranslateMessage,
43 NtUserInitBuiltinClasses,
44 NtUserLoadDriver,
45 NtUserLoadImage,
46 NtUserLoadSysMenu,
47 NtUserPostDDEMessage,
48 NtUserRenderSynthesizedFormat,
49 NtUserUnpackDDEMessage,
50 /* win16 hooks */
51 NtUserCallFreeIcon,
52 NtUserThunkLock,
53 /* Vulkan support */
54 NtUserCallVulkanDebugReportCallback,
55 NtUserCallVulkanDebugUtilsCallback,
56 /* OpenGL support */
57 NtUserCallOpenGLDebugMessageCallback,
58 /* Driver-specific callbacks */
59 NtUserDriverCallbackFirst,
60 NtUserDriverCallbackLast = NtUserDriverCallbackFirst + 9,
61 NtUserCallCount
64 /* TEB thread info, not compatible with Windows */
65 struct ntuser_thread_info
67 UINT64 driver_data; /* driver-specific data */
68 DWORD message_time; /* value for GetMessageTime */
69 DWORD message_pos; /* value for GetMessagePos */
70 UINT64 message_extra; /* value for GetMessageExtraInfo */
71 INPUT_MESSAGE_SOURCE msg_source; /* Message source for current message */
72 WORD recursion_count; /* SendMessage recursion counter */
73 UINT receive_flags; /* currently received message flags */
74 UINT top_window; /* desktop window */
75 UINT msg_window; /* HWND_MESSAGE parent window */
76 DPI_AWARENESS dpi_awareness; /* DPI awareness */
77 UINT default_imc; /* default input context */
78 UINT64 client_imm; /* client IMM thread info */
79 UINT64 wmchar_data; /* client data for WM_CHAR mappings */
82 static inline struct ntuser_thread_info *NtUserGetThreadInfo(void)
84 #ifndef _WIN64
85 if (NtCurrentTeb()->GdiBatchCount)
87 TEB64 *teb64 = (TEB64 *)(UINT_PTR)NtCurrentTeb()->GdiBatchCount;
88 return (struct ntuser_thread_info *)teb64->Win32ClientInfo;
90 #endif
91 return (struct ntuser_thread_info *)NtCurrentTeb()->Win32ClientInfo;
94 /* NtUserCallEnumDisplayMonitor params */
95 struct enum_display_monitor_params
97 MONITORENUMPROC proc;
98 HMONITOR monitor;
99 HDC hdc;
100 RECT rect;
101 LPARAM lparam;
104 /* NtUserCallSendAsyncCallback params */
105 struct send_async_params
107 SENDASYNCPROC callback;
108 HWND hwnd;
109 UINT msg;
110 ULONG_PTR data;
111 LRESULT result;
114 /* NtUserCallWinEventHook params */
115 struct win_event_hook_params
117 DWORD event;
118 HWND hwnd;
119 LONG object_id;
120 LONG child_id;
121 void *handle;
122 DWORD tid;
123 DWORD time;
124 WINEVENTPROC proc;
125 WCHAR module[MAX_PATH];
128 /* type of message-sending functions that need special WM_CHAR handling */
129 enum wm_char_mapping
131 WMCHAR_MAP_POSTMESSAGE,
132 WMCHAR_MAP_SENDMESSAGE,
133 WMCHAR_MAP_SENDMESSAGETIMEOUT,
134 WMCHAR_MAP_RECVMESSAGE,
135 WMCHAR_MAP_DISPATCHMESSAGE,
136 WMCHAR_MAP_CALLWINDOWPROC,
137 WMCHAR_MAP_COUNT,
138 WMCHAR_MAP_NOMAPPING = WMCHAR_MAP_COUNT
141 /* NtUserCallWindowProc params */
142 struct win_proc_params
144 WNDPROC func;
145 HWND hwnd;
146 UINT msg;
147 WPARAM wparam;
148 LPARAM lparam;
149 LRESULT *result;
150 BOOL ansi;
151 BOOL ansi_dst;
152 BOOL needs_unpack;
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 UINT lparam_size;
171 BOOL prev_unicode;
172 BOOL next_unicode;
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 RECT *ret_rect; /* FIXME: Use NtCallbackReturn instead */
192 UINT flags;
193 WCHAR str[1];
196 /* NtUserFreeCachedClipboardData params */
197 struct free_cached_data_params
199 UINT format;
200 HANDLE handle;
203 /* NtUserImmProcessKey params */
204 struct imm_process_key_params
206 HWND hwnd;
207 HKL hkl;
208 UINT vkey;
209 LPARAM key_data;
212 /* NtUserImmTranslateMessage params */
213 struct imm_translate_message_params
215 HWND hwnd;
216 UINT msg;
217 WPARAM wparam;
218 LPARAM key_data;
221 /* NtUserLoadImage params */
222 struct load_image_params
224 HINSTANCE hinst;
225 const WCHAR *name;
226 UINT type;
227 INT dx;
228 INT dy;
229 UINT flags;
232 /* NtUserLoadSysMenu params */
233 struct load_sys_menu_params
235 BOOL mdi;
238 /* NtUserPostDDEMessage params */
239 struct post_dde_message_params
241 HWND hwnd;
242 UINT msg;
243 WPARAM wparam;
244 LPARAM lparam;
245 DWORD dest_tid;
246 DWORD type;
249 /* NtUserRenderSynthesizedFormat params */
250 struct render_synthesized_format_params
252 UINT format;
253 UINT from;
256 /* NtUserUnpackDDEMessage params */
257 struct unpack_dde_message_result
259 WPARAM wparam;
260 LPARAM lparam;
263 struct unpack_dde_message_params
265 struct unpack_dde_message_result *result; /* FIXME: Use NtCallbackReturn instead */
266 HWND hwnd;
267 UINT message;
268 WPARAM wparam;
269 LPARAM lparam;
270 char data[1];
273 /* process DPI awareness contexts */
274 #define NTUSER_DPI_UNAWARE 0x00006010
275 #define NTUSER_DPI_SYSTEM_AWARE 0x00006011
276 #define NTUSER_DPI_PER_MONITOR_AWARE 0x00000012
277 #define NTUSER_DPI_PER_MONITOR_AWARE_V2 0x00000022
278 #define NTUSER_DPI_PER_UNAWARE_GDISCALED 0x40006010
280 /* message spy definitions */
281 #define SPY_DISPATCHMESSAGE 0x0100
282 #define SPY_SENDMESSAGE 0x0101
283 #define SPY_DEFWNDPROC 0x0102
285 #define SPY_RESULT_OK 0x0001
286 #define SPY_RESULT_DEFWND 0x0002
288 /* NtUserMessageCall codes */
289 enum
291 NtUserScrollBarWndProc = 0x029a,
292 NtUserPopupMenuWndProc = 0x029c,
293 NtUserDesktopWindowProc = 0x029d,
294 NtUserDefWindowProc = 0x029e,
295 NtUserCallWindowProc = 0x02ab,
296 NtUserSendMessage = 0x02b1,
297 NtUserSendMessageTimeout = 0x02b3,
298 NtUserSendNotifyMessage = 0x02b7,
299 NtUserSendMessageCallback = 0x02b8,
300 /* Wine-specific exports */
301 NtUserClipboardWindowProc = 0x0300,
302 NtUserGetDispatchParams = 0x3001,
303 NtUserSendDriverMessage = 0x3002,
304 NtUserSpyGetMsgName = 0x3003,
305 NtUserSpyEnter = 0x0304,
306 NtUserSpyExit = 0x0305,
307 NtUserWinProcResult = 0x0306,
310 /* NtUserThunkedMenuItemInfo codes */
311 enum
313 NtUserSetMenuItemInfo,
314 NtUserInsertMenuItem,
315 /* Wine extensions */
316 NtUserCheckMenuRadioItem,
317 NtUserGetMenuDefaultItem,
318 NtUserGetMenuItemID,
319 NtUserGetMenuItemInfoA,
320 NtUserGetMenuItemInfoW,
321 NtUserGetMenuState,
322 NtUserGetSubMenu,
325 struct send_message_timeout_params
327 UINT flags;
328 UINT timeout;
329 DWORD_PTR result;
332 struct send_message_callback_params
334 SENDASYNCPROC callback;
335 ULONG_PTR data;
338 /* color index used to retrieve system 55aa brush */
339 #define COLOR_55AA_BRUSH 0x100
341 /* user object types */
342 #define NTUSER_OBJ_WINDOW 0x01
343 #define NTUSER_OBJ_MENU 0x02
344 #define NTUSER_OBJ_ICON 0x03
345 #define NTUSER_OBJ_WINPOS 0x04
346 #define NTUSER_OBJ_ACCEL 0x08
347 #define NTUSER_OBJ_HOOK 0x0f
348 #define NTUSER_OBJ_IMC 0x11
350 /* NtUserScrollWindowEx flag */
351 #define SW_NODCCACHE 0x8000
353 /* NtUserSetScrollInfo flag */
354 #define SIF_RETURNPREV 0x1000
356 /* NtUserInitializeClientPfnArrays parameter, not compatible with Windows */
357 struct user_client_procs
359 WNDPROC pButtonWndProc;
360 WNDPROC pComboWndProc;
361 WNDPROC pDefWindowProc;
362 WNDPROC pDefDlgProc;
363 WNDPROC pEditWndProc;
364 WNDPROC pListBoxWndProc;
365 WNDPROC pMDIClientWndProc;
366 WNDPROC pScrollBarWndProc;
367 WNDPROC pStaticWndProc;
368 WNDPROC pImeWndProc;
369 WNDPROC pDesktopWndProc;
370 WNDPROC pIconTitleWndProc;
371 WNDPROC pPopupMenuWndProc;
372 WNDPROC pMessageWndProc;
375 /* NtUserSetCursorIconData parameter, not compatible with Windows */
376 struct cursoricon_frame
378 UINT width; /* frame-specific width */
379 UINT height; /* frame-specific height */
380 HBITMAP color; /* color bitmap */
381 HBITMAP alpha; /* pre-multiplied alpha bitmap for 32-bpp icons */
382 HBITMAP mask; /* mask bitmap (followed by color for 1-bpp icons) */
383 POINT hotspot;
386 struct cursoricon_desc
388 UINT flags;
389 UINT num_steps;
390 UINT num_frames;
391 UINT delay;
392 struct cursoricon_frame *frames;
393 DWORD *frame_seq;
394 DWORD *frame_rates;
395 HRSRC rsrc;
398 struct client_menu_name
400 char *nameA;
401 WCHAR *nameW;
402 UNICODE_STRING *nameUS;
405 /* NtUserGetClipboardData params, not compatible with Windows */
406 struct get_clipboard_params
408 void *data;
409 size_t size;
410 size_t data_size;
411 UINT seqno;
412 BOOL data_only;
415 /* NtUserSetClipboardData params, not compatible with Windows */
416 struct set_clipboard_params
418 void *data;
419 size_t size;
420 BOOL cache_only;
421 UINT seqno;
424 /* NtUserNonClientButton params */
425 struct draw_non_client_button_params
427 HWND hwnd;
428 HDC hdc;
429 enum NONCLIENT_BUTTON_TYPE type;
430 RECT rect;
431 BOOL down;
432 BOOL grayed;
435 /* NtUserDrawScrollBar params */
436 struct draw_scroll_bar_params
438 HWND hwnd;
439 HDC hdc;
440 INT bar;
441 UINT hit_test;
442 struct SCROLL_TRACKING_INFO tracking_info;
443 BOOL arrows;
444 BOOL interior;
445 RECT rect;
446 UINT enable_flags;
447 INT arrow_size;
448 INT thumb_pos;
449 INT thumb_size;
450 BOOL vertical;
453 /* NtUserUpdateInputContext param, not compatible with Window */
454 enum input_context_attr
456 NtUserInputContextClientPtr,
457 NtUserInputContextThreadId,
460 /* NtUserAssociateInputContext result */
461 enum associate_input_context_result
463 AICR_OK,
464 AICR_FOCUS_CHANGED,
465 AICR_FAILED,
468 /* internal messages codes */
469 enum wine_internal_message
471 WM_WINE_DESTROYWINDOW = 0x80000000,
472 WM_WINE_SETWINDOWPOS,
473 WM_WINE_SHOWWINDOW,
474 WM_WINE_SETPARENT,
475 WM_WINE_SETWINDOWLONG,
476 WM_WINE_SETSTYLE,
477 WM_WINE_SETACTIVEWINDOW,
478 WM_WINE_KEYBOARD_LL_HOOK,
479 WM_WINE_MOUSE_LL_HOOK,
480 WM_WINE_CLIPCURSOR,
481 WM_WINE_UPDATEWINDOWSTATE,
482 WM_WINE_FIRST_DRIVER_MSG = 0x80001000, /* range of messages reserved for the USER driver */
483 WM_WINE_LAST_DRIVER_MSG = 0x80001fff
486 /* internal IME message */
487 #define WM_IME_INTERNAL 0x287
488 #define IME_INTERNAL_ACTIVATE 0x17
489 #define IME_INTERNAL_DEACTIVATE 0x18
490 #define IME_INTERNAL_HKL_ACTIVATE 0x19
491 #define IME_INTERNAL_HKL_DEACTIVATE 0x20
493 /* internal IME private */
494 typedef struct ime_private
496 BOOL bInComposition;
497 BOOL bInternalState;
498 HFONT textfont;
499 HWND hwndDefault;
500 UINT repeat;
501 } IMEPRIVATE, *LPIMEPRIVATE;
503 #define WM_SYSTIMER 0x0118
505 /* the various structures that can be sent in messages, in platform-independent layout */
506 struct packed_CREATESTRUCTW
508 ULONGLONG lpCreateParams;
509 ULONGLONG hInstance;
510 UINT hMenu;
511 DWORD __pad1;
512 UINT hwndParent;
513 DWORD __pad2;
514 INT cy;
515 INT cx;
516 INT y;
517 INT x;
518 LONG style;
519 ULONGLONG lpszName;
520 ULONGLONG lpszClass;
521 DWORD dwExStyle;
522 DWORD __pad3;
525 struct packed_DRAWITEMSTRUCT
527 UINT CtlType;
528 UINT CtlID;
529 UINT itemID;
530 UINT itemAction;
531 UINT itemState;
532 UINT hwndItem;
533 DWORD __pad1;
534 UINT hDC;
535 DWORD __pad2;
536 RECT rcItem;
537 ULONGLONG itemData;
540 struct packed_MEASUREITEMSTRUCT
542 UINT CtlType;
543 UINT CtlID;
544 UINT itemID;
545 UINT itemWidth;
546 UINT itemHeight;
547 ULONGLONG itemData;
550 struct packed_DELETEITEMSTRUCT
552 UINT CtlType;
553 UINT CtlID;
554 UINT itemID;
555 UINT hwndItem;
556 DWORD __pad;
557 ULONGLONG itemData;
560 struct packed_COMPAREITEMSTRUCT
562 UINT CtlType;
563 UINT CtlID;
564 UINT hwndItem;
565 DWORD __pad1;
566 UINT itemID1;
567 ULONGLONG itemData1;
568 UINT itemID2;
569 ULONGLONG itemData2;
570 DWORD dwLocaleId;
571 DWORD __pad2;
574 struct packed_WINDOWPOS
576 UINT hwnd;
577 DWORD __pad1;
578 UINT hwndInsertAfter;
579 DWORD __pad2;
580 INT x;
581 INT y;
582 INT cx;
583 INT cy;
584 UINT flags;
585 DWORD __pad3;
588 struct packed_COPYDATASTRUCT
590 ULONGLONG dwData;
591 DWORD cbData;
592 ULONGLONG lpData;
595 struct packed_HELPINFO
597 UINT cbSize;
598 INT iContextType;
599 INT iCtrlId;
600 UINT hItemHandle;
601 DWORD __pad;
602 ULONGLONG dwContextId;
603 POINT MousePos;
606 struct packed_NCCALCSIZE_PARAMS
608 RECT rgrc[3];
609 ULONGLONG __pad1;
610 UINT hwnd;
611 DWORD __pad2;
612 UINT hwndInsertAfter;
613 DWORD __pad3;
614 INT x;
615 INT y;
616 INT cx;
617 INT cy;
618 UINT flags;
619 DWORD __pad4;
622 struct packed_MSG
624 UINT hwnd;
625 DWORD __pad1;
626 UINT message;
627 ULONGLONG wParam;
628 ULONGLONG lParam;
629 DWORD time;
630 POINT pt;
631 DWORD __pad2;
634 struct packed_MDINEXTMENU
636 UINT hmenuIn;
637 DWORD __pad1;
638 UINT hmenuNext;
639 DWORD __pad2;
640 UINT hwndNext;
641 DWORD __pad3;
644 struct packed_MDICREATESTRUCTW
646 ULONGLONG szClass;
647 ULONGLONG szTitle;
648 ULONGLONG hOwner;
649 INT x;
650 INT y;
651 INT cx;
652 INT cy;
653 DWORD style;
654 ULONGLONG lParam;
658 HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags );
659 BOOL WINAPI NtUserAddClipboardFormatListener( HWND hwnd );
660 UINT WINAPI NtUserAssociateInputContext( HWND hwnd, HIMC ctx, ULONG flags );
661 BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach );
662 HDC WINAPI NtUserBeginPaint( HWND hwnd, PAINTSTRUCT *ps );
663 NTSTATUS WINAPI NtUserBuildHimcList( UINT thread_id, UINT count, HIMC *buffer, UINT *size );
664 NTSTATUS WINAPI NtUserBuildHwndList( HDESK desktop, ULONG unk2, ULONG unk3, ULONG unk4,
665 ULONG thread_id, ULONG count, HWND *buffer, ULONG *size );
666 ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code );
667 ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code );
668 LRESULT WINAPI NtUserCallNextHookEx( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam );
669 BOOL WINAPI NtUserCallMsgFilter( MSG *msg, INT code );
670 ULONG_PTR WINAPI NtUserCallNoParam( ULONG code );
671 ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code );
672 ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code );
673 BOOL WINAPI NtUserChangeClipboardChain( HWND hwnd, HWND next );
674 LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
675 DWORD flags, void *lparam );
676 DWORD WINAPI NtUserCheckMenuItem( HMENU handle, UINT id, UINT flags );
677 HWND WINAPI NtUserChildWindowFromPointEx( HWND parent, LONG x, LONG y, UINT flags );
678 BOOL WINAPI NtUserClipCursor( const RECT *rect );
679 BOOL WINAPI NtUserCloseClipboard(void);
680 BOOL WINAPI NtUserCloseDesktop( HDESK handle );
681 BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
682 INT WINAPI NtUserCopyAcceleratorTable( HACCEL src, ACCEL *dst, INT count );
683 INT WINAPI NtUserCountClipboardFormats(void);
684 HACCEL WINAPI NtUserCreateAcceleratorTable( ACCEL *table, INT count );
685 BOOL WINAPI NtUserCreateCaret( HWND hwnd, HBITMAP bitmap, int width, int height );
686 HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *device,
687 DEVMODEW *devmode, DWORD flags, ACCESS_MASK access,
688 ULONG heap_size );
689 HIMC WINAPI NtUserCreateInputContext( UINT_PTR client_ptr );
690 HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
691 UNICODE_STRING *version, UNICODE_STRING *window_name,
692 DWORD style, INT x, INT y, INT cx, INT cy,
693 HWND parent, HMENU menu, HINSTANCE instance, void *params,
694 DWORD flags, HINSTANCE client_instance, DWORD unk, BOOL ansi );
695 HWINSTA WINAPI NtUserCreateWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK mask, ULONG arg3,
696 ULONG arg4, ULONG arg5, ULONG arg6, ULONG arg7 );
697 HDWP WINAPI NtUserDeferWindowPosAndBand( HDWP hdwp, HWND hwnd, HWND after, INT x, INT y,
698 INT cx, INT cy, UINT flags, UINT unk1, UINT unk2 );
699 BOOL WINAPI NtUserDeleteMenu( HMENU menu, UINT id, UINT flags );
700 BOOL WINAPI NtUserDestroyAcceleratorTable( HACCEL handle );
701 BOOL WINAPI NtUserDestroyCursor( HCURSOR cursor, ULONG arg );
702 BOOL WINAPI NtUserDestroyInputContext( HIMC handle );
703 BOOL WINAPI NtUserDestroyMenu( HMENU menu );
704 BOOL WINAPI NtUserDestroyWindow( HWND hwnd );
705 BOOL WINAPI NtUserDisableThreadIme( DWORD thread_id );
706 LRESULT WINAPI NtUserDispatchMessage( const MSG *msg );
707 NTSTATUS WINAPI NtUserDisplayConfigGetDeviceInfo( DISPLAYCONFIG_DEVICE_INFO_HEADER *packet );
708 BOOL WINAPI NtUserDragDetect( HWND hwnd, int x, int y );
709 DWORD WINAPI NtUserDragObject( HWND parent, HWND hwnd, UINT fmt, ULONG_PTR data, HCURSOR cursor );
710 BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT font,
711 HICON icon, const WCHAR *str, UINT flags );
712 BOOL WINAPI NtUserDrawIconEx( HDC hdc, INT x0, INT y0, HICON icon, INT width,
713 INT height, UINT istep, HBRUSH hbr, UINT flags );
714 DWORD WINAPI NtUserDrawMenuBarTemp( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font );
715 BOOL WINAPI NtUserEmptyClipboard(void);
716 BOOL WINAPI NtUserEnableMenuItem( HMENU handle, UINT id, UINT flags );
717 BOOL WINAPI NtUserEnableMouseInPointer( BOOL );
718 BOOL WINAPI NtUserEnableScrollBar( HWND hwnd, UINT bar, UINT flags );
719 BOOL WINAPI NtUserEndDeferWindowPosEx( HDWP hdwp, BOOL async );
720 BOOL WINAPI NtUserEndMenu(void);
721 BOOL WINAPI NtUserEndPaint( HWND hwnd, const PAINTSTRUCT *ps );
722 NTSTATUS WINAPI NtUserEnumDisplayDevices( UNICODE_STRING *device, DWORD index,
723 DISPLAY_DEVICEW *info, DWORD flags );
724 BOOL WINAPI NtUserEnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC proc, LPARAM lp );
725 BOOL WINAPI NtUserEnumDisplaySettings( UNICODE_STRING *device, DWORD mode,
726 DEVMODEW *dev_mode, DWORD flags );
727 INT WINAPI NtUserExcludeUpdateRgn( HDC hdc, HWND hwnd );
728 HICON WINAPI NtUserFindExistingCursorIcon( UNICODE_STRING *module, UNICODE_STRING *res_name,
729 void *desc );
730 HWND WINAPI NtUserFindWindowEx( HWND parent, HWND child, UNICODE_STRING *class,
731 UNICODE_STRING *title, ULONG unk );
732 BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info );
733 HWND WINAPI NtUserGetAncestor( HWND hwnd, UINT type );
734 SHORT WINAPI NtUserGetAsyncKeyState( INT key );
735 ULONG WINAPI NtUserGetAtomName( ATOM atom, UNICODE_STRING *name );
736 UINT WINAPI NtUserGetCaretBlinkTime(void);
737 BOOL WINAPI NtUserGetCaretPos( POINT *point );
738 ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc,
739 struct client_menu_name *menu_name, BOOL ansi );
740 INT WINAPI NtUserGetClassName( HWND hwnd, BOOL real, UNICODE_STRING *name );
741 HANDLE WINAPI NtUserGetClipboardData( UINT format, struct get_clipboard_params *params );
742 INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT maxlen );
743 HWND WINAPI NtUserGetClipboardOwner(void);
744 DWORD WINAPI NtUserGetClipboardSequenceNumber(void);
745 HWND WINAPI NtUserGetClipboardViewer(void);
746 HCURSOR WINAPI NtUserGetCursor(void);
747 HCURSOR WINAPI NtUserGetCursorFrameInfo( HCURSOR hCursor, DWORD istep, DWORD *rate_jiffies,
748 DWORD *num_steps );
749 BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info );
750 HDC WINAPI NtUserGetDC( HWND hwnd );
751 HDC WINAPI NtUserGetDCEx( HWND hwnd, HRGN clip_rgn, DWORD flags );
752 LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info,
753 UINT32 *num_mode_info );
754 UINT WINAPI NtUserGetDoubleClickTime(void);
755 BOOL WINAPI NtUserGetDpiForMonitor( HMONITOR monitor, UINT type, UINT *x, UINT *y );
756 HWND WINAPI NtUserGetForegroundWindow(void);
757 BOOL WINAPI NtUserGetGUIThreadInfo( DWORD id, GUITHREADINFO *info );
758 BOOL WINAPI NtUserGetIconInfo( HICON icon, ICONINFO *info, UNICODE_STRING *module,
759 UNICODE_STRING *res_name, DWORD *bpp, LONG unk );
760 BOOL WINAPI NtUserGetIconSize( HICON handle, UINT step, LONG *width, LONG *height );
761 UINT WINAPI NtUserGetInternalWindowPos( HWND hwnd, RECT *rect, POINT *pt );
762 INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size );
763 SHORT WINAPI NtUserGetKeyState( INT vkey );
764 HKL WINAPI NtUserGetKeyboardLayout( DWORD thread_id );
765 UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts );
766 BOOL WINAPI NtUserGetKeyboardLayoutName( WCHAR *name );
767 BOOL WINAPI NtUserGetKeyboardState( BYTE *state );
768 BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags );
769 BOOL WINAPI NtUserGetMenuBarInfo( HWND hwnd, LONG id, LONG item, MENUBARINFO *info );
770 BOOL WINAPI NtUserGetMenuItemRect( HWND hwnd, HMENU menu, UINT item, RECT *rect );
771 BOOL WINAPI NtUserGetMessage( MSG *msg, HWND hwnd, UINT first, UINT last );
772 int WINAPI NtUserGetMouseMovePointsEx( UINT size, MOUSEMOVEPOINT *ptin, MOUSEMOVEPOINT *ptout,
773 int count, DWORD resolution );
774 BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
775 DWORD len, DWORD *needed );
776 HWND WINAPI NtUserGetOpenClipboardWindow(void);
777 BOOL WINAPI NtUserGetPointerInfoList( UINT32 id, POINTER_INPUT_TYPE type, UINT_PTR, UINT_PTR, SIZE_T size,
778 UINT32 *entry_count, UINT32 *pointer_count, void *pointer_info );
779 INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count );
780 HWINSTA WINAPI NtUserGetProcessWindowStation(void);
781 HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str );
782 ULONG WINAPI NtUserGetProcessDpiAwarenessContext( HANDLE process );
783 DWORD WINAPI NtUserGetQueueStatus( UINT flags );
784 UINT WINAPI NtUserGetRawInputBuffer( RAWINPUT *data, UINT *data_size, UINT header_size );
785 UINT WINAPI NtUserGetRawInputData( HRAWINPUT rawinput, UINT command, void *data, UINT *data_size, UINT header_size );
786 UINT WINAPI NtUserGetRawInputDeviceInfo( HANDLE handle, UINT command, void *data, UINT *data_size );
787 UINT WINAPI NtUserGetRawInputDeviceList( RAWINPUTDEVICELIST *devices, UINT *device_count, UINT size );
788 UINT WINAPI NtUserGetRegisteredRawInputDevices( RAWINPUTDEVICE *devices, UINT *device_count, UINT size );
789 BOOL WINAPI NtUserGetScrollBarInfo( HWND hwnd, LONG id, SCROLLBARINFO *info );
790 ULONG WINAPI NtUserGetSystemDpiForProcess( HANDLE process );
791 HMENU WINAPI NtUserGetSystemMenu( HWND hwnd, BOOL revert );
792 HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
793 BOOL WINAPI NtUserGetTitleBarInfo( HWND hwnd, TITLEBARINFO *info );
794 INT WINAPI NtUserGetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase );
795 BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
796 BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase );
797 HDC WINAPI NtUserGetWindowDC( HWND hwnd );
798 BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement );
799 int WINAPI NtUserGetWindowRgnEx( HWND hwnd, HRGN hrgn, UINT unk );
800 BOOL WINAPI NtUserHideCaret( HWND hwnd );
801 BOOL WINAPI NtUserHiliteMenuItem( HWND hwnd, HMENU handle, UINT item, UINT hilite );
802 NTSTATUS WINAPI NtUserInitializeClientPfnArrays( const struct user_client_procs *client_procsA,
803 const struct user_client_procs *client_procsW,
804 const void *client_workers, HINSTANCE user_module );
805 HICON WINAPI NtUserInternalGetWindowIcon( HWND hwnd, UINT type );
806 INT WINAPI NtUserInternalGetWindowText( HWND hwnd, WCHAR *text, INT count );
807 BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format );
808 BOOL WINAPI NtUserIsMouseInPointerEnabled(void);
809 BOOL WINAPI NtUserInvalidateRect( HWND hwnd, const RECT *rect, BOOL erase );
810 BOOL WINAPI NtUserInvalidateRgn( HWND hwnd, HRGN hrgn, BOOL erase );
811 BOOL WINAPI NtUserKillTimer( HWND hwnd, UINT_PTR id );
812 BOOL WINAPI NtUserLockWindowUpdate( HWND hwnd );
813 BOOL WINAPI NtUserLogicalToPerMonitorDPIPhysicalPoint( HWND hwnd, POINT *pt );
814 UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout );
815 INT WINAPI NtUserMenuItemFromPoint( HWND hwnd, HMENU handle, int x, int y );
816 LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
817 void *result_info, DWORD type, BOOL ansi );
818 BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint );
819 DWORD WINAPI NtUserMsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
820 DWORD timeout, DWORD mask, DWORD flags );
821 void WINAPI NtUserNotifyWinEvent( DWORD event, HWND hwnd, LONG object_id, LONG child_id );
822 HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK access );
823 BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk );
824 HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access );
825 HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access );
826 BOOL WINAPI NtUserPeekMessage( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT flags );
827 BOOL WINAPI NtUserPerMonitorDPIPhysicalToLogicalPoint( HWND hwnd, POINT *pt );
828 BOOL WINAPI NtUserPostMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam );
829 BOOL WINAPI NtUserPostThreadMessage( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam );
830 BOOL WINAPI NtUserPrintWindow( HWND hwnd, HDC hdc, UINT flags );
831 UINT_PTR WINAPI NtUserQueryInputContext( HIMC handle, UINT attr );
832 HWND WINAPI NtUserRealChildWindowFromPoint( HWND parent, LONG x, LONG y );
833 BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags );
834 ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version,
835 struct client_menu_name *client_menu_name, DWORD fnid, DWORD flags,
836 DWORD *wow );
837 BOOL WINAPI NtUserRegisterHotKey( HWND hwnd, INT id, UINT modifiers, UINT vk );
838 BOOL WINAPI NtUserRegisterRawInputDevices( const RAWINPUTDEVICE *devices, UINT device_count, UINT size );
839 INT WINAPI NtUserReleaseDC( HWND hwnd, HDC hdc );
840 BOOL WINAPI NtUserRemoveClipboardFormatListener( HWND hwnd );
841 BOOL WINAPI NtUserRemoveMenu( HMENU menu, UINT id, UINT flags );
842 HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str );
843 BOOL WINAPI NtUserScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
844 HRGN ret_update_rgn, RECT *update_rect );
845 INT WINAPI NtUserScrollWindowEx( HWND hwnd, INT dx, INT dy, const RECT *rect,
846 const RECT *clip_rect, HRGN update_rgn,
847 RECT *update_rect, UINT flags ) DECLSPEC_HIDDEN;
848 HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE palette, WORD force_background );
849 UINT WINAPI NtUserSendInput( UINT count, INPUT *inputs, int size );
850 HWND WINAPI NtUserSetActiveWindow( HWND hwnd );
851 HWND WINAPI NtUserSetCapture( HWND hwnd );
852 DWORD WINAPI NtUserSetClassLong( HWND hwnd, INT offset, LONG newval, BOOL ansi );
853 ULONG_PTR WINAPI NtUserSetClassLongPtr( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi );
854 WORD WINAPI NtUserSetClassWord( HWND hwnd, INT offset, WORD newval );
855 NTSTATUS WINAPI NtUserSetClipboardData( UINT format, HANDLE handle, struct set_clipboard_params *params );
856 HWND WINAPI NtUserSetClipboardViewer( HWND hwnd );
857 HCURSOR WINAPI NtUserSetCursor( HCURSOR cursor );
858 BOOL WINAPI NtUserSetCursorIconData( HCURSOR cursor, UNICODE_STRING *module, UNICODE_STRING *res_name,
859 struct cursoricon_desc *desc );
860 BOOL WINAPI NtUserSetCursorPos( INT x, INT y );
861 HWND WINAPI NtUserSetFocus( HWND hwnd );
862 void WINAPI NtUserSetInternalWindowPos( HWND hwnd, UINT cmd, RECT *rect, POINT *pt );
863 BOOL WINAPI NtUserSetKeyboardState( BYTE *state );
864 BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags );
865 BOOL WINAPI NtUserSetMenu( HWND hwnd, HMENU menu );
866 BOOL WINAPI NtUserSetMenuContextHelpId( HMENU handle, DWORD id );
867 BOOL WINAPI NtUserSetMenuDefaultItem( HMENU handle, UINT item, UINT bypos );
868 BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
869 HWND WINAPI NtUserSetParent( HWND hwnd, HWND parent );
870 BOOL WINAPI NtUserSetProcessDpiAwarenessContext( ULONG awareness, ULONG unknown );
871 BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
872 BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle );
873 INT WINAPI NtUserSetScrollInfo( HWND hwnd, INT bar, const SCROLLINFO *info, BOOL redraw );
874 BOOL WINAPI NtUserSetShellWindowEx( HWND shell, HWND list_view );
875 BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *values );
876 BOOL WINAPI NtUserSetSystemMenu( HWND hwnd, HMENU menu );
877 UINT_PTR WINAPI NtUserSetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout );
878 BOOL WINAPI NtUserSetThreadDesktop( HDESK handle );
879 UINT_PTR WINAPI NtUserSetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc, ULONG tolerance );
880 LONG WINAPI NtUserSetWindowLong( HWND hwnd, INT offset, LONG newval, BOOL ansi );
881 LONG_PTR WINAPI NtUserSetWindowLongPtr( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi );
882 BOOL WINAPI NtUserSetWindowPlacement( HWND hwnd, const WINDOWPLACEMENT *wpl );
883 BOOL WINAPI NtUserSetWindowPos( HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags );
884 int WINAPI NtUserSetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw );
885 WORD WINAPI NtUserSetWindowWord( HWND hwnd, INT offset, WORD newval );
886 HHOOK WINAPI NtUserSetWindowsHookEx( HINSTANCE inst, UNICODE_STRING *module, DWORD tid, INT id,
887 HOOKPROC proc, BOOL ansi );
888 HWINEVENTHOOK WINAPI NtUserSetWinEventHook( DWORD event_min, DWORD event_max, HMODULE inst,
889 UNICODE_STRING *module, WINEVENTPROC proc,
890 DWORD pid, DWORD tid, DWORD flags );
891 BOOL WINAPI NtUserShowCaret( HWND hwnd );
892 INT WINAPI NtUserShowCursor( BOOL show );
893 BOOL WINAPI NtUserShowScrollBar( HWND hwnd, INT bar, BOOL show );
894 BOOL WINAPI NtUserShowWindow( HWND hwnd, INT cmd );
895 BOOL WINAPI NtUserShowWindowAsync( HWND hwnd, INT cmd );
896 BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, void *ptr, UINT winini );
897 BOOL WINAPI NtUserSystemParametersInfoForDpi( UINT action, UINT val, PVOID ptr, UINT winini, UINT dpi );
898 BOOL WINAPI NtUserThunkedMenuInfo( HMENU menu, const MENUINFO *info );
899 UINT WINAPI NtUserThunkedMenuItemInfo( HMENU menu, UINT pos, UINT flags, UINT method,
900 MENUITEMINFOW *info, UNICODE_STRING *str );
901 INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
902 WCHAR *str, int size, UINT flags, HKL layout );
903 BOOL WINAPI NtUserTrackMouseEvent( TRACKMOUSEEVENT *info );
904 BOOL WINAPI NtUserTrackPopupMenuEx( HMENU handle, UINT flags, INT x, INT y, HWND hwnd, TPMPARAMS *params );
905 INT WINAPI NtUserTranslateAccelerator( HWND hwnd, HACCEL accel, MSG *msg );
906 BOOL WINAPI NtUserTranslateMessage( const MSG *msg, UINT flags );
907 BOOL WINAPI NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook );
908 BOOL WINAPI NtUserUnhookWindowsHookEx( HHOOK handle );
909 BOOL WINAPI NtUserUnregisterClass( UNICODE_STRING *name, HINSTANCE instance,
910 struct client_menu_name *client_menu_name );
911 BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id );
912 BOOL WINAPI NtUserUpdateInputContext( HIMC handle, UINT attr, UINT_PTR value );
913 BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *pts_dst, const SIZE *size,
914 HDC hdc_src, const POINT *pts_src, COLORREF key,
915 const BLENDFUNCTION *blend, DWORD flags, const RECT *dirty );
916 BOOL WINAPI NtUserValidateRect( HWND hwnd, const RECT *rect );
917 WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout );
918 DWORD WINAPI NtUserWaitForInputIdle( HANDLE process, DWORD timeout, BOOL wow );
919 BOOL WINAPI NtUserWaitMessage(void);
920 HWND WINAPI NtUserWindowFromDC( HDC hdc );
921 HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y );
923 /* NtUserCallNoParam codes, not compatible with Windows */
924 enum
926 NtUserCallNoParam_DestroyCaret,
927 NtUserCallNoParam_GetDesktopWindow,
928 NtUserCallNoParam_GetDialogBaseUnits,
929 NtUserCallNoParam_GetInputState,
930 NtUserCallNoParam_GetProcessDefaultLayout,
931 NtUserCallNoParam_GetProgmanWindow,
932 NtUserCallNoParam_GetShellWindow,
933 NtUserCallNoParam_GetTaskmanWindow,
934 NtUserCallNoParam_ReleaseCapture,
935 /* temporary exports */
936 NtUserExitingThread,
937 NtUserThreadDetach,
940 static inline BOOL NtUserDestroyCaret(void)
942 return NtUserCallNoParam( NtUserCallNoParam_DestroyCaret );
945 static inline HWND NtUserGetDesktopWindow(void)
947 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetDesktopWindow ));
950 static inline DWORD NtUserGetDialogBaseUnits(void)
952 return NtUserCallNoParam( NtUserCallNoParam_GetDialogBaseUnits );
955 static inline BOOL NtUserGetInputState(void)
957 return NtUserCallNoParam( NtUserCallNoParam_GetInputState );
960 static inline DWORD NtUserGetProcessDefaultLayout(void)
962 return NtUserCallNoParam( NtUserCallNoParam_GetProcessDefaultLayout );
965 static inline HWND NtUserGetProgmanWindow(void)
967 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetProgmanWindow ));
970 static inline HWND NtUserGetShellWindow(void)
972 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetShellWindow ));
975 static inline HWND NtUserGetTaskmanWindow(void)
977 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetTaskmanWindow ));
980 static inline BOOL NtUserReleaseCapture(void)
982 return NtUserCallNoParam( NtUserCallNoParam_ReleaseCapture );
985 /* NtUserCallOneParam codes, not compatible with Windows */
986 enum
988 NtUserCallOneParam_BeginDeferWindowPos,
989 NtUserCallOneParam_CreateCursorIcon,
990 NtUserCallOneParam_CreateMenu,
991 NtUserCallOneParam_EnableDC,
992 NtUserCallOneParam_EnableThunkLock,
993 NtUserCallOneParam_EnumClipboardFormats,
994 NtUserCallOneParam_GetClipCursor,
995 NtUserCallOneParam_GetCursorPos,
996 NtUserCallOneParam_GetIconParam,
997 NtUserCallOneParam_GetMenuItemCount,
998 NtUserCallOneParam_GetPrimaryMonitorRect,
999 NtUserCallOneParam_GetSysColor,
1000 NtUserCallOneParam_GetSysColorBrush,
1001 NtUserCallOneParam_GetSysColorPen,
1002 NtUserCallOneParam_GetSystemMetrics,
1003 NtUserCallOneParam_GetVirtualScreenRect,
1004 NtUserCallOneParam_IsWindowRectFullScreen,
1005 NtUserCallOneParam_MessageBeep,
1006 NtUserCallOneParam_RealizePalette,
1007 NtUserCallOneParam_ReplyMessage,
1008 NtUserCallOneParam_SetCaretBlinkTime,
1009 NtUserCallOneParam_SetProcessDefaultLayout,
1010 /* temporary exports */
1011 NtUserGetDeskPattern,
1014 static inline HDWP NtUserBeginDeferWindowPos( INT count )
1016 return UlongToHandle( NtUserCallOneParam( count, NtUserCallOneParam_BeginDeferWindowPos ));
1019 static inline HICON NtUserCreateCursorIcon( BOOL is_icon )
1021 return UlongToHandle( NtUserCallOneParam( is_icon, NtUserCallOneParam_CreateCursorIcon ));
1024 static inline HMENU NtUserCreateMenu( BOOL is_popup )
1026 return UlongToHandle( NtUserCallOneParam( is_popup, NtUserCallOneParam_CreateMenu ));
1029 static inline WORD NtUserEnableDC( HDC hdc )
1031 return NtUserCallOneParam( HandleToUlong(hdc), NtUserCallOneParam_EnableDC );
1034 static inline void NtUserEnableThunkLock( BOOL enable )
1036 NtUserCallOneParam( enable, NtUserCallOneParam_EnableThunkLock );
1039 static inline UINT NtUserEnumClipboardFormats( UINT format )
1041 return NtUserCallOneParam( format, NtUserCallOneParam_EnumClipboardFormats );
1044 static inline BOOL NtUserGetClipCursor( RECT *rect )
1046 return NtUserCallOneParam( (UINT_PTR)rect, NtUserCallOneParam_GetClipCursor );
1049 static inline BOOL NtUserGetCursorPos( POINT *pt )
1051 return NtUserCallOneParam( (UINT_PTR)pt, NtUserCallOneParam_GetCursorPos );
1054 static inline UINT_PTR NtUserGetIconParam( HICON icon )
1056 return NtUserCallOneParam( HandleToUlong(icon), NtUserCallOneParam_GetIconParam );
1059 static inline UINT_PTR NtUserGetMenuItemCount( HMENU menu )
1061 return NtUserCallOneParam( HandleToUlong(menu), NtUserCallOneParam_GetMenuItemCount );
1064 static inline RECT NtUserGetPrimaryMonitorRect(void)
1066 RECT primary;
1067 NtUserCallOneParam( (UINT_PTR)&primary, NtUserCallOneParam_GetPrimaryMonitorRect );
1068 return primary;
1071 static inline BOOL NtUserSetCaretBlinkTime( unsigned int time )
1073 return NtUserCallOneParam( time, NtUserCallOneParam_SetCaretBlinkTime );
1076 static inline COLORREF NtUserGetSysColor( INT index )
1078 return NtUserCallOneParam( index, NtUserCallOneParam_GetSysColor );
1081 static inline HBRUSH NtUserGetSysColorBrush( INT index )
1083 return UlongToHandle( NtUserCallOneParam( index, NtUserCallOneParam_GetSysColorBrush ));
1086 static inline HPEN NtUserGetSysColorPen( INT index )
1088 return UlongToHandle( NtUserCallOneParam( index, NtUserCallOneParam_GetSysColorPen ));
1091 static inline INT NtUserGetSystemMetrics( INT index )
1093 return NtUserCallOneParam( index, NtUserCallOneParam_GetSystemMetrics );
1096 static inline RECT NtUserGetVirtualScreenRect(void)
1098 RECT virtual;
1099 NtUserCallOneParam( (UINT_PTR)&virtual, NtUserCallOneParam_GetVirtualScreenRect );
1100 return virtual;
1103 static inline BOOL NtUserIsWindowRectFullScreen( const RECT *rect )
1105 return NtUserCallOneParam( (UINT_PTR)rect, NtUserCallOneParam_IsWindowRectFullScreen );
1108 static inline BOOL NtUserMessageBeep( UINT i )
1110 return NtUserCallOneParam( i, NtUserCallOneParam_MessageBeep );
1113 static inline UINT NtUserRealizePalette( HDC hdc )
1115 return NtUserCallOneParam( HandleToUlong(hdc), NtUserCallOneParam_RealizePalette );
1118 static inline BOOL NtUserReplyMessage( LRESULT result )
1120 return NtUserCallOneParam( result, NtUserCallOneParam_ReplyMessage );
1123 static inline UINT NtUserSetProcessDefaultLayout( DWORD layout )
1125 return NtUserCallOneParam( layout, NtUserCallOneParam_SetProcessDefaultLayout );
1128 /* NtUserCallTwoParam codes, not compatible with Windows */
1129 enum
1131 NtUserCallTwoParam_GetDialogProc,
1132 NtUserCallTwoParam_GetMenuInfo,
1133 NtUserCallTwoParam_GetMonitorInfo,
1134 NtUserCallTwoParam_GetSystemMetricsForDpi,
1135 NtUserCallTwoParam_MonitorFromRect,
1136 NtUserCallTwoParam_SetCaretPos,
1137 NtUserCallTwoParam_SetIconParam,
1138 NtUserCallTwoParam_UnhookWindowsHook,
1139 /* temporary exports */
1140 NtUserAllocWinProc,
1143 static inline DLGPROC NtUserGetDialogProc( DLGPROC proc, BOOL ansi )
1145 return (DLGPROC)NtUserCallTwoParam( (UINT_PTR)proc, ansi, NtUserCallTwoParam_GetDialogProc );
1148 static inline BOOL NtUserGetMenuInfo( HMENU menu, MENUINFO *info )
1150 return NtUserCallTwoParam( HandleToUlong(menu), (ULONG_PTR)info,
1151 NtUserCallTwoParam_GetMenuInfo );
1154 static inline BOOL NtUserGetMonitorInfo( HMONITOR monitor, MONITORINFO *info )
1156 return NtUserCallTwoParam( HandleToUlong(monitor), (ULONG_PTR)info,
1157 NtUserCallTwoParam_GetMonitorInfo );
1160 static inline INT NtUserGetSystemMetricsForDpi( INT index, UINT dpi )
1162 return NtUserCallTwoParam( index, dpi, NtUserCallTwoParam_GetSystemMetricsForDpi );
1165 static inline HMONITOR NtUserMonitorFromRect( const RECT *rect, DWORD flags )
1167 ULONG ret = NtUserCallTwoParam( (LONG_PTR)rect, flags, NtUserCallTwoParam_MonitorFromRect );
1168 return UlongToHandle( ret );
1171 static inline BOOL NtUserSetCaretPos( int x, int y )
1173 return NtUserCallTwoParam( x, y, NtUserCallTwoParam_SetCaretPos );
1176 static inline UINT_PTR NtUserSetIconParam( HICON icon, ULONG_PTR param )
1178 return NtUserCallTwoParam( HandleToUlong(icon), param, NtUserCallTwoParam_SetIconParam );
1181 static inline BOOL NtUserUnhookWindowsHook( INT id, HOOKPROC proc )
1183 return NtUserCallTwoParam( id, (UINT_PTR)proc, NtUserCallTwoParam_UnhookWindowsHook );
1186 /* NtUserCallHwnd codes, not compatible with Windows */
1187 enum
1189 NtUserCallHwnd_ActivateOtherWindow,
1190 NtUserCallHwnd_ArrangeIconicWindows,
1191 NtUserCallHwnd_DrawMenuBar,
1192 NtUserCallHwnd_GetDefaultImeWindow,
1193 NtUserCallHwnd_GetDialogInfo,
1194 NtUserCallHwnd_GetDpiForWindow,
1195 NtUserCallHwnd_GetMDIClientInfo,
1196 NtUserCallHwnd_GetParent,
1197 NtUserCallHwnd_GetWindowContextHelpId,
1198 NtUserCallHwnd_GetWindowDpiAwarenessContext,
1199 NtUserCallHwnd_GetWindowInputContext,
1200 NtUserCallHwnd_GetWindowSysSubMenu,
1201 NtUserCallHwnd_GetWindowTextLength,
1202 NtUserCallHwnd_IsWindow,
1203 NtUserCallHwnd_IsWindowEnabled,
1204 NtUserCallHwnd_IsWindowUnicode,
1205 NtUserCallHwnd_IsWindowVisible,
1206 NtUserCallHwnd_SetForegroundWindow,
1207 NtUserCallHwnd_SetProgmanWindow,
1208 NtUserCallHwnd_SetTaskmanWindow,
1209 /* temporary exports */
1210 NtUserGetFullWindowHandle,
1211 NtUserIsCurrehtProcessWindow,
1212 NtUserIsCurrehtThreadWindow,
1215 static inline void NtUserActivateOtherWindow( HWND hwnd )
1217 NtUserCallHwnd( hwnd, NtUserCallHwnd_ActivateOtherWindow );
1220 static inline UINT NtUserArrangeIconicWindows( HWND parent )
1222 return NtUserCallHwnd( parent, NtUserCallHwnd_ArrangeIconicWindows );
1225 static inline BOOL NtUserDrawMenuBar( HWND hwnd )
1227 return NtUserCallHwnd( hwnd, NtUserCallHwnd_DrawMenuBar );
1230 static inline DWORD NtUserGetWindowContextHelpId( HWND hwnd )
1232 return NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowContextHelpId );
1235 static inline HWND NtUserGetDefaultImeWindow( HWND hwnd )
1237 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetDefaultImeWindow ));
1240 static inline void *NtUserGetDialogInfo( HWND hwnd )
1242 return (void *)NtUserCallHwnd( hwnd, NtUserCallHwnd_GetDialogInfo );
1245 static inline UINT NtUserGetDpiForWindow( HWND hwnd )
1247 return NtUserCallHwnd( hwnd, NtUserCallHwnd_GetDpiForWindow );
1250 static inline void *NtUserGetMDIClientInfo( HWND hwnd )
1252 return (void *)NtUserCallHwnd( hwnd, NtUserCallHwnd_GetMDIClientInfo );
1255 static inline HWND NtUserGetParent( HWND hwnd )
1257 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetParent ));
1260 static inline DPI_AWARENESS_CONTEXT NtUserGetWindowDpiAwarenessContext( HWND hwnd )
1262 return (DPI_AWARENESS_CONTEXT)NtUserCallHwnd( hwnd,
1263 NtUserCallHwnd_GetWindowDpiAwarenessContext );
1266 static inline HIMC NtUserGetWindowInputContext( HWND hwnd )
1268 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowInputContext ));
1271 static inline HMENU NtUserGetWindowSysSubMenu( HWND hwnd )
1273 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowSysSubMenu ));
1276 static inline INT NtUserGetWindowTextLength( HWND hwnd )
1278 return NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowTextLength );
1281 static inline BOOL NtUserIsWindow( HWND hwnd )
1283 return NtUserCallHwnd( hwnd, NtUserCallHwnd_IsWindow );
1286 static inline BOOL NtUserIsWindowEnabled( HWND hwnd )
1288 return NtUserCallHwnd( hwnd, NtUserCallHwnd_IsWindowEnabled );
1291 static inline BOOL NtUserIsWindowUnicode( HWND hwnd )
1293 return NtUserCallHwnd( hwnd, NtUserCallHwnd_IsWindowUnicode );
1296 static inline BOOL NtUserIsWindowVisible( HWND hwnd )
1298 return NtUserCallHwnd( hwnd, NtUserCallHwnd_IsWindowVisible );
1301 static inline BOOL NtUserSetForegroundWindow( HWND hwnd )
1303 return NtUserCallHwnd( hwnd, NtUserCallHwnd_SetForegroundWindow );
1306 static inline HWND NtUserSetProgmanWindow( HWND hwnd )
1308 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_SetProgmanWindow ));
1311 static inline HWND NtUserSetTaskmanWindow( HWND hwnd )
1313 return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_SetTaskmanWindow ));
1316 /* NtUserCallHwndParam codes, not compatible with Windows */
1317 enum
1319 NtUserCallHwndParam_ClientToScreen,
1320 NtUserCallHwndParam_EnableWindow,
1321 NtUserCallHwndParam_GetChildRect,
1322 NtUserCallHwndParam_GetClassLongA,
1323 NtUserCallHwndParam_GetClassLongW,
1324 NtUserCallHwndParam_GetClassLongPtrA,
1325 NtUserCallHwndParam_GetClassLongPtrW,
1326 NtUserCallHwndParam_GetClassWord,
1327 NtUserCallHwndParam_GetClientRect,
1328 NtUserCallHwndParam_GetScrollInfo,
1329 NtUserCallHwndParam_GetWindowInfo,
1330 NtUserCallHwndParam_GetWindowLongA,
1331 NtUserCallHwndParam_GetWindowLongW,
1332 NtUserCallHwndParam_GetWindowLongPtrA,
1333 NtUserCallHwndParam_GetWindowLongPtrW,
1334 NtUserCallHwndParam_GetWindowRect,
1335 NtUserCallHwndParam_GetWindowRelative,
1336 NtUserCallHwndParam_GetWindowThread,
1337 NtUserCallHwndParam_GetWindowWord,
1338 NtUserCallHwndParam_IsChild,
1339 NtUserCallHwndParam_KillSystemTimer,
1340 NtUserCallHwndParam_MapWindowPoints,
1341 NtUserCallHwndParam_MirrorRgn,
1342 NtUserCallHwndParam_MonitorFromWindow,
1343 NtUserCallHwndParam_ScreenToClient,
1344 NtUserCallHwndParam_SetDialogInfo,
1345 NtUserCallHwndParam_SetMDIClientInfo,
1346 NtUserCallHwndParam_SetWindowContextHelpId,
1347 NtUserCallHwndParam_ShowOwnedPopups,
1348 /* temporary exports */
1349 NtUserSetWindowStyle,
1352 static inline BOOL NtUserClientToScreen( HWND hwnd, POINT *pt )
1354 return NtUserCallHwndParam( hwnd, (UINT_PTR)pt, NtUserCallHwndParam_ClientToScreen );
1357 static inline BOOL NtUserEnableWindow( HWND hwnd, BOOL enable )
1359 return NtUserCallHwndParam( hwnd, enable, NtUserCallHwndParam_EnableWindow );
1362 static inline BOOL NtUserGetChildRect( HWND hwnd, RECT *rect )
1364 return NtUserCallHwndParam( hwnd, (UINT_PTR)rect, NtUserCallHwndParam_GetChildRect );
1367 static inline DWORD NtUserGetClassLongA( HWND hwnd, INT offset )
1369 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetClassLongA );
1372 static inline ULONG_PTR NtUserGetClassLongPtrA( HWND hwnd, INT offset )
1374 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetClassLongPtrA );
1377 static inline ULONG_PTR NtUserGetClassLongPtrW( HWND hwnd, INT offset )
1379 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetClassLongPtrW );
1382 static inline DWORD NtUserGetClassLongW( HWND hwnd, INT offset )
1384 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetClassLongW );
1387 static inline WORD NtUserGetClassWord( HWND hwnd, INT offset )
1389 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetClassWord );
1392 static inline BOOL NtUserGetClientRect( HWND hwnd, RECT *rect )
1394 return NtUserCallHwndParam( hwnd, (UINT_PTR)rect, NtUserCallHwndParam_GetClientRect );
1397 struct get_scroll_info_params
1399 int bar;
1400 SCROLLINFO *info;
1403 static inline BOOL NtUserGetScrollInfo( HWND hwnd, INT bar, SCROLLINFO *info )
1405 struct get_scroll_info_params params = { .bar = bar, .info = info };
1406 return NtUserCallHwndParam( hwnd, (UINT_PTR)&params, NtUserCallHwndParam_GetScrollInfo );
1409 static inline BOOL NtUserGetWindowInfo( HWND hwnd, WINDOWINFO *info )
1411 return NtUserCallHwndParam( hwnd, (UINT_PTR)info, NtUserCallHwndParam_GetWindowInfo );
1414 static inline LONG NtUserGetWindowLongA( HWND hwnd, INT offset )
1416 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowLongA );
1419 static inline LONG_PTR NtUserGetWindowLongPtrA( HWND hwnd, INT offset )
1421 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowLongPtrA );
1424 static inline LONG_PTR NtUserGetWindowLongPtrW( HWND hwnd, INT offset )
1426 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowLongPtrW );
1429 static inline LONG NtUserGetWindowLongW( HWND hwnd, INT offset )
1431 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowLongW );
1434 static inline BOOL NtUserGetWindowRect( HWND hwnd, RECT *rect )
1436 return NtUserCallHwndParam( hwnd, (UINT_PTR)rect, NtUserCallHwndParam_GetWindowRect );
1439 static inline HWND NtUserGetWindowRelative( HWND hwnd, UINT rel )
1441 return UlongToHandle( NtUserCallHwndParam( hwnd, rel,
1442 NtUserCallHwndParam_GetWindowRelative ));
1445 static inline DWORD NtUserGetWindowThread( HWND hwnd, DWORD *process )
1447 return NtUserCallHwndParam( hwnd, (UINT_PTR)process, NtUserCallHwndParam_GetWindowThread );
1450 static inline WORD NtUserGetWindowWord( HWND hwnd, INT offset )
1452 return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowWord );
1455 static inline BOOL NtUserIsChild( HWND parent, HWND child )
1457 return NtUserCallHwndParam( parent, HandleToUlong(child), NtUserCallHwndParam_IsChild );
1460 static inline BOOL NtUserKillSystemTimer( HWND hwnd, UINT_PTR id )
1462 return NtUserCallHwndParam( hwnd, id, NtUserCallHwndParam_KillSystemTimer );
1465 struct map_window_points_params
1467 HWND hwnd_to;
1468 POINT *points;
1469 UINT count;
1472 static inline int NtUserMapWindowPoints( HWND hwnd_from, HWND hwnd_to, POINT *points, UINT count )
1474 struct map_window_points_params params;
1475 params.hwnd_to = hwnd_to;
1476 params.points = points;
1477 params.count = count;
1478 return NtUserCallHwndParam( hwnd_from, (UINT_PTR)&params,
1479 NtUserCallHwndParam_MapWindowPoints );
1482 static inline BOOL NtUserMirrorRgn( HWND hwnd, HRGN hrgn )
1484 return NtUserCallHwndParam( hwnd, HandleToUlong(hrgn), NtUserCallHwndParam_MirrorRgn );
1487 static inline HMONITOR NtUserMonitorFromWindow( HWND hwnd, DWORD flags )
1489 ULONG ret = NtUserCallHwndParam( hwnd, flags, NtUserCallHwndParam_MonitorFromWindow );
1490 return UlongToHandle( ret );
1493 static inline BOOL NtUserScreenToClient( HWND hwnd, POINT *pt )
1495 return NtUserCallHwndParam( hwnd, (UINT_PTR)pt, NtUserCallHwndParam_ScreenToClient );
1498 static inline void NtUserSetDialogInfo( HWND hwnd, void *info )
1500 NtUserCallHwndParam( hwnd, (UINT_PTR)info, NtUserCallHwndParam_SetDialogInfo );
1503 static inline void NtUserSetMDIClientInfo( HWND hwnd, void *info )
1505 NtUserCallHwndParam( hwnd, (UINT_PTR)info, NtUserCallHwndParam_SetMDIClientInfo );
1508 static inline BOOL NtUserSetWindowContextHelpId( HWND hwnd, DWORD id )
1510 return NtUserCallHwndParam( hwnd, id, NtUserCallHwndParam_SetWindowContextHelpId );
1513 static inline BOOL NtUserShowOwnedPopups( HWND hwnd, BOOL show )
1515 return NtUserCallHwndParam( hwnd, show, NtUserCallHwndParam_ShowOwnedPopups );
1518 #endif /* _NTUSER_ */