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
27 /* KernelCallbackTable codes, not compatible with Windows */
30 /* user32 callbacks */
31 NtUserCallEnumDisplayMonitor
,
32 NtUserCallSendAsyncCallback
,
33 NtUserCallWinEventHook
,
35 NtUserCallWindowsHook
,
37 NtUserDrawNonClientButton
,
40 NtUserFreeCachedClipboardData
,
42 NtUserImmTranslateMessage
,
43 NtUserInitBuiltinClasses
,
48 NtUserRenderSynthesizedFormat
,
49 NtUserUnpackDDEMessage
,
54 NtUserCallVulkanDebugReportCallback
,
55 NtUserCallVulkanDebugUtilsCallback
,
57 NtUserCallOpenGLDebugMessageCallback
,
58 /* Driver-specific callbacks */
59 NtUserDriverCallbackFirst
,
60 NtUserDriverCallbackLast
= NtUserDriverCallbackFirst
+ 9,
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)
85 if (NtCurrentTeb()->GdiBatchCount
)
87 TEB64
*teb64
= (TEB64
*)(UINT_PTR
)NtCurrentTeb()->GdiBatchCount
;
88 return (struct ntuser_thread_info
*)teb64
->Win32ClientInfo
;
91 return (struct ntuser_thread_info
*)NtCurrentTeb()->Win32ClientInfo
;
94 /* NtUserCallEnumDisplayMonitor params */
95 struct enum_display_monitor_params
104 /* NtUserCallSendAsyncCallback params */
105 struct send_async_params
107 SENDASYNCPROC callback
;
114 /* NtUserCallWinEventHook params */
115 struct win_event_hook_params
125 WCHAR module
[MAX_PATH
];
128 /* type of message-sending functions that need special WM_CHAR handling */
131 WMCHAR_MAP_POSTMESSAGE
,
132 WMCHAR_MAP_SENDMESSAGE
,
133 WMCHAR_MAP_SENDMESSAGETIMEOUT
,
134 WMCHAR_MAP_RECVMESSAGE
,
135 WMCHAR_MAP_DISPATCHMESSAGE
,
136 WMCHAR_MAP_CALLWINDOWPROC
,
138 WMCHAR_MAP_NOMAPPING
= WMCHAR_MAP_COUNT
141 /* NtUserCallWindowProc params */
142 struct win_proc_params
153 enum wm_char_mapping mapping
;
154 DPI_AWARENESS_CONTEXT dpi_awareness
;
159 /* NtUserCallWindowsHook params */
160 struct win_hook_params
175 /* NtUserCopyImage params */
176 struct copy_image_params
185 /* NtUserDrawText params */
186 struct draw_text_params
191 RECT
*ret_rect
; /* FIXME: Use NtCallbackReturn instead */
196 /* NtUserFreeCachedClipboardData params */
197 struct free_cached_data_params
203 /* NtUserImmProcessKey params */
204 struct imm_process_key_params
212 /* NtUserImmTranslateMessage params */
213 struct imm_translate_message_params
221 /* NtUserLoadImage params */
222 struct load_image_params
232 /* NtUserLoadSysMenu params */
233 struct load_sys_menu_params
238 /* NtUserPostDDEMessage params */
239 struct post_dde_message_params
249 /* NtUserRenderSynthesizedFormat params */
250 struct render_synthesized_format_params
256 /* NtUserUnpackDDEMessage params */
257 struct unpack_dde_message_result
263 struct unpack_dde_message_params
265 struct unpack_dde_message_result
*result
; /* FIXME: Use NtCallbackReturn instead */
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 */
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 */
313 NtUserSetMenuItemInfo
,
314 NtUserInsertMenuItem
,
315 /* Wine extensions */
316 NtUserCheckMenuRadioItem
,
317 NtUserGetMenuDefaultItem
,
319 NtUserGetMenuItemInfoA
,
320 NtUserGetMenuItemInfoW
,
325 struct send_message_timeout_params
332 struct send_message_callback_params
334 SENDASYNCPROC callback
;
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
;
363 WNDPROC pEditWndProc
;
364 WNDPROC pListBoxWndProc
;
365 WNDPROC pMDIClientWndProc
;
366 WNDPROC pScrollBarWndProc
;
367 WNDPROC pStaticWndProc
;
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) */
386 struct cursoricon_desc
392 struct cursoricon_frame
*frames
;
398 struct client_menu_name
402 UNICODE_STRING
*nameUS
;
405 /* NtUserGetClipboardData params, not compatible with Windows */
406 struct get_clipboard_params
415 /* NtUserSetClipboardData params, not compatible with Windows */
416 struct set_clipboard_params
424 /* NtUserNonClientButton params */
425 struct draw_non_client_button_params
429 enum NONCLIENT_BUTTON_TYPE type
;
435 /* NtUserDrawScrollBar params */
436 struct draw_scroll_bar_params
442 struct SCROLL_TRACKING_INFO tracking_info
;
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
468 /* internal messages codes */
469 enum wine_internal_message
471 WM_WINE_DESTROYWINDOW
= 0x80000000,
472 WM_WINE_SETWINDOWPOS
,
475 WM_WINE_SETWINDOWLONG
,
477 WM_WINE_SETACTIVEWINDOW
,
478 WM_WINE_KEYBOARD_LL_HOOK
,
479 WM_WINE_MOUSE_LL_HOOK
,
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
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
;
525 struct packed_DRAWITEMSTRUCT
540 struct packed_MEASUREITEMSTRUCT
550 struct packed_DELETEITEMSTRUCT
560 struct packed_COMPAREITEMSTRUCT
574 struct packed_WINDOWPOS
578 UINT hwndInsertAfter
;
588 struct packed_COPYDATASTRUCT
595 struct packed_HELPINFO
602 ULONGLONG dwContextId
;
606 struct packed_NCCALCSIZE_PARAMS
612 UINT hwndInsertAfter
;
634 struct packed_MDINEXTMENU
644 struct packed_MDICREATESTRUCTW
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
,
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
,
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
,
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
,
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 */
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 */
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 */
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)
1067 NtUserCallOneParam( (UINT_PTR
)&primary
, NtUserCallOneParam_GetPrimaryMonitorRect
);
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)
1099 NtUserCallOneParam( (UINT_PTR
)&virtual, NtUserCallOneParam_GetVirtualScreenRect
);
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 */
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 */
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 */
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 */
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
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
)¶ms
, 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
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
)¶ms
,
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_ */