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
,
39 NtUserFreeCachedClipboardData
,
41 NtUserImmTranslateMessage
,
42 NtUserInitBuiltinClasses
,
47 NtUserRenderSynthesizedFormat
,
48 NtUserUnpackDDEMessage
,
53 NtUserCallVulkanDebugReportCallback
,
54 NtUserCallVulkanDebugUtilsCallback
,
55 /* Driver-specific callbacks */
56 NtUserDriverCallbackFirst
,
57 NtUserDriverCallbackLast
= NtUserDriverCallbackFirst
+ 10,
61 /* TEB thread info, not compatible with Windows */
62 struct ntuser_thread_info
64 UINT64 driver_data
; /* driver-specific data */
65 DWORD message_time
; /* value for GetMessageTime */
66 DWORD message_pos
; /* value for GetMessagePos */
67 UINT64 message_extra
; /* value for GetMessageExtraInfo */
68 INPUT_MESSAGE_SOURCE msg_source
; /* Message source for current message */
69 WORD recursion_count
; /* SendMessage recursion counter */
70 UINT receive_flags
; /* currently received message flags */
71 UINT top_window
; /* desktop window */
72 UINT msg_window
; /* HWND_MESSAGE parent window */
73 DPI_AWARENESS dpi_awareness
; /* DPI awareness */
74 UINT default_imc
; /* default input context */
75 UINT64 client_imm
; /* client IMM thread info */
76 UINT64 wmchar_data
; /* client data for WM_CHAR mappings */
79 static inline struct ntuser_thread_info
*NtUserGetThreadInfo(void)
82 if (NtCurrentTeb()->GdiBatchCount
)
84 TEB64
*teb64
= (TEB64
*)(UINT_PTR
)NtCurrentTeb()->GdiBatchCount
;
85 return (struct ntuser_thread_info
*)teb64
->Win32ClientInfo
;
88 return (struct ntuser_thread_info
*)NtCurrentTeb()->Win32ClientInfo
;
91 /* NtUserCallEnumDisplayMonitor params */
92 struct enum_display_monitor_params
101 /* NtUserCallSendAsyncCallback params */
102 struct send_async_params
104 SENDASYNCPROC callback
;
111 /* NtUserCallWinEventHook params */
112 struct win_event_hook_params
122 WCHAR module
[MAX_PATH
];
125 /* type of message-sending functions that need special WM_CHAR handling */
128 WMCHAR_MAP_POSTMESSAGE
,
129 WMCHAR_MAP_SENDMESSAGE
,
130 WMCHAR_MAP_SENDMESSAGETIMEOUT
,
131 WMCHAR_MAP_RECVMESSAGE
,
132 WMCHAR_MAP_DISPATCHMESSAGE
,
133 WMCHAR_MAP_CALLWINDOWPROC
,
135 WMCHAR_MAP_NOMAPPING
= WMCHAR_MAP_COUNT
138 /* NtUserCallWindowProc params */
139 struct win_proc_params
151 enum wm_char_mapping mapping
;
152 DPI_AWARENESS_CONTEXT dpi_awareness
;
157 /* NtUserCallWindowsHook params */
158 struct win_hook_params
170 WCHAR module
[MAX_PATH
];
173 /* NtUserCopyImage params */
174 struct copy_image_params
183 /* NtUserDrawText params */
184 struct draw_text_params
188 RECT
*rect
; /* FIXME: Use NtCallbackReturn instead */
193 /* NtUserFreeCachedClipboardData params */
194 struct free_cached_data_params
200 /* NtUserImmProcessKey params */
201 struct imm_process_key_params
209 /* NtUserImmTranslateMessage params */
210 struct imm_translate_message_params
218 /* NtUserLoadImage params */
219 struct load_image_params
229 /* NtUserLoadSysMenu params */
230 struct load_sys_menu_params
235 /* NtUserPostDDEMessage params */
236 struct post_dde_message_params
246 /* NtUserRenderSynthesizedFormat params */
247 struct render_synthesized_format_params
253 /* NtUserUnpackDDEMessage params */
254 struct unpack_dde_message_result
260 struct unpack_dde_message_params
262 struct unpack_dde_message_result
*result
; /* FIXME: Use NtCallbackReturn instead */
270 /* process DPI awareness contexts */
271 #define NTUSER_DPI_UNAWARE 0x00006010
272 #define NTUSER_DPI_SYSTEM_AWARE 0x00006011
273 #define NTUSER_DPI_PER_MONITOR_AWARE 0x00000012
274 #define NTUSER_DPI_PER_MONITOR_AWARE_V2 0x00000022
275 #define NTUSER_DPI_PER_UNAWARE_GDISCALED 0x40006010
277 /* message spy definitions */
278 #define SPY_DISPATCHMESSAGE 0x0100
279 #define SPY_SENDMESSAGE 0x0101
280 #define SPY_DEFWNDPROC 0x0102
282 #define SPY_RESULT_OK 0x0001
283 #define SPY_RESULT_DEFWND 0x0002
285 /* NtUserMessageCall codes */
288 NtUserScrollBarWndProc
= 0x029a,
289 NtUserPopupMenuWndProc
= 0x029c,
290 NtUserDesktopWindowProc
= 0x029d,
291 NtUserDefWindowProc
= 0x029e,
292 NtUserCallWindowProc
= 0x02ab,
293 NtUserSendMessage
= 0x02b1,
294 NtUserSendMessageTimeout
= 0x02b3,
295 NtUserSendNotifyMessage
= 0x02b7,
296 NtUserSendMessageCallback
= 0x02b8,
297 /* Wine-specific exports */
298 NtUserClipboardWindowProc
= 0x0300,
299 NtUserGetDispatchParams
= 0x3001,
300 NtUserSpyEnter
= 0x0302,
301 NtUserSpyExit
= 0x0303,
304 /* NtUserThunkedMenuItemInfo codes */
307 NtUserSetMenuItemInfo
,
308 NtUserInsertMenuItem
,
309 /* Wine extensions */
310 NtUserCheckMenuRadioItem
,
311 NtUserGetMenuDefaultItem
,
313 NtUserGetMenuItemInfoA
,
314 NtUserGetMenuItemInfoW
,
319 struct send_message_timeout_params
326 struct send_message_callback_params
328 SENDASYNCPROC callback
;
332 /* color index used to retrieve system 55aa brush */
333 #define COLOR_55AA_BRUSH 0x100
335 /* user object types */
336 #define NTUSER_OBJ_WINDOW 0x01
337 #define NTUSER_OBJ_MENU 0x02
338 #define NTUSER_OBJ_ICON 0x03
339 #define NTUSER_OBJ_WINPOS 0x04
340 #define NTUSER_OBJ_ACCEL 0x08
341 #define NTUSER_OBJ_HOOK 0x0f
342 #define NTUSER_OBJ_IMC 0x11
344 /* NtUserScrollWindowEx flag */
345 #define SW_NODCCACHE 0x8000
347 /* NtUserSetScrollInfo flag */
348 #define SIF_RETURNPREV 0x1000
350 /* NtUserInitializeClientPfnArrays parameter, not compatible with Windows */
351 struct user_client_procs
353 WNDPROC pButtonWndProc
;
354 WNDPROC pComboWndProc
;
355 WNDPROC pDefWindowProc
;
357 WNDPROC pEditWndProc
;
358 WNDPROC pListBoxWndProc
;
359 WNDPROC pMDIClientWndProc
;
360 WNDPROC pScrollBarWndProc
;
361 WNDPROC pStaticWndProc
;
363 WNDPROC pDesktopWndProc
;
364 WNDPROC pIconTitleWndProc
;
365 WNDPROC pPopupMenuWndProc
;
366 WNDPROC pMessageWndProc
;
369 /* NtUserSetCursorIconData parameter, not compatible with Windows */
370 struct cursoricon_frame
372 UINT width
; /* frame-specific width */
373 UINT height
; /* frame-specific height */
374 HBITMAP color
; /* color bitmap */
375 HBITMAP alpha
; /* pre-multiplied alpha bitmap for 32-bpp icons */
376 HBITMAP mask
; /* mask bitmap (followed by color for 1-bpp icons) */
380 struct cursoricon_desc
386 struct cursoricon_frame
*frames
;
392 struct client_menu_name
396 UNICODE_STRING
*nameUS
;
399 /* NtUserGetClipboardData params, not compatible with Windows */
400 struct get_clipboard_params
409 /* NtUserSetClipboardData params, not compatible with Windows */
410 struct set_clipboard_params
418 /* NtUserDrawScrollBar params */
419 struct draw_scroll_bar_params
425 struct SCROLL_TRACKING_INFO tracking_info
;
436 /* NtUserUpdateInputContext param, not compatible with Window */
437 enum input_context_attr
439 NtUserInputContextClientPtr
,
440 NtUserInputContextThreadId
,
443 /* NtUserAssociateInputContext result */
444 enum associate_input_context_result
451 /* internal messages codes */
452 enum wine_internal_message
454 WM_WINE_DESTROYWINDOW
= 0x80000000,
455 WM_WINE_SETWINDOWPOS
,
458 WM_WINE_SETWINDOWLONG
,
460 WM_WINE_SETACTIVEWINDOW
,
461 WM_WINE_KEYBOARD_LL_HOOK
,
462 WM_WINE_MOUSE_LL_HOOK
,
464 WM_WINE_UPDATEWINDOWSTATE
,
465 WM_WINE_FIRST_DRIVER_MSG
= 0x80001000, /* range of messages reserved for the USER driver */
466 WM_WINE_LAST_DRIVER_MSG
= 0x80001fff
469 /* internal IME message */
470 #define WM_IME_INTERNAL 0x287
471 #define IME_INTERNAL_ACTIVATE 0x17
472 #define IME_INTERNAL_DEACTIVATE 0x18
474 #define WM_SYSTIMER 0x0118
476 /* the various structures that can be sent in messages, in platform-independent layout */
477 struct packed_CREATESTRUCTW
479 ULONGLONG lpCreateParams
;
496 struct packed_DRAWITEMSTRUCT
511 struct packed_MEASUREITEMSTRUCT
521 struct packed_DELETEITEMSTRUCT
531 struct packed_COMPAREITEMSTRUCT
545 struct packed_WINDOWPOS
549 UINT hwndInsertAfter
;
559 struct packed_COPYDATASTRUCT
566 struct packed_HELPINFO
573 ULONGLONG dwContextId
;
577 struct packed_NCCALCSIZE_PARAMS
583 UINT hwndInsertAfter
;
605 struct packed_MDINEXTMENU
615 struct packed_MDICREATESTRUCTW
629 HKL WINAPI
NtUserActivateKeyboardLayout( HKL layout
, UINT flags
);
630 BOOL WINAPI
NtUserAddClipboardFormatListener( HWND hwnd
);
631 UINT WINAPI
NtUserAssociateInputContext( HWND hwnd
, HIMC ctx
, ULONG flags
);
632 BOOL WINAPI
NtUserAttachThreadInput( DWORD from
, DWORD to
, BOOL attach
);
633 HDC WINAPI
NtUserBeginPaint( HWND hwnd
, PAINTSTRUCT
*ps
);
634 NTSTATUS WINAPI
NtUserBuildHwndList( HDESK desktop
, ULONG unk2
, ULONG unk3
, ULONG unk4
,
635 ULONG thread_id
, ULONG count
, HWND
*buffer
, ULONG
*size
);
636 ULONG_PTR WINAPI
NtUserCallHwnd( HWND hwnd
, DWORD code
);
637 ULONG_PTR WINAPI
NtUserCallHwndParam( HWND hwnd
, DWORD_PTR param
, DWORD code
);
638 LRESULT WINAPI
NtUserCallNextHookEx( HHOOK hhook
, INT code
, WPARAM wparam
, LPARAM lparam
);
639 BOOL WINAPI
NtUserCallMsgFilter( MSG
*msg
, INT code
);
640 ULONG_PTR WINAPI
NtUserCallNoParam( ULONG code
);
641 ULONG_PTR WINAPI
NtUserCallOneParam( ULONG_PTR arg
, ULONG code
);
642 ULONG_PTR WINAPI
NtUserCallTwoParam( ULONG_PTR arg1
, ULONG_PTR arg2
, ULONG code
);
643 BOOL WINAPI
NtUserChangeClipboardChain( HWND hwnd
, HWND next
);
644 LONG WINAPI
NtUserChangeDisplaySettings( UNICODE_STRING
*devname
, DEVMODEW
*devmode
, HWND hwnd
,
645 DWORD flags
, void *lparam
);
646 DWORD WINAPI
NtUserCheckMenuItem( HMENU handle
, UINT id
, UINT flags
);
647 HWND WINAPI
NtUserChildWindowFromPointEx( HWND parent
, LONG x
, LONG y
, UINT flags
);
648 BOOL WINAPI
NtUserClipCursor( const RECT
*rect
);
649 BOOL WINAPI
NtUserCloseClipboard(void);
650 BOOL WINAPI
NtUserCloseDesktop( HDESK handle
);
651 BOOL WINAPI
NtUserCloseWindowStation( HWINSTA handle
);
652 INT WINAPI
NtUserCopyAcceleratorTable( HACCEL src
, ACCEL
*dst
, INT count
);
653 INT WINAPI
NtUserCountClipboardFormats(void);
654 HACCEL WINAPI
NtUserCreateAcceleratorTable( ACCEL
*table
, INT count
);
655 BOOL WINAPI
NtUserCreateCaret( HWND hwnd
, HBITMAP bitmap
, int width
, int height
);
656 HDESK WINAPI
NtUserCreateDesktopEx( OBJECT_ATTRIBUTES
*attr
, UNICODE_STRING
*device
,
657 DEVMODEW
*devmode
, DWORD flags
, ACCESS_MASK access
,
659 HIMC WINAPI
NtUserCreateInputContext( UINT_PTR client_ptr
);
660 HWND WINAPI
NtUserCreateWindowEx( DWORD ex_style
, UNICODE_STRING
*class_name
,
661 UNICODE_STRING
*version
, UNICODE_STRING
*window_name
,
662 DWORD style
, INT x
, INT y
, INT cx
, INT cy
,
663 HWND parent
, HMENU menu
, HINSTANCE instance
, void *params
,
664 DWORD flags
, CBT_CREATEWNDW
*cbtc
, DWORD unk
, BOOL ansi
);
665 HWINSTA WINAPI
NtUserCreateWindowStation( OBJECT_ATTRIBUTES
*attr
, ACCESS_MASK mask
, ULONG arg3
,
666 ULONG arg4
, ULONG arg5
, ULONG arg6
, ULONG arg7
);
667 HDWP WINAPI
NtUserDeferWindowPosAndBand( HDWP hdwp
, HWND hwnd
, HWND after
, INT x
, INT y
,
668 INT cx
, INT cy
, UINT flags
, UINT unk1
, UINT unk2
);
669 BOOL WINAPI
NtUserDeleteMenu( HMENU menu
, UINT id
, UINT flags
);
670 BOOL WINAPI
NtUserDestroyAcceleratorTable( HACCEL handle
);
671 BOOL WINAPI
NtUserDestroyCursor( HCURSOR cursor
, ULONG arg
);
672 BOOL WINAPI
NtUserDestroyInputContext( HIMC handle
);
673 BOOL WINAPI
NtUserDestroyMenu( HMENU menu
);
674 BOOL WINAPI
NtUserDestroyWindow( HWND hwnd
);
675 BOOL WINAPI
NtUserDisableThreadIme( DWORD thread_id
);
676 LRESULT WINAPI
NtUserDispatchMessage( const MSG
*msg
);
677 BOOL WINAPI
NtUserDragDetect( HWND hwnd
, int x
, int y
);
678 BOOL WINAPI
NtUserDrawCaptionTemp( HWND hwnd
, HDC hdc
, const RECT
*rect
, HFONT font
,
679 HICON icon
, const WCHAR
*str
, UINT flags
);
680 BOOL WINAPI
NtUserDrawIconEx( HDC hdc
, INT x0
, INT y0
, HICON icon
, INT width
,
681 INT height
, UINT istep
, HBRUSH hbr
, UINT flags
);
682 DWORD WINAPI
NtUserDrawMenuBarTemp( HWND hwnd
, HDC hdc
, RECT
*rect
, HMENU handle
, HFONT font
);
683 BOOL WINAPI
NtUserEmptyClipboard(void);
684 BOOL WINAPI
NtUserEnableMenuItem( HMENU handle
, UINT id
, UINT flags
);
685 BOOL WINAPI
NtUserEnableScrollBar( HWND hwnd
, UINT bar
, UINT flags
);
686 BOOL WINAPI
NtUserEndDeferWindowPosEx( HDWP hdwp
, BOOL async
);
687 BOOL WINAPI
NtUserEndMenu(void);
688 BOOL WINAPI
NtUserEndPaint( HWND hwnd
, const PAINTSTRUCT
*ps
);
689 NTSTATUS WINAPI
NtUserEnumDisplayDevices( UNICODE_STRING
*device
, DWORD index
,
690 DISPLAY_DEVICEW
*info
, DWORD flags
);
691 BOOL WINAPI
NtUserEnumDisplayMonitors( HDC hdc
, RECT
*rect
, MONITORENUMPROC proc
, LPARAM lp
);
692 BOOL WINAPI
NtUserEnumDisplaySettings( UNICODE_STRING
*device
, DWORD mode
,
693 DEVMODEW
*dev_mode
, DWORD flags
);
694 INT WINAPI
NtUserExcludeUpdateRgn( HDC hdc
, HWND hwnd
);
695 HICON WINAPI
NtUserFindExistingCursorIcon( UNICODE_STRING
*module
, UNICODE_STRING
*res_name
,
697 HWND WINAPI
NtUserFindWindowEx( HWND parent
, HWND child
, UNICODE_STRING
*class,
698 UNICODE_STRING
*title
, ULONG unk
);
699 BOOL WINAPI
NtUserFlashWindowEx( FLASHWINFO
*info
);
700 HWND WINAPI
NtUserGetAncestor( HWND hwnd
, UINT type
);
701 SHORT WINAPI
NtUserGetAsyncKeyState( INT key
);
702 ULONG WINAPI
NtUserGetAtomName( ATOM atom
, UNICODE_STRING
*name
);
703 UINT WINAPI
NtUserGetCaretBlinkTime(void);
704 BOOL WINAPI
NtUserGetCaretPos( POINT
*point
);
705 ATOM WINAPI
NtUserGetClassInfoEx( HINSTANCE instance
, UNICODE_STRING
*name
, WNDCLASSEXW
*wc
,
706 struct client_menu_name
*menu_name
, BOOL ansi
);
707 INT WINAPI
NtUserGetClassName( HWND hwnd
, BOOL real
, UNICODE_STRING
*name
);
708 HANDLE WINAPI
NtUserGetClipboardData( UINT format
, struct get_clipboard_params
*params
);
709 INT WINAPI
NtUserGetClipboardFormatName( UINT format
, WCHAR
*buffer
, INT maxlen
);
710 HWND WINAPI
NtUserGetClipboardOwner(void);
711 DWORD WINAPI
NtUserGetClipboardSequenceNumber(void);
712 HWND WINAPI
NtUserGetClipboardViewer(void);
713 HCURSOR WINAPI
NtUserGetCursor(void);
714 HCURSOR WINAPI
NtUserGetCursorFrameInfo( HCURSOR hCursor
, DWORD istep
, DWORD
*rate_jiffies
,
716 BOOL WINAPI
NtUserGetCursorInfo( CURSORINFO
*info
);
717 HDC WINAPI
NtUserGetDCEx( HWND hwnd
, HRGN clip_rgn
, DWORD flags
);
718 LONG WINAPI
NtUserGetDisplayConfigBufferSizes( UINT32 flags
, UINT32
*num_path_info
,
719 UINT32
*num_mode_info
);
720 UINT WINAPI
NtUserGetDoubleClickTime(void);
721 BOOL WINAPI
NtUserGetDpiForMonitor( HMONITOR monitor
, UINT type
, UINT
*x
, UINT
*y
);
722 HWND WINAPI
NtUserGetForegroundWindow(void);
723 BOOL WINAPI
NtUserGetGUIThreadInfo( DWORD id
, GUITHREADINFO
*info
);
724 BOOL WINAPI
NtUserGetIconInfo( HICON icon
, ICONINFO
*info
, UNICODE_STRING
*module
,
725 UNICODE_STRING
*res_name
, DWORD
*bpp
, LONG unk
);
726 BOOL WINAPI
NtUserGetIconSize( HICON handle
, UINT step
, LONG
*width
, LONG
*height
);
727 INT WINAPI
NtUserGetKeyNameText( LONG lparam
, WCHAR
*buffer
, INT size
);
728 SHORT WINAPI
NtUserGetKeyState( INT vkey
);
729 HKL WINAPI
NtUserGetKeyboardLayout( DWORD thread_id
);
730 UINT WINAPI
NtUserGetKeyboardLayoutList( INT size
, HKL
*layouts
);
731 BOOL WINAPI
NtUserGetKeyboardLayoutName( WCHAR
*name
);
732 BOOL WINAPI
NtUserGetKeyboardState( BYTE
*state
);
733 BOOL WINAPI
NtUserGetLayeredWindowAttributes( HWND hwnd
, COLORREF
*key
, BYTE
*alpha
, DWORD
*flags
);
734 BOOL WINAPI
NtUserGetMenuBarInfo( HWND hwnd
, LONG id
, LONG item
, MENUBARINFO
*info
);
735 BOOL WINAPI
NtUserGetMenuItemRect( HWND hwnd
, HMENU menu
, UINT item
, RECT
*rect
);
736 BOOL WINAPI
NtUserGetMessage( MSG
*msg
, HWND hwnd
, UINT first
, UINT last
);
737 int WINAPI
NtUserGetMouseMovePointsEx( UINT size
, MOUSEMOVEPOINT
*ptin
, MOUSEMOVEPOINT
*ptout
,
738 int count
, DWORD resolution
);
739 BOOL WINAPI
NtUserGetObjectInformation( HANDLE handle
, INT index
, void *info
,
740 DWORD len
, DWORD
*needed
);
741 HWND WINAPI
NtUserGetOpenClipboardWindow(void);
742 INT WINAPI
NtUserGetPriorityClipboardFormat( UINT
*list
, INT count
);
743 HWINSTA WINAPI
NtUserGetProcessWindowStation(void);
744 HANDLE WINAPI
NtUserGetProp( HWND hwnd
, const WCHAR
*str
);
745 ULONG WINAPI
NtUserGetProcessDpiAwarenessContext( HANDLE process
);
746 DWORD WINAPI
NtUserGetQueueStatus( UINT flags
);
747 UINT WINAPI
NtUserGetRawInputBuffer( RAWINPUT
*data
, UINT
*data_size
, UINT header_size
);
748 UINT WINAPI
NtUserGetRawInputData( HRAWINPUT rawinput
, UINT command
, void *data
, UINT
*data_size
, UINT header_size
);
749 UINT WINAPI
NtUserGetRawInputDeviceInfo( HANDLE handle
, UINT command
, void *data
, UINT
*data_size
);
750 UINT WINAPI
NtUserGetRawInputDeviceList( RAWINPUTDEVICELIST
*devices
, UINT
*device_count
, UINT size
);
751 UINT WINAPI
NtUserGetRegisteredRawInputDevices( RAWINPUTDEVICE
*devices
, UINT
*device_count
, UINT size
);
752 BOOL WINAPI
NtUserGetScrollBarInfo( HWND hwnd
, LONG id
, SCROLLBARINFO
*info
);
753 ULONG WINAPI
NtUserGetSystemDpiForProcess( HANDLE process
);
754 HMENU WINAPI
NtUserGetSystemMenu( HWND hwnd
, BOOL revert
);
755 HDESK WINAPI
NtUserGetThreadDesktop( DWORD thread
);
756 BOOL WINAPI
NtUserGetTitleBarInfo( HWND hwnd
, TITLEBARINFO
*info
);
757 INT WINAPI
NtUserGetUpdateRgn( HWND hwnd
, HRGN hrgn
, BOOL erase
);
758 BOOL WINAPI
NtUserGetUpdatedClipboardFormats( UINT
*formats
, UINT size
, UINT
*out_size
);
759 BOOL WINAPI
NtUserGetUpdateRect( HWND hwnd
, RECT
*rect
, BOOL erase
);
760 BOOL WINAPI
NtUserGetWindowPlacement( HWND hwnd
, WINDOWPLACEMENT
*placement
);
761 int WINAPI
NtUserGetWindowRgnEx( HWND hwnd
, HRGN hrgn
, UINT unk
);
762 BOOL WINAPI
NtUserHideCaret( HWND hwnd
);
763 BOOL WINAPI
NtUserHiliteMenuItem( HWND hwnd
, HMENU handle
, UINT item
, UINT hilite
);
764 NTSTATUS WINAPI
NtUserInitializeClientPfnArrays( const struct user_client_procs
*client_procsA
,
765 const struct user_client_procs
*client_procsW
,
766 const void *client_workers
, HINSTANCE user_module
);
767 HICON WINAPI
NtUserInternalGetWindowIcon( HWND hwnd
, UINT type
);
768 INT WINAPI
NtUserInternalGetWindowText( HWND hwnd
, WCHAR
*text
, INT count
);
769 BOOL WINAPI
NtUserIsClipboardFormatAvailable( UINT format
);
770 BOOL WINAPI
NtUserInvalidateRect( HWND hwnd
, const RECT
*rect
, BOOL erase
);
771 BOOL WINAPI
NtUserInvalidateRgn( HWND hwnd
, HRGN hrgn
, BOOL erase
);
772 BOOL WINAPI
NtUserKillTimer( HWND hwnd
, UINT_PTR id
);
773 BOOL WINAPI
NtUserLockWindowUpdate( HWND hwnd
);
774 UINT WINAPI
NtUserMapVirtualKeyEx( UINT code
, UINT type
, HKL layout
);
775 INT WINAPI
NtUserMenuItemFromPoint( HWND hwnd
, HMENU handle
, int x
, int y
);
776 LRESULT WINAPI
NtUserMessageCall( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
,
777 void *result_info
, DWORD type
, BOOL ansi
);
778 BOOL WINAPI
NtUserMoveWindow( HWND hwnd
, INT x
, INT y
, INT cx
, INT cy
, BOOL repaint
);
779 DWORD WINAPI
NtUserMsgWaitForMultipleObjectsEx( DWORD count
, const HANDLE
*handles
,
780 DWORD timeout
, DWORD mask
, DWORD flags
);
781 void WINAPI
NtUserNotifyWinEvent( DWORD event
, HWND hwnd
, LONG object_id
, LONG child_id
);
782 HWINSTA WINAPI
NtUserOpenWindowStation( OBJECT_ATTRIBUTES
*attr
, ACCESS_MASK access
);
783 BOOL WINAPI
NtUserSetObjectInformation( HANDLE handle
, INT index
, void *info
, DWORD len
);
784 BOOL WINAPI
NtUserOpenClipboard( HWND hwnd
, ULONG unk
);
785 HDESK WINAPI
NtUserOpenDesktop( OBJECT_ATTRIBUTES
*attr
, DWORD flags
, ACCESS_MASK access
);
786 HDESK WINAPI
NtUserOpenInputDesktop( DWORD flags
, BOOL inherit
, ACCESS_MASK access
);
787 BOOL WINAPI
NtUserPeekMessage( MSG
*msg_out
, HWND hwnd
, UINT first
, UINT last
, UINT flags
);
788 BOOL WINAPI
NtUserPostMessage( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
);
789 BOOL WINAPI
NtUserPostThreadMessage( DWORD thread
, UINT msg
, WPARAM wparam
, LPARAM lparam
);
790 UINT_PTR WINAPI
NtUserQueryInputContext( HIMC handle
, UINT attr
);
791 BOOL WINAPI
NtUserRedrawWindow( HWND hwnd
, const RECT
*rect
, HRGN hrgn
, UINT flags
);
792 ATOM WINAPI
NtUserRegisterClassExWOW( const WNDCLASSEXW
*wc
, UNICODE_STRING
*name
, UNICODE_STRING
*version
,
793 struct client_menu_name
*client_menu_name
, DWORD fnid
, DWORD flags
,
795 BOOL WINAPI
NtUserRegisterHotKey( HWND hwnd
, INT id
, UINT modifiers
, UINT vk
);
796 BOOL WINAPI
NtUserRegisterRawInputDevices( const RAWINPUTDEVICE
*devices
, UINT device_count
, UINT size
);
797 INT WINAPI
NtUserReleaseDC( HWND hwnd
, HDC hdc
);
798 BOOL WINAPI
NtUserRemoveClipboardFormatListener( HWND hwnd
);
799 BOOL WINAPI
NtUserRemoveMenu( HMENU menu
, UINT id
, UINT flags
);
800 HANDLE WINAPI
NtUserRemoveProp( HWND hwnd
, const WCHAR
*str
);
801 BOOL WINAPI
NtUserScrollDC( HDC hdc
, INT dx
, INT dy
, const RECT
*scroll
, const RECT
*clip
,
802 HRGN ret_update_rgn
, RECT
*update_rect
);
803 INT WINAPI
NtUserScrollWindowEx( HWND hwnd
, INT dx
, INT dy
, const RECT
*rect
,
804 const RECT
*clip_rect
, HRGN update_rgn
,
805 RECT
*update_rect
, UINT flags
) DECLSPEC_HIDDEN
;
806 HPALETTE WINAPI
NtUserSelectPalette( HDC hdc
, HPALETTE palette
, WORD force_background
);
807 UINT WINAPI
NtUserSendInput( UINT count
, INPUT
*inputs
, int size
);
808 HWND WINAPI
NtUserSetActiveWindow( HWND hwnd
);
809 HWND WINAPI
NtUserSetCapture( HWND hwnd
);
810 DWORD WINAPI
NtUserSetClassLong( HWND hwnd
, INT offset
, LONG newval
, BOOL ansi
);
811 ULONG_PTR WINAPI
NtUserSetClassLongPtr( HWND hwnd
, INT offset
, LONG_PTR newval
, BOOL ansi
);
812 WORD WINAPI
NtUserSetClassWord( HWND hwnd
, INT offset
, WORD newval
);
813 NTSTATUS WINAPI
NtUserSetClipboardData( UINT format
, HANDLE handle
, struct set_clipboard_params
*params
);
814 HWND WINAPI
NtUserSetClipboardViewer( HWND hwnd
);
815 HCURSOR WINAPI
NtUserSetCursor( HCURSOR cursor
);
816 BOOL WINAPI
NtUserSetCursorIconData( HCURSOR cursor
, UNICODE_STRING
*module
, UNICODE_STRING
*res_name
,
817 struct cursoricon_desc
*desc
);
818 BOOL WINAPI
NtUserSetCursorPos( INT x
, INT y
);
819 HWND WINAPI
NtUserSetFocus( HWND hwnd
);
820 void WINAPI
NtUserSetInternalWindowPos( HWND hwnd
, UINT cmd
, RECT
*rect
, POINT
*pt
);
821 BOOL WINAPI
NtUserSetKeyboardState( BYTE
*state
);
822 BOOL WINAPI
NtUserSetLayeredWindowAttributes( HWND hwnd
, COLORREF key
, BYTE alpha
, DWORD flags
);
823 BOOL WINAPI
NtUserSetMenu( HWND hwnd
, HMENU menu
);
824 BOOL WINAPI
NtUserSetMenuContextHelpId( HMENU handle
, DWORD id
);
825 BOOL WINAPI
NtUserSetMenuDefaultItem( HMENU handle
, UINT item
, UINT bypos
);
826 HWND WINAPI
NtUserSetParent( HWND hwnd
, HWND parent
);
827 BOOL WINAPI
NtUserSetProcessDpiAwarenessContext( ULONG awareness
, ULONG unknown
);
828 BOOL WINAPI
NtUserSetProcessWindowStation( HWINSTA handle
);
829 BOOL WINAPI
NtUserSetProp( HWND hwnd
, const WCHAR
*str
, HANDLE handle
);
830 INT WINAPI
NtUserSetScrollInfo( HWND hwnd
, INT bar
, const SCROLLINFO
*info
, BOOL redraw
);
831 BOOL WINAPI
NtUserSetSysColors( INT count
, const INT
*colors
, const COLORREF
*values
);
832 BOOL WINAPI
NtUserSetSystemMenu( HWND hwnd
, HMENU menu
);
833 UINT_PTR WINAPI
NtUserSetSystemTimer( HWND hwnd
, UINT_PTR id
, UINT timeout
);
834 BOOL WINAPI
NtUserSetThreadDesktop( HDESK handle
);
835 UINT_PTR WINAPI
NtUserSetTimer( HWND hwnd
, UINT_PTR id
, UINT timeout
, TIMERPROC proc
, ULONG tolerance
);
836 LONG WINAPI
NtUserSetWindowLong( HWND hwnd
, INT offset
, LONG newval
, BOOL ansi
);
837 LONG_PTR WINAPI
NtUserSetWindowLongPtr( HWND hwnd
, INT offset
, LONG_PTR newval
, BOOL ansi
);
838 BOOL WINAPI
NtUserSetWindowPlacement( HWND hwnd
, const WINDOWPLACEMENT
*wpl
);
839 BOOL WINAPI
NtUserSetWindowPos( HWND hwnd
, HWND after
, INT x
, INT y
, INT cx
, INT cy
, UINT flags
);
840 int WINAPI
NtUserSetWindowRgn( HWND hwnd
, HRGN hrgn
, BOOL redraw
);
841 WORD WINAPI
NtUserSetWindowWord( HWND hwnd
, INT offset
, WORD newval
);
842 HHOOK WINAPI
NtUserSetWindowsHookEx( HINSTANCE inst
, UNICODE_STRING
*module
, DWORD tid
, INT id
,
843 HOOKPROC proc
, BOOL ansi
);
844 HWINEVENTHOOK WINAPI
NtUserSetWinEventHook( DWORD event_min
, DWORD event_max
, HMODULE inst
,
845 UNICODE_STRING
*module
, WINEVENTPROC proc
,
846 DWORD pid
, DWORD tid
, DWORD flags
);
847 BOOL WINAPI
NtUserShowCaret( HWND hwnd
);
848 INT WINAPI
NtUserShowCursor( BOOL show
);
849 BOOL WINAPI
NtUserShowScrollBar( HWND hwnd
, INT bar
, BOOL show
);
850 BOOL WINAPI
NtUserShowWindow( HWND hwnd
, INT cmd
);
851 BOOL WINAPI
NtUserShowWindowAsync( HWND hwnd
, INT cmd
);
852 BOOL WINAPI
NtUserSystemParametersInfo( UINT action
, UINT val
, void *ptr
, UINT winini
);
853 BOOL WINAPI
NtUserSystemParametersInfoForDpi( UINT action
, UINT val
, PVOID ptr
, UINT winini
, UINT dpi
);
854 BOOL WINAPI
NtUserThunkedMenuInfo( HMENU menu
, const MENUINFO
*info
);
855 UINT WINAPI
NtUserThunkedMenuItemInfo( HMENU menu
, UINT pos
, UINT flags
, UINT method
,
856 MENUITEMINFOW
*info
, UNICODE_STRING
*str
);
857 INT WINAPI
NtUserToUnicodeEx( UINT virt
, UINT scan
, const BYTE
*state
,
858 WCHAR
*str
, int size
, UINT flags
, HKL layout
);
859 BOOL WINAPI
NtUserTrackMouseEvent( TRACKMOUSEEVENT
*info
);
860 BOOL WINAPI
NtUserTrackPopupMenuEx( HMENU handle
, UINT flags
, INT x
, INT y
, HWND hwnd
, TPMPARAMS
*params
);
861 INT WINAPI
NtUserTranslateAccelerator( HWND hwnd
, HACCEL accel
, MSG
*msg
);
862 BOOL WINAPI
NtUserTranslateMessage( const MSG
*msg
, UINT flags
);
863 BOOL WINAPI
NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook
);
864 BOOL WINAPI
NtUserUnhookWindowsHookEx( HHOOK handle
);
865 BOOL WINAPI
NtUserUnregisterClass( UNICODE_STRING
*name
, HINSTANCE instance
,
866 struct client_menu_name
*client_menu_name
);
867 BOOL WINAPI
NtUserUnregisterHotKey( HWND hwnd
, INT id
);
868 BOOL WINAPI
NtUserUpdateInputContext( HIMC handle
, UINT attr
, UINT_PTR value
);
869 BOOL WINAPI
NtUserUpdateLayeredWindow( HWND hwnd
, HDC hdc_dst
, const POINT
*pts_dst
, const SIZE
*size
,
870 HDC hdc_src
, const POINT
*pts_src
, COLORREF key
,
871 const BLENDFUNCTION
*blend
, DWORD flags
, const RECT
*dirty
);
872 WORD WINAPI
NtUserVkKeyScanEx( WCHAR chr
, HKL layout
);
873 DWORD WINAPI
NtUserWaitForInputIdle( HANDLE process
, DWORD timeout
, BOOL wow
);
874 HWND WINAPI
NtUserWindowFromDC( HDC hdc
);
875 HWND WINAPI
NtUserWindowFromPoint( LONG x
, LONG y
);
877 /* NtUserCallNoParam codes, not compatible with Windows */
880 NtUserCallNoParam_DestroyCaret
,
881 NtUserCallNoParam_GetDesktopWindow
,
882 NtUserCallNoParam_GetDialogBaseUnits
,
883 NtUserCallNoParam_GetInputState
,
884 NtUserCallNoParam_GetProcessDefaultLayout
,
885 NtUserCallNoParam_ReleaseCapture
,
886 /* temporary exports */
891 static inline BOOL
NtUserDestroyCaret(void)
893 return NtUserCallNoParam( NtUserCallNoParam_DestroyCaret
);
896 static inline HWND
NtUserGetDesktopWindow(void)
898 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetDesktopWindow
));
901 static inline DWORD
NtUserGetDialogBaseUnits(void)
903 return NtUserCallNoParam( NtUserCallNoParam_GetDialogBaseUnits
);
906 static inline BOOL
NtUserGetInputState(void)
908 return NtUserCallNoParam( NtUserCallNoParam_GetInputState
);
911 static inline DWORD
NtUserGetProcessDefaultLayout(void)
913 return NtUserCallNoParam( NtUserCallNoParam_GetProcessDefaultLayout
);
916 static inline BOOL
NtUserReleaseCapture(void)
918 return NtUserCallNoParam( NtUserCallNoParam_ReleaseCapture
);
921 /* NtUserCallOneParam codes, not compatible with Windows */
924 NtUserCallOneParam_BeginDeferWindowPos
,
925 NtUserCallOneParam_CreateCursorIcon
,
926 NtUserCallOneParam_CreateMenu
,
927 NtUserCallOneParam_EnableDC
,
928 NtUserCallOneParam_EnableThunkLock
,
929 NtUserCallOneParam_EnumClipboardFormats
,
930 NtUserCallOneParam_GetClipCursor
,
931 NtUserCallOneParam_GetCursorPos
,
932 NtUserCallOneParam_GetIconParam
,
933 NtUserCallOneParam_GetMenuItemCount
,
934 NtUserCallOneParam_GetPrimaryMonitorRect
,
935 NtUserCallOneParam_GetSysColor
,
936 NtUserCallOneParam_GetSysColorBrush
,
937 NtUserCallOneParam_GetSysColorPen
,
938 NtUserCallOneParam_GetSystemMetrics
,
939 NtUserCallOneParam_GetVirtualScreenRect
,
940 NtUserCallOneParam_IsWindowRectFullScreen
,
941 NtUserCallOneParam_MessageBeep
,
942 NtUserCallOneParam_RealizePalette
,
943 NtUserCallOneParam_SetCaretBlinkTime
,
944 NtUserCallOneParam_SetProcessDefaultLayout
,
945 /* temporary exports */
946 NtUserGetDeskPattern
,
949 static inline HDWP
NtUserBeginDeferWindowPos( INT count
)
951 return UlongToHandle( NtUserCallOneParam( count
, NtUserCallOneParam_BeginDeferWindowPos
));
954 static inline HICON
NtUserCreateCursorIcon( BOOL is_icon
)
956 return UlongToHandle( NtUserCallOneParam( is_icon
, NtUserCallOneParam_CreateCursorIcon
));
959 static inline HMENU
NtUserCreateMenu( BOOL is_popup
)
961 return UlongToHandle( NtUserCallOneParam( is_popup
, NtUserCallOneParam_CreateMenu
));
964 static inline WORD
NtUserEnableDC( HDC hdc
)
966 return NtUserCallOneParam( HandleToUlong(hdc
), NtUserCallOneParam_EnableDC
);
969 static inline void NtUserEnableThunkLock( BOOL enable
)
971 NtUserCallOneParam( enable
, NtUserCallOneParam_EnableThunkLock
);
974 static inline UINT
NtUserEnumClipboardFormats( UINT format
)
976 return NtUserCallOneParam( format
, NtUserCallOneParam_EnumClipboardFormats
);
979 static inline BOOL
NtUserGetClipCursor( RECT
*rect
)
981 return NtUserCallOneParam( (UINT_PTR
)rect
, NtUserCallOneParam_GetClipCursor
);
984 static inline BOOL
NtUserGetCursorPos( POINT
*pt
)
986 return NtUserCallOneParam( (UINT_PTR
)pt
, NtUserCallOneParam_GetCursorPos
);
989 static inline UINT_PTR
NtUserGetIconParam( HICON icon
)
991 return NtUserCallOneParam( HandleToUlong(icon
), NtUserCallOneParam_GetIconParam
);
994 static inline UINT_PTR
NtUserGetMenuItemCount( HMENU menu
)
996 return NtUserCallOneParam( HandleToUlong(menu
), NtUserCallOneParam_GetMenuItemCount
);
999 static inline RECT
NtUserGetPrimaryMonitorRect(void)
1002 NtUserCallOneParam( (UINT_PTR
)&primary
, NtUserCallOneParam_GetPrimaryMonitorRect
);
1006 static inline BOOL
NtUserSetCaretBlinkTime( unsigned int time
)
1008 return NtUserCallOneParam( time
, NtUserCallOneParam_SetCaretBlinkTime
);
1011 static inline COLORREF
NtUserGetSysColor( INT index
)
1013 return NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColor
);
1016 static inline HBRUSH
NtUserGetSysColorBrush( INT index
)
1018 return UlongToHandle( NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColorBrush
));
1021 static inline HPEN
NtUserGetSysColorPen( INT index
)
1023 return UlongToHandle( NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColorPen
));
1026 static inline INT
NtUserGetSystemMetrics( INT index
)
1028 return NtUserCallOneParam( index
, NtUserCallOneParam_GetSystemMetrics
);
1031 static inline RECT
NtUserGetVirtualScreenRect(void)
1034 NtUserCallOneParam( (UINT_PTR
)&virtual, NtUserCallOneParam_GetVirtualScreenRect
);
1038 static inline BOOL
NtUserIsWindowRectFullScreen( const RECT
*rect
)
1040 return NtUserCallOneParam( (UINT_PTR
)rect
, NtUserCallOneParam_IsWindowRectFullScreen
);
1043 static inline BOOL
NtUserMessageBeep( UINT i
)
1045 return NtUserCallOneParam( i
, NtUserCallOneParam_MessageBeep
);
1048 static inline UINT
NtUserRealizePalette( HDC hdc
)
1050 return NtUserCallOneParam( HandleToUlong(hdc
), NtUserCallOneParam_RealizePalette
);
1053 static inline UINT
NtUserSetProcessDefaultLayout( DWORD layout
)
1055 return NtUserCallOneParam( layout
, NtUserCallOneParam_SetProcessDefaultLayout
);
1058 /* NtUserCallTwoParam codes, not compatible with Windows */
1061 NtUserCallTwoParam_GetMenuInfo
,
1062 NtUserCallTwoParam_GetMonitorInfo
,
1063 NtUserCallTwoParam_GetSystemMetricsForDpi
,
1064 NtUserCallTwoParam_MonitorFromRect
,
1065 NtUserCallTwoParam_ReplyMessage
,
1066 NtUserCallTwoParam_SetCaretPos
,
1067 NtUserCallTwoParam_SetIconParam
,
1068 NtUserCallTwoParam_UnhookWindowsHook
,
1069 /* temporary exports */
1073 static inline BOOL
NtUserGetMenuInfo( HMENU menu
, MENUINFO
*info
)
1075 return NtUserCallTwoParam( HandleToUlong(menu
), (ULONG_PTR
)info
,
1076 NtUserCallTwoParam_GetMenuInfo
);
1079 static inline BOOL
NtUserGetMonitorInfo( HMONITOR monitor
, MONITORINFO
*info
)
1081 return NtUserCallTwoParam( HandleToUlong(monitor
), (ULONG_PTR
)info
,
1082 NtUserCallTwoParam_GetMonitorInfo
);
1085 static inline INT
NtUserGetSystemMetricsForDpi( INT index
, UINT dpi
)
1087 return NtUserCallTwoParam( index
, dpi
, NtUserCallTwoParam_GetSystemMetricsForDpi
);
1090 static inline HMONITOR
NtUserMonitorFromRect( const RECT
*rect
, DWORD flags
)
1092 ULONG ret
= NtUserCallTwoParam( (LONG_PTR
)rect
, flags
, NtUserCallTwoParam_MonitorFromRect
);
1093 return UlongToHandle( ret
);
1096 static inline BOOL
NtUserReplyMessage( LRESULT result
, MSG
*msg
)
1098 return NtUserCallTwoParam( result
, (UINT_PTR
)msg
, NtUserCallTwoParam_ReplyMessage
);
1101 static inline BOOL
NtUserSetCaretPos( int x
, int y
)
1103 return NtUserCallTwoParam( x
, y
, NtUserCallTwoParam_SetCaretPos
);
1106 static inline UINT_PTR
NtUserSetIconParam( HICON icon
, ULONG_PTR param
)
1108 return NtUserCallTwoParam( HandleToUlong(icon
), param
, NtUserCallTwoParam_SetIconParam
);
1111 static inline BOOL
NtUserUnhookWindowsHook( INT id
, HOOKPROC proc
)
1113 return NtUserCallTwoParam( id
, (UINT_PTR
)proc
, NtUserCallTwoParam_UnhookWindowsHook
);
1116 /* NtUserCallHwnd codes, not compatible with Windows */
1119 NtUserCallHwnd_ArrangeIconicWindows
,
1120 NtUserCallHwnd_DrawMenuBar
,
1121 NtUserCallHwnd_GetDefaultImeWindow
,
1122 NtUserCallHwnd_GetDialogInfo
,
1123 NtUserCallHwnd_GetDpiForWindow
,
1124 NtUserCallHwnd_GetMDIClientInfo
,
1125 NtUserCallHwnd_GetParent
,
1126 NtUserCallHwnd_GetWindowContextHelpId
,
1127 NtUserCallHwnd_GetWindowDpiAwarenessContext
,
1128 NtUserCallHwnd_GetWindowInputContext
,
1129 NtUserCallHwnd_GetWindowSysSubMenu
,
1130 NtUserCallHwnd_GetWindowTextLength
,
1131 NtUserCallHwnd_IsWindow
,
1132 NtUserCallHwnd_IsWindowEnabled
,
1133 NtUserCallHwnd_IsWindowUnicode
,
1134 NtUserCallHwnd_IsWindowVisible
,
1135 NtUserCallHwnd_SetForegroundWindow
,
1136 /* temporary exports */
1137 NtUserGetFullWindowHandle
,
1138 NtUserIsCurrehtProcessWindow
,
1139 NtUserIsCurrehtThreadWindow
,
1142 static inline UINT
NtUserArrangeIconicWindows( HWND parent
)
1144 return NtUserCallHwnd( parent
, NtUserCallHwnd_ArrangeIconicWindows
);
1147 static inline BOOL
NtUserDrawMenuBar( HWND hwnd
)
1149 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_DrawMenuBar
);
1152 static inline DWORD
NtUserGetWindowContextHelpId( HWND hwnd
)
1154 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowContextHelpId
);
1157 static inline HWND
NtUserGetDefaultImeWindow( HWND hwnd
)
1159 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDefaultImeWindow
));
1162 static inline void *NtUserGetDialogInfo( HWND hwnd
)
1164 return (void *)NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDialogInfo
);
1167 static inline UINT
NtUserGetDpiForWindow( HWND hwnd
)
1169 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDpiForWindow
);
1172 static inline void *NtUserGetMDIClientInfo( HWND hwnd
)
1174 return (void *)NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetMDIClientInfo
);
1177 static inline HWND
NtUserGetParent( HWND hwnd
)
1179 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetParent
));
1182 static inline DPI_AWARENESS_CONTEXT
NtUserGetWindowDpiAwarenessContext( HWND hwnd
)
1184 return (DPI_AWARENESS_CONTEXT
)NtUserCallHwnd( hwnd
,
1185 NtUserCallHwnd_GetWindowDpiAwarenessContext
);
1188 static inline HIMC
NtUserGetWindowInputContext( HWND hwnd
)
1190 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowInputContext
));
1193 static inline HMENU
NtUserGetWindowSysSubMenu( HWND hwnd
)
1195 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowSysSubMenu
));
1198 static inline INT
NtUserGetWindowTextLength( HWND hwnd
)
1200 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowTextLength
);
1203 static inline BOOL
NtUserIsWindow( HWND hwnd
)
1205 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindow
);
1208 static inline BOOL
NtUserIsWindowEnabled( HWND hwnd
)
1210 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowEnabled
);
1213 static inline BOOL
NtUserIsWindowUnicode( HWND hwnd
)
1215 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowUnicode
);
1218 static inline BOOL
NtUserIsWindowVisible( HWND hwnd
)
1220 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowVisible
);
1223 static inline BOOL
NtUserSetForegroundWindow( HWND hwnd
)
1225 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_SetForegroundWindow
);
1228 /* NtUserCallHwndParam codes, not compatible with Windows */
1231 NtUserCallHwndParam_ClientToScreen
,
1232 NtUserCallHwndParam_EnableWindow
,
1233 NtUserCallHwndParam_GetChildRect
,
1234 NtUserCallHwndParam_GetClassLongA
,
1235 NtUserCallHwndParam_GetClassLongW
,
1236 NtUserCallHwndParam_GetClassLongPtrA
,
1237 NtUserCallHwndParam_GetClassLongPtrW
,
1238 NtUserCallHwndParam_GetClassWord
,
1239 NtUserCallHwndParam_GetClientRect
,
1240 NtUserCallHwndParam_GetDialogProc
,
1241 NtUserCallHwndParam_GetScrollInfo
,
1242 NtUserCallHwndParam_GetWindowInfo
,
1243 NtUserCallHwndParam_GetWindowLongA
,
1244 NtUserCallHwndParam_GetWindowLongW
,
1245 NtUserCallHwndParam_GetWindowLongPtrA
,
1246 NtUserCallHwndParam_GetWindowLongPtrW
,
1247 NtUserCallHwndParam_GetWindowRect
,
1248 NtUserCallHwndParam_GetWindowRelative
,
1249 NtUserCallHwndParam_GetWindowThread
,
1250 NtUserCallHwndParam_GetWindowWord
,
1251 NtUserCallHwndParam_IsChild
,
1252 NtUserCallHwndParam_KillSystemTimer
,
1253 NtUserCallHwndParam_MapWindowPoints
,
1254 NtUserCallHwndParam_MirrorRgn
,
1255 NtUserCallHwndParam_MonitorFromWindow
,
1256 NtUserCallHwndParam_ScreenToClient
,
1257 NtUserCallHwndParam_SetDialogInfo
,
1258 NtUserCallHwndParam_SetMDIClientInfo
,
1259 NtUserCallHwndParam_SetWindowContextHelpId
,
1260 NtUserCallHwndParam_SetWindowPixelFormat
,
1261 NtUserCallHwndParam_ShowOwnedPopups
,
1262 /* temporary exports */
1263 NtUserSetWindowStyle
,
1264 NtUserSpyGetMsgName
,
1267 static inline BOOL
NtUserClientToScreen( HWND hwnd
, POINT
*pt
)
1269 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)pt
, NtUserCallHwndParam_ClientToScreen
);
1272 static inline BOOL
NtUserEnableWindow( HWND hwnd
, BOOL enable
)
1274 return NtUserCallHwndParam( hwnd
, enable
, NtUserCallHwndParam_EnableWindow
);
1277 static inline BOOL
NtUserGetChildRect( HWND hwnd
, RECT
*rect
)
1279 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)rect
, NtUserCallHwndParam_GetChildRect
);
1282 static inline DWORD
NtUserGetClassLongA( HWND hwnd
, INT offset
)
1284 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongA
);
1287 static inline ULONG_PTR
NtUserGetClassLongPtrA( HWND hwnd
, INT offset
)
1289 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongPtrA
);
1292 static inline ULONG_PTR
NtUserGetClassLongPtrW( HWND hwnd
, INT offset
)
1294 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongPtrW
);
1297 static inline DWORD
NtUserGetClassLongW( HWND hwnd
, INT offset
)
1299 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongW
);
1302 static inline WORD
NtUserGetClassWord( HWND hwnd
, INT offset
)
1304 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassWord
);
1307 static inline BOOL
NtUserGetClientRect( HWND hwnd
, RECT
*rect
)
1309 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)rect
, NtUserCallHwndParam_GetClientRect
);
1312 enum dialog_proc_type
1319 static inline DLGPROC
NtUserGetDialogProc( HWND hwnd
, enum dialog_proc_type type
)
1321 return (DLGPROC
)NtUserCallHwndParam( hwnd
, type
, NtUserCallHwndParam_GetDialogProc
);
1324 struct get_scroll_info_params
1330 static inline BOOL
NtUserGetScrollInfo( HWND hwnd
, INT bar
, SCROLLINFO
*info
)
1332 struct get_scroll_info_params params
= { .bar
= bar
, .info
= info
};
1333 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)¶ms
, NtUserCallHwndParam_GetScrollInfo
);
1336 static inline BOOL
NtUserGetWindowInfo( HWND hwnd
, WINDOWINFO
*info
)
1338 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)info
, NtUserCallHwndParam_GetWindowInfo
);
1341 static inline LONG
NtUserGetWindowLongA( HWND hwnd
, INT offset
)
1343 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongA
);
1346 static inline LONG_PTR
NtUserGetWindowLongPtrA( HWND hwnd
, INT offset
)
1348 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongPtrA
);
1351 static inline LONG_PTR
NtUserGetWindowLongPtrW( HWND hwnd
, INT offset
)
1353 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongPtrW
);
1356 static inline LONG
NtUserGetWindowLongW( HWND hwnd
, INT offset
)
1358 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongW
);
1361 static inline BOOL
NtUserGetWindowRect( HWND hwnd
, RECT
*rect
)
1363 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)rect
, NtUserCallHwndParam_GetWindowRect
);
1366 static inline HWND
NtUserGetWindowRelative( HWND hwnd
, UINT rel
)
1368 return UlongToHandle( NtUserCallHwndParam( hwnd
, rel
,
1369 NtUserCallHwndParam_GetWindowRelative
));
1372 static inline DWORD
NtUserGetWindowThread( HWND hwnd
, DWORD
*process
)
1374 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)process
, NtUserCallHwndParam_GetWindowThread
);
1377 static inline WORD
NtUserGetWindowWord( HWND hwnd
, INT offset
)
1379 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowWord
);
1382 static inline BOOL
NtUserIsChild( HWND parent
, HWND child
)
1384 return NtUserCallHwndParam( parent
, HandleToUlong(child
), NtUserCallHwndParam_IsChild
);
1387 static inline BOOL
NtUserKillSystemTimer( HWND hwnd
, UINT_PTR id
)
1389 return NtUserCallHwndParam( hwnd
, id
, NtUserCallHwndParam_KillSystemTimer
);
1392 struct map_window_points_params
1399 static inline int NtUserMapWindowPoints( HWND hwnd_from
, HWND hwnd_to
, POINT
*points
, UINT count
)
1401 struct map_window_points_params params
;
1402 params
.hwnd_to
= hwnd_to
;
1403 params
.points
= points
;
1404 params
.count
= count
;
1405 return NtUserCallHwndParam( hwnd_from
, (UINT_PTR
)¶ms
,
1406 NtUserCallHwndParam_MapWindowPoints
);
1409 static inline BOOL
NtUserMirrorRgn( HWND hwnd
, HRGN hrgn
)
1411 return NtUserCallHwndParam( hwnd
, HandleToUlong(hrgn
), NtUserCallHwndParam_MirrorRgn
);
1414 static inline HMONITOR
NtUserMonitorFromWindow( HWND hwnd
, DWORD flags
)
1416 ULONG ret
= NtUserCallHwndParam( hwnd
, flags
, NtUserCallHwndParam_MonitorFromWindow
);
1417 return UlongToHandle( ret
);
1420 static inline BOOL
NtUserScreenToClient( HWND hwnd
, POINT
*pt
)
1422 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)pt
, NtUserCallHwndParam_ScreenToClient
);
1425 static inline void NtUserSetDialogInfo( HWND hwnd
, void *info
)
1427 NtUserCallHwndParam( hwnd
, (UINT_PTR
)info
, NtUserCallHwndParam_SetDialogInfo
);
1430 static inline void NtUserSetMDIClientInfo( HWND hwnd
, void *info
)
1432 NtUserCallHwndParam( hwnd
, (UINT_PTR
)info
, NtUserCallHwndParam_SetMDIClientInfo
);
1435 static inline BOOL
NtUserSetWindowContextHelpId( HWND hwnd
, DWORD id
)
1437 return NtUserCallHwndParam( hwnd
, id
, NtUserCallHwndParam_SetWindowContextHelpId
);
1440 static inline BOOL
NtUserSetWindowPixelFormat( HWND hwnd
, int format
)
1442 return NtUserCallHwndParam( hwnd
, format
, NtUserCallHwndParam_SetWindowPixelFormat
);
1445 static inline BOOL
NtUserShowOwnedPopups( HWND hwnd
, BOOL show
)
1447 return NtUserCallHwndParam( hwnd
, show
, NtUserCallHwndParam_ShowOwnedPopups
);
1450 #endif /* _NTUSER_ */