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
,
46 NtUserRegisterBuiltinClasses
,
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 void *driver_data
; /* driver-specific data */
65 DWORD message_time
; /* value for GetMessageTime */
66 DWORD message_pos
; /* value for GetMessagePos */
67 ULONG_PTR message_extra
; /* value for GetMessageExtraInfo */
68 HWND top_window
; /* desktop window */
69 HWND msg_window
; /* HWND_MESSAGE parent window */
70 HIMC default_imc
; /* default input context */
71 void *client_imm
; /* client IMM thread info */
74 static inline struct ntuser_thread_info
*NtUserGetThreadInfo(void)
76 return (struct ntuser_thread_info
*)NtCurrentTeb()->Win32ClientInfo
;
79 /* NtUserCallEnumDisplayMonitor params */
80 struct enum_display_monitor_params
89 /* NtUserCallSendAsyncCallback params */
90 struct send_async_params
92 SENDASYNCPROC callback
;
99 /* NtUserCallWinEventHook params */
100 struct win_event_hook_params
110 WCHAR module
[MAX_PATH
];
113 /* type of message-sending functions that need special WM_CHAR handling */
116 WMCHAR_MAP_POSTMESSAGE
,
117 WMCHAR_MAP_SENDMESSAGE
,
118 WMCHAR_MAP_SENDMESSAGETIMEOUT
,
119 WMCHAR_MAP_RECVMESSAGE
,
120 WMCHAR_MAP_DISPATCHMESSAGE
,
121 WMCHAR_MAP_CALLWINDOWPROC
,
123 WMCHAR_MAP_NOMAPPING
= WMCHAR_MAP_COUNT
126 /* NtUserCallWindowProc params */
127 struct win_proc_params
139 enum wm_char_mapping mapping
;
140 DPI_AWARENESS_CONTEXT dpi_awareness
;
145 /* NtUserCallWindowsHook params */
146 struct win_hook_params
158 WCHAR module
[MAX_PATH
];
161 /* NtUserCopyImage params */
162 struct copy_image_params
171 /* NtUserDrawText params */
172 struct draw_text_params
176 RECT
*rect
; /* FIXME: Use NtCallbackReturn instead */
181 /* NtUserFreeCachedClipboardData params */
182 struct free_cached_data_params
188 /* NtUserImmProcessKey params */
189 struct imm_process_key_params
197 /* NtUserImmTranslateMessage params */
198 struct imm_translate_message_params
206 /* NtUserLoadImage params */
207 struct load_image_params
217 /* NtUserLoadSysMenu params */
218 struct load_sys_menu_params
223 /* NtUserPostDDEMessage params */
224 struct post_dde_message_params
234 /* NtUserRenderSynthesizedFormat params */
235 struct render_synthesized_format_params
241 /* NtUserUnpackDDEMessage params */
242 struct unpack_dde_message_result
248 struct unpack_dde_message_params
250 struct unpack_dde_message_result
*result
; /* FIXME: Use NtCallbackReturn instead */
258 /* process DPI awareness contexts */
259 #define NTUSER_DPI_UNAWARE 0x00006010
260 #define NTUSER_DPI_SYSTEM_AWARE 0x00006011
261 #define NTUSER_DPI_PER_MONITOR_AWARE 0x00000012
262 #define NTUSER_DPI_PER_MONITOR_AWARE_V2 0x00000022
263 #define NTUSER_DPI_PER_UNAWARE_GDISCALED 0x40006010
265 /* NtUserMessageCall codes */
268 NtUserScrollBarWndProc
= 0x029a,
269 NtUserPopupMenuWndProc
= 0x029c,
270 NtUserDesktopWindowProc
= 0x029d,
271 NtUserDefWindowProc
= 0x029e,
272 NtUserCallWindowProc
= 0x02ab,
273 NtUserSendMessage
= 0x02b1,
274 NtUserSendMessageTimeout
= 0x02b3,
275 NtUserSendNotifyMessage
= 0x02b7,
276 NtUserSendMessageCallback
= 0x02b8,
277 /* Wine-specific exports */
278 NtUserClipboardWindowProc
= 0x0300,
279 NtUserSpyEnter
= 0x0301,
280 NtUserSpyExit
= 0x0302,
283 /* NtUserThunkedMenuItemInfo codes */
286 NtUserSetMenuItemInfo
,
287 NtUserInsertMenuItem
,
288 /* Wine extensions */
289 NtUserCheckMenuRadioItem
,
290 NtUserGetMenuDefaultItem
,
292 NtUserGetMenuItemInfoA
,
293 NtUserGetMenuItemInfoW
,
298 struct send_message_timeout_params
305 struct send_message_callback_params
307 SENDASYNCPROC callback
;
311 /* color index used to retrieve system 55aa brush */
312 #define COLOR_55AA_BRUSH 0x100
314 /* user object types */
315 #define NTUSER_OBJ_WINDOW 0x01
316 #define NTUSER_OBJ_MENU 0x02
317 #define NTUSER_OBJ_ICON 0x03
318 #define NTUSER_OBJ_WINPOS 0x04
319 #define NTUSER_OBJ_ACCEL 0x08
320 #define NTUSER_OBJ_HOOK 0x0f
321 #define NTUSER_OBJ_IMC 0x11
323 /* NtUserScrollWindowEx flag */
324 #define SW_NODCCACHE 0x8000
326 /* NtUserSetScrollInfo flag */
327 #define SIF_RETURNPREV 0x1000
329 /* NtUserInitializeClientPfnArrays parameter, not compatible with Windows */
330 struct user_client_procs
332 WNDPROC pButtonWndProc
;
333 WNDPROC pComboWndProc
;
334 WNDPROC pDefWindowProc
;
336 WNDPROC pEditWndProc
;
337 WNDPROC pListBoxWndProc
;
338 WNDPROC pMDIClientWndProc
;
339 WNDPROC pScrollBarWndProc
;
340 WNDPROC pStaticWndProc
;
342 WNDPROC pDesktopWndProc
;
343 WNDPROC pIconTitleWndProc
;
344 WNDPROC pPopupMenuWndProc
;
345 WNDPROC pMessageWndProc
;
348 /* NtUserSetCursorIconData parameter, not compatible with Windows */
349 struct cursoricon_frame
351 UINT width
; /* frame-specific width */
352 UINT height
; /* frame-specific height */
353 HBITMAP color
; /* color bitmap */
354 HBITMAP alpha
; /* pre-multiplied alpha bitmap for 32-bpp icons */
355 HBITMAP mask
; /* mask bitmap (followed by color for 1-bpp icons) */
359 struct cursoricon_desc
365 struct cursoricon_frame
*frames
;
371 struct client_menu_name
375 UNICODE_STRING
*nameUS
;
378 /* NtUserGetClipboardData params, not compatible with Windows */
379 struct get_clipboard_params
388 /* NtUserSetClipboardData params, not compatible with Windows */
389 struct set_clipboard_params
397 /* NtUserDrawScrollBar params */
398 struct draw_scroll_bar_params
404 struct SCROLL_TRACKING_INFO tracking_info
;
415 /* NtUserUpdateInputContext param, not compatible with Window */
416 enum input_context_attr
418 NtUserInputContextClientPtr
,
419 NtUserInputContextThreadId
,
422 /* NtUserAssociateInputContext result */
423 enum associate_input_context_result
430 /* internal messages codes */
431 enum wine_internal_message
433 WM_WINE_DESTROYWINDOW
= 0x80000000,
434 WM_WINE_SETWINDOWPOS
,
437 WM_WINE_SETWINDOWLONG
,
439 WM_WINE_SETACTIVEWINDOW
,
440 WM_WINE_KEYBOARD_LL_HOOK
,
441 WM_WINE_MOUSE_LL_HOOK
,
443 WM_WINE_UPDATEWINDOWSTATE
,
444 WM_WINE_FIRST_DRIVER_MSG
= 0x80001000, /* range of messages reserved for the USER driver */
445 WM_WINE_LAST_DRIVER_MSG
= 0x80001fff
448 /* internal IME message */
449 #define WM_IME_INTERNAL 0x287
450 #define IME_INTERNAL_ACTIVATE 0x17
451 #define IME_INTERNAL_DEACTIVATE 0x18
453 /* the various structures that can be sent in messages, in platform-independent layout */
454 struct packed_CREATESTRUCTW
456 ULONGLONG lpCreateParams
;
473 struct packed_DRAWITEMSTRUCT
488 struct packed_MEASUREITEMSTRUCT
498 struct packed_DELETEITEMSTRUCT
508 struct packed_COMPAREITEMSTRUCT
522 struct packed_WINDOWPOS
526 UINT hwndInsertAfter
;
536 struct packed_COPYDATASTRUCT
543 struct packed_HELPINFO
550 ULONGLONG dwContextId
;
554 struct packed_NCCALCSIZE_PARAMS
560 UINT hwndInsertAfter
;
582 struct packed_MDINEXTMENU
592 struct packed_MDICREATESTRUCTW
606 HKL WINAPI
NtUserActivateKeyboardLayout( HKL layout
, UINT flags
);
607 BOOL WINAPI
NtUserAddClipboardFormatListener( HWND hwnd
);
608 UINT WINAPI
NtUserAssociateInputContext( HWND hwnd
, HIMC ctx
, ULONG flags
);
609 BOOL WINAPI
NtUserAttachThreadInput( DWORD from
, DWORD to
, BOOL attach
);
610 HDC WINAPI
NtUserBeginPaint( HWND hwnd
, PAINTSTRUCT
*ps
);
611 NTSTATUS WINAPI
NtUserBuildHwndList( HDESK desktop
, ULONG unk2
, ULONG unk3
, ULONG unk4
,
612 ULONG thread_id
, ULONG count
, HWND
*buffer
, ULONG
*size
);
613 ULONG_PTR WINAPI
NtUserCallHwnd( HWND hwnd
, DWORD code
);
614 ULONG_PTR WINAPI
NtUserCallHwndParam( HWND hwnd
, DWORD_PTR param
, DWORD code
);
615 LRESULT WINAPI
NtUserCallNextHookEx( HHOOK hhook
, INT code
, WPARAM wparam
, LPARAM lparam
);
616 BOOL WINAPI
NtUserCallMsgFilter( MSG
*msg
, INT code
);
617 ULONG_PTR WINAPI
NtUserCallNoParam( ULONG code
);
618 ULONG_PTR WINAPI
NtUserCallOneParam( ULONG_PTR arg
, ULONG code
);
619 ULONG_PTR WINAPI
NtUserCallTwoParam( ULONG_PTR arg1
, ULONG_PTR arg2
, ULONG code
);
620 BOOL WINAPI
NtUserChangeClipboardChain( HWND hwnd
, HWND next
);
621 LONG WINAPI
NtUserChangeDisplaySettings( UNICODE_STRING
*devname
, DEVMODEW
*devmode
, HWND hwnd
,
622 DWORD flags
, void *lparam
);
623 DWORD WINAPI
NtUserCheckMenuItem( HMENU handle
, UINT id
, UINT flags
);
624 HWND WINAPI
NtUserChildWindowFromPointEx( HWND parent
, LONG x
, LONG y
, UINT flags
);
625 BOOL WINAPI
NtUserClipCursor( const RECT
*rect
);
626 BOOL WINAPI
NtUserCloseClipboard(void);
627 BOOL WINAPI
NtUserCloseDesktop( HDESK handle
);
628 BOOL WINAPI
NtUserCloseWindowStation( HWINSTA handle
);
629 INT WINAPI
NtUserCopyAcceleratorTable( HACCEL src
, ACCEL
*dst
, INT count
);
630 INT WINAPI
NtUserCountClipboardFormats(void);
631 HACCEL WINAPI
NtUserCreateAcceleratorTable( ACCEL
*table
, INT count
);
632 BOOL WINAPI
NtUserCreateCaret( HWND hwnd
, HBITMAP bitmap
, int width
, int height
);
633 HDESK WINAPI
NtUserCreateDesktopEx( OBJECT_ATTRIBUTES
*attr
, UNICODE_STRING
*device
,
634 DEVMODEW
*devmode
, DWORD flags
, ACCESS_MASK access
,
636 HIMC WINAPI
NtUserCreateInputContext( UINT_PTR client_ptr
);
637 HWND WINAPI
NtUserCreateWindowEx( DWORD ex_style
, UNICODE_STRING
*class_name
,
638 UNICODE_STRING
*version
, UNICODE_STRING
*window_name
,
639 DWORD style
, INT x
, INT y
, INT cx
, INT cy
,
640 HWND parent
, HMENU menu
, HINSTANCE instance
, void *params
,
641 DWORD flags
, CBT_CREATEWNDW
*cbtc
, DWORD unk
, BOOL ansi
);
642 HWINSTA WINAPI
NtUserCreateWindowStation( OBJECT_ATTRIBUTES
*attr
, ACCESS_MASK mask
, ULONG arg3
,
643 ULONG arg4
, ULONG arg5
, ULONG arg6
, ULONG arg7
);
644 HDWP WINAPI
NtUserDeferWindowPosAndBand( HDWP hdwp
, HWND hwnd
, HWND after
, INT x
, INT y
,
645 INT cx
, INT cy
, UINT flags
, UINT unk1
, UINT unk2
);
646 BOOL WINAPI
NtUserDeleteMenu( HMENU menu
, UINT id
, UINT flags
);
647 BOOL WINAPI
NtUserDestroyAcceleratorTable( HACCEL handle
);
648 BOOL WINAPI
NtUserDestroyCursor( HCURSOR cursor
, ULONG arg
);
649 BOOL WINAPI
NtUserDestroyInputContext( HIMC handle
);
650 BOOL WINAPI
NtUserDestroyMenu( HMENU menu
);
651 BOOL WINAPI
NtUserDestroyWindow( HWND hwnd
);
652 BOOL WINAPI
NtUserDisableThreadIme( DWORD thread_id
);
653 LRESULT WINAPI
NtUserDispatchMessage( const MSG
*msg
);
654 BOOL WINAPI
NtUserDragDetect( HWND hwnd
, int x
, int y
);
655 BOOL WINAPI
NtUserDrawCaptionTemp( HWND hwnd
, HDC hdc
, const RECT
*rect
, HFONT font
,
656 HICON icon
, const WCHAR
*str
, UINT flags
);
657 BOOL WINAPI
NtUserDrawIconEx( HDC hdc
, INT x0
, INT y0
, HICON icon
, INT width
,
658 INT height
, UINT istep
, HBRUSH hbr
, UINT flags
);
659 DWORD WINAPI
NtUserDrawMenuBarTemp( HWND hwnd
, HDC hdc
, RECT
*rect
, HMENU handle
, HFONT font
);
660 BOOL WINAPI
NtUserEmptyClipboard(void);
661 BOOL WINAPI
NtUserEnableMenuItem( HMENU handle
, UINT id
, UINT flags
);
662 BOOL WINAPI
NtUserEnableScrollBar( HWND hwnd
, UINT bar
, UINT flags
);
663 BOOL WINAPI
NtUserEndDeferWindowPosEx( HDWP hdwp
, BOOL async
);
664 BOOL WINAPI
NtUserEndMenu(void);
665 BOOL WINAPI
NtUserEndPaint( HWND hwnd
, const PAINTSTRUCT
*ps
);
666 NTSTATUS WINAPI
NtUserEnumDisplayDevices( UNICODE_STRING
*device
, DWORD index
,
667 DISPLAY_DEVICEW
*info
, DWORD flags
);
668 BOOL WINAPI
NtUserEnumDisplayMonitors( HDC hdc
, RECT
*rect
, MONITORENUMPROC proc
, LPARAM lp
);
669 BOOL WINAPI
NtUserEnumDisplaySettings( UNICODE_STRING
*device
, DWORD mode
,
670 DEVMODEW
*dev_mode
, DWORD flags
);
671 INT WINAPI
NtUserExcludeUpdateRgn( HDC hdc
, HWND hwnd
);
672 HICON WINAPI
NtUserFindExistingCursorIcon( UNICODE_STRING
*module
, UNICODE_STRING
*res_name
,
674 HWND WINAPI
NtUserFindWindowEx( HWND parent
, HWND child
, UNICODE_STRING
*class,
675 UNICODE_STRING
*title
, ULONG unk
);
676 BOOL WINAPI
NtUserFlashWindowEx( FLASHWINFO
*info
);
677 HWND WINAPI
NtUserGetAncestor( HWND hwnd
, UINT type
);
678 SHORT WINAPI
NtUserGetAsyncKeyState( INT key
);
679 ULONG WINAPI
NtUserGetAtomName( ATOM atom
, UNICODE_STRING
*name
);
680 UINT WINAPI
NtUserGetCaretBlinkTime(void);
681 BOOL WINAPI
NtUserGetCaretPos( POINT
*point
);
682 ATOM WINAPI
NtUserGetClassInfoEx( HINSTANCE instance
, UNICODE_STRING
*name
, WNDCLASSEXW
*wc
,
683 struct client_menu_name
*menu_name
, BOOL ansi
);
684 INT WINAPI
NtUserGetClassName( HWND hwnd
, BOOL real
, UNICODE_STRING
*name
);
685 HANDLE WINAPI
NtUserGetClipboardData( UINT format
, struct get_clipboard_params
*params
);
686 INT WINAPI
NtUserGetClipboardFormatName( UINT format
, WCHAR
*buffer
, INT maxlen
);
687 HWND WINAPI
NtUserGetClipboardOwner(void);
688 DWORD WINAPI
NtUserGetClipboardSequenceNumber(void);
689 HWND WINAPI
NtUserGetClipboardViewer(void);
690 HCURSOR WINAPI
NtUserGetCursor(void);
691 HCURSOR WINAPI
NtUserGetCursorFrameInfo( HCURSOR hCursor
, DWORD istep
, DWORD
*rate_jiffies
,
693 BOOL WINAPI
NtUserGetCursorInfo( CURSORINFO
*info
);
694 HDC WINAPI
NtUserGetDCEx( HWND hwnd
, HRGN clip_rgn
, DWORD flags
);
695 LONG WINAPI
NtUserGetDisplayConfigBufferSizes( UINT32 flags
, UINT32
*num_path_info
,
696 UINT32
*num_mode_info
);
697 UINT WINAPI
NtUserGetDoubleClickTime(void);
698 BOOL WINAPI
NtUserGetDpiForMonitor( HMONITOR monitor
, UINT type
, UINT
*x
, UINT
*y
);
699 HWND WINAPI
NtUserGetForegroundWindow(void);
700 BOOL WINAPI
NtUserGetGUIThreadInfo( DWORD id
, GUITHREADINFO
*info
);
701 BOOL WINAPI
NtUserGetIconInfo( HICON icon
, ICONINFO
*info
, UNICODE_STRING
*module
,
702 UNICODE_STRING
*res_name
, DWORD
*bpp
, LONG unk
);
703 BOOL WINAPI
NtUserGetIconSize( HICON handle
, UINT step
, LONG
*width
, LONG
*height
);
704 INT WINAPI
NtUserGetKeyNameText( LONG lparam
, WCHAR
*buffer
, INT size
);
705 SHORT WINAPI
NtUserGetKeyState( INT vkey
);
706 HKL WINAPI
NtUserGetKeyboardLayout( DWORD thread_id
);
707 UINT WINAPI
NtUserGetKeyboardLayoutList( INT size
, HKL
*layouts
);
708 BOOL WINAPI
NtUserGetKeyboardLayoutName( WCHAR
*name
);
709 BOOL WINAPI
NtUserGetKeyboardState( BYTE
*state
);
710 BOOL WINAPI
NtUserGetLayeredWindowAttributes( HWND hwnd
, COLORREF
*key
, BYTE
*alpha
, DWORD
*flags
);
711 BOOL WINAPI
NtUserGetMenuBarInfo( HWND hwnd
, LONG id
, LONG item
, MENUBARINFO
*info
);
712 BOOL WINAPI
NtUserGetMenuItemRect( HWND hwnd
, HMENU menu
, UINT item
, RECT
*rect
);
713 BOOL WINAPI
NtUserGetMessage( MSG
*msg
, HWND hwnd
, UINT first
, UINT last
);
714 int WINAPI
NtUserGetMouseMovePointsEx( UINT size
, MOUSEMOVEPOINT
*ptin
, MOUSEMOVEPOINT
*ptout
,
715 int count
, DWORD resolution
);
716 BOOL WINAPI
NtUserGetObjectInformation( HANDLE handle
, INT index
, void *info
,
717 DWORD len
, DWORD
*needed
);
718 HWND WINAPI
NtUserGetOpenClipboardWindow(void);
719 INT WINAPI
NtUserGetPriorityClipboardFormat( UINT
*list
, INT count
);
720 HWINSTA WINAPI
NtUserGetProcessWindowStation(void);
721 HANDLE WINAPI
NtUserGetProp( HWND hwnd
, const WCHAR
*str
);
722 ULONG WINAPI
NtUserGetProcessDpiAwarenessContext( HANDLE process
);
723 DWORD WINAPI
NtUserGetQueueStatus( UINT flags
);
724 UINT WINAPI
NtUserGetRawInputBuffer( RAWINPUT
*data
, UINT
*data_size
, UINT header_size
);
725 UINT WINAPI
NtUserGetRawInputData( HRAWINPUT rawinput
, UINT command
, void *data
, UINT
*data_size
, UINT header_size
);
726 UINT WINAPI
NtUserGetRawInputDeviceInfo( HANDLE handle
, UINT command
, void *data
, UINT
*data_size
);
727 UINT WINAPI
NtUserGetRawInputDeviceList( RAWINPUTDEVICELIST
*devices
, UINT
*device_count
, UINT size
);
728 UINT WINAPI
NtUserGetRegisteredRawInputDevices( RAWINPUTDEVICE
*devices
, UINT
*device_count
, UINT size
);
729 BOOL WINAPI
NtUserGetScrollBarInfo( HWND hwnd
, LONG id
, SCROLLBARINFO
*info
);
730 ULONG WINAPI
NtUserGetSystemDpiForProcess( HANDLE process
);
731 HMENU WINAPI
NtUserGetSystemMenu( HWND hwnd
, BOOL revert
);
732 HDESK WINAPI
NtUserGetThreadDesktop( DWORD thread
);
733 BOOL WINAPI
NtUserGetTitleBarInfo( HWND hwnd
, TITLEBARINFO
*info
);
734 INT WINAPI
NtUserGetUpdateRgn( HWND hwnd
, HRGN hrgn
, BOOL erase
);
735 BOOL WINAPI
NtUserGetUpdatedClipboardFormats( UINT
*formats
, UINT size
, UINT
*out_size
);
736 BOOL WINAPI
NtUserGetUpdateRect( HWND hwnd
, RECT
*rect
, BOOL erase
);
737 BOOL WINAPI
NtUserGetWindowPlacement( HWND hwnd
, WINDOWPLACEMENT
*placement
);
738 int WINAPI
NtUserGetWindowRgnEx( HWND hwnd
, HRGN hrgn
, UINT unk
);
739 BOOL WINAPI
NtUserHideCaret( HWND hwnd
);
740 BOOL WINAPI
NtUserHiliteMenuItem( HWND hwnd
, HMENU handle
, UINT item
, UINT hilite
);
741 NTSTATUS WINAPI
NtUserInitializeClientPfnArrays( const struct user_client_procs
*client_procsA
,
742 const struct user_client_procs
*client_procsW
,
743 const void *client_workers
, HINSTANCE user_module
);
744 HICON WINAPI
NtUserInternalGetWindowIcon( HWND hwnd
, UINT type
);
745 INT WINAPI
NtUserInternalGetWindowText( HWND hwnd
, WCHAR
*text
, INT count
);
746 BOOL WINAPI
NtUserIsClipboardFormatAvailable( UINT format
);
747 BOOL WINAPI
NtUserInvalidateRect( HWND hwnd
, const RECT
*rect
, BOOL erase
);
748 BOOL WINAPI
NtUserInvalidateRgn( HWND hwnd
, HRGN hrgn
, BOOL erase
);
749 BOOL WINAPI
NtUserKillTimer( HWND hwnd
, UINT_PTR id
);
750 BOOL WINAPI
NtUserLockWindowUpdate( HWND hwnd
);
751 UINT WINAPI
NtUserMapVirtualKeyEx( UINT code
, UINT type
, HKL layout
);
752 INT WINAPI
NtUserMenuItemFromPoint( HWND hwnd
, HMENU handle
, int x
, int y
);
753 LRESULT WINAPI
NtUserMessageCall( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
,
754 void *result_info
, DWORD type
, BOOL ansi
);
755 BOOL WINAPI
NtUserMoveWindow( HWND hwnd
, INT x
, INT y
, INT cx
, INT cy
, BOOL repaint
);
756 DWORD WINAPI
NtUserMsgWaitForMultipleObjectsEx( DWORD count
, const HANDLE
*handles
,
757 DWORD timeout
, DWORD mask
, DWORD flags
);
758 void WINAPI
NtUserNotifyWinEvent( DWORD event
, HWND hwnd
, LONG object_id
, LONG child_id
);
759 HWINSTA WINAPI
NtUserOpenWindowStation( OBJECT_ATTRIBUTES
*attr
, ACCESS_MASK access
);
760 BOOL WINAPI
NtUserSetObjectInformation( HANDLE handle
, INT index
, void *info
, DWORD len
);
761 BOOL WINAPI
NtUserOpenClipboard( HWND hwnd
, ULONG unk
);
762 HDESK WINAPI
NtUserOpenDesktop( OBJECT_ATTRIBUTES
*attr
, DWORD flags
, ACCESS_MASK access
);
763 HDESK WINAPI
NtUserOpenInputDesktop( DWORD flags
, BOOL inherit
, ACCESS_MASK access
);
764 BOOL WINAPI
NtUserPeekMessage( MSG
*msg_out
, HWND hwnd
, UINT first
, UINT last
, UINT flags
);
765 BOOL WINAPI
NtUserPostMessage( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
);
766 BOOL WINAPI
NtUserPostThreadMessage( DWORD thread
, UINT msg
, WPARAM wparam
, LPARAM lparam
);
767 UINT_PTR WINAPI
NtUserQueryInputContext( HIMC handle
, UINT attr
);
768 BOOL WINAPI
NtUserRedrawWindow( HWND hwnd
, const RECT
*rect
, HRGN hrgn
, UINT flags
);
769 ATOM WINAPI
NtUserRegisterClassExWOW( const WNDCLASSEXW
*wc
, UNICODE_STRING
*name
, UNICODE_STRING
*version
,
770 struct client_menu_name
*client_menu_name
, DWORD fnid
, DWORD flags
,
772 BOOL WINAPI
NtUserRegisterHotKey( HWND hwnd
, INT id
, UINT modifiers
, UINT vk
);
773 BOOL WINAPI
NtUserRegisterRawInputDevices( const RAWINPUTDEVICE
*devices
, UINT device_count
, UINT size
);
774 INT WINAPI
NtUserReleaseDC( HWND hwnd
, HDC hdc
);
775 BOOL WINAPI
NtUserRemoveClipboardFormatListener( HWND hwnd
);
776 BOOL WINAPI
NtUserRemoveMenu( HMENU menu
, UINT id
, UINT flags
);
777 HANDLE WINAPI
NtUserRemoveProp( HWND hwnd
, const WCHAR
*str
);
778 BOOL WINAPI
NtUserScrollDC( HDC hdc
, INT dx
, INT dy
, const RECT
*scroll
, const RECT
*clip
,
779 HRGN ret_update_rgn
, RECT
*update_rect
);
780 INT WINAPI
NtUserScrollWindowEx( HWND hwnd
, INT dx
, INT dy
, const RECT
*rect
,
781 const RECT
*clip_rect
, HRGN update_rgn
,
782 RECT
*update_rect
, UINT flags
) DECLSPEC_HIDDEN
;
783 HPALETTE WINAPI
NtUserSelectPalette( HDC hdc
, HPALETTE palette
, WORD force_background
);
784 UINT WINAPI
NtUserSendInput( UINT count
, INPUT
*inputs
, int size
);
785 HWND WINAPI
NtUserSetActiveWindow( HWND hwnd
);
786 HWND WINAPI
NtUserSetCapture( HWND hwnd
);
787 DWORD WINAPI
NtUserSetClassLong( HWND hwnd
, INT offset
, LONG newval
, BOOL ansi
);
788 ULONG_PTR WINAPI
NtUserSetClassLongPtr( HWND hwnd
, INT offset
, LONG_PTR newval
, BOOL ansi
);
789 WORD WINAPI
NtUserSetClassWord( HWND hwnd
, INT offset
, WORD newval
);
790 NTSTATUS WINAPI
NtUserSetClipboardData( UINT format
, HANDLE handle
, struct set_clipboard_params
*params
);
791 HWND WINAPI
NtUserSetClipboardViewer( HWND hwnd
);
792 HCURSOR WINAPI
NtUserSetCursor( HCURSOR cursor
);
793 BOOL WINAPI
NtUserSetCursorIconData( HCURSOR cursor
, UNICODE_STRING
*module
, UNICODE_STRING
*res_name
,
794 struct cursoricon_desc
*desc
);
795 BOOL WINAPI
NtUserSetCursorPos( INT x
, INT y
);
796 HWND WINAPI
NtUserSetFocus( HWND hwnd
);
797 void WINAPI
NtUserSetInternalWindowPos( HWND hwnd
, UINT cmd
, RECT
*rect
, POINT
*pt
);
798 BOOL WINAPI
NtUserSetKeyboardState( BYTE
*state
);
799 BOOL WINAPI
NtUserSetLayeredWindowAttributes( HWND hwnd
, COLORREF key
, BYTE alpha
, DWORD flags
);
800 BOOL WINAPI
NtUserSetMenu( HWND hwnd
, HMENU menu
);
801 BOOL WINAPI
NtUserSetMenuContextHelpId( HMENU handle
, DWORD id
);
802 BOOL WINAPI
NtUserSetMenuDefaultItem( HMENU handle
, UINT item
, UINT bypos
);
803 HWND WINAPI
NtUserSetParent( HWND hwnd
, HWND parent
);
804 BOOL WINAPI
NtUserSetProcessDpiAwarenessContext( ULONG awareness
, ULONG unknown
);
805 BOOL WINAPI
NtUserSetProcessWindowStation( HWINSTA handle
);
806 BOOL WINAPI
NtUserSetProp( HWND hwnd
, const WCHAR
*str
, HANDLE handle
);
807 INT WINAPI
NtUserSetScrollInfo( HWND hwnd
, INT bar
, const SCROLLINFO
*info
, BOOL redraw
);
808 BOOL WINAPI
NtUserSetSysColors( INT count
, const INT
*colors
, const COLORREF
*values
);
809 BOOL WINAPI
NtUserSetSystemMenu( HWND hwnd
, HMENU menu
);
810 UINT_PTR WINAPI
NtUserSetSystemTimer( HWND hwnd
, UINT_PTR id
, UINT timeout
);
811 BOOL WINAPI
NtUserSetThreadDesktop( HDESK handle
);
812 UINT_PTR WINAPI
NtUserSetTimer( HWND hwnd
, UINT_PTR id
, UINT timeout
, TIMERPROC proc
, ULONG tolerance
);
813 LONG WINAPI
NtUserSetWindowLong( HWND hwnd
, INT offset
, LONG newval
, BOOL ansi
);
814 LONG_PTR WINAPI
NtUserSetWindowLongPtr( HWND hwnd
, INT offset
, LONG_PTR newval
, BOOL ansi
);
815 BOOL WINAPI
NtUserSetWindowPlacement( HWND hwnd
, const WINDOWPLACEMENT
*wpl
);
816 BOOL WINAPI
NtUserSetWindowPos( HWND hwnd
, HWND after
, INT x
, INT y
, INT cx
, INT cy
, UINT flags
);
817 int WINAPI
NtUserSetWindowRgn( HWND hwnd
, HRGN hrgn
, BOOL redraw
);
818 WORD WINAPI
NtUserSetWindowWord( HWND hwnd
, INT offset
, WORD newval
);
819 HHOOK WINAPI
NtUserSetWindowsHookEx( HINSTANCE inst
, UNICODE_STRING
*module
, DWORD tid
, INT id
,
820 HOOKPROC proc
, BOOL ansi
);
821 HWINEVENTHOOK WINAPI
NtUserSetWinEventHook( DWORD event_min
, DWORD event_max
, HMODULE inst
,
822 UNICODE_STRING
*module
, WINEVENTPROC proc
,
823 DWORD pid
, DWORD tid
, DWORD flags
);
824 BOOL WINAPI
NtUserShowCaret( HWND hwnd
);
825 INT WINAPI
NtUserShowCursor( BOOL show
);
826 BOOL WINAPI
NtUserShowScrollBar( HWND hwnd
, INT bar
, BOOL show
);
827 BOOL WINAPI
NtUserShowWindow( HWND hwnd
, INT cmd
);
828 BOOL WINAPI
NtUserShowWindowAsync( HWND hwnd
, INT cmd
);
829 BOOL WINAPI
NtUserSystemParametersInfo( UINT action
, UINT val
, void *ptr
, UINT winini
);
830 BOOL WINAPI
NtUserSystemParametersInfoForDpi( UINT action
, UINT val
, PVOID ptr
, UINT winini
, UINT dpi
);
831 BOOL WINAPI
NtUserThunkedMenuInfo( HMENU menu
, const MENUINFO
*info
);
832 UINT WINAPI
NtUserThunkedMenuItemInfo( HMENU menu
, UINT pos
, UINT flags
, UINT method
,
833 MENUITEMINFOW
*info
, UNICODE_STRING
*str
);
834 INT WINAPI
NtUserToUnicodeEx( UINT virt
, UINT scan
, const BYTE
*state
,
835 WCHAR
*str
, int size
, UINT flags
, HKL layout
);
836 BOOL WINAPI
NtUserTrackMouseEvent( TRACKMOUSEEVENT
*info
);
837 BOOL WINAPI
NtUserTrackPopupMenuEx( HMENU handle
, UINT flags
, INT x
, INT y
, HWND hwnd
, TPMPARAMS
*params
);
838 INT WINAPI
NtUserTranslateAccelerator( HWND hwnd
, HACCEL accel
, MSG
*msg
);
839 BOOL WINAPI
NtUserTranslateMessage( const MSG
*msg
, UINT flags
);
840 BOOL WINAPI
NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook
);
841 BOOL WINAPI
NtUserUnhookWindowsHookEx( HHOOK handle
);
842 BOOL WINAPI
NtUserUnregisterClass( UNICODE_STRING
*name
, HINSTANCE instance
,
843 struct client_menu_name
*client_menu_name
);
844 BOOL WINAPI
NtUserUnregisterHotKey( HWND hwnd
, INT id
);
845 BOOL WINAPI
NtUserUpdateInputContext( HIMC handle
, UINT attr
, UINT_PTR value
);
846 BOOL WINAPI
NtUserUpdateLayeredWindow( HWND hwnd
, HDC hdc_dst
, const POINT
*pts_dst
, const SIZE
*size
,
847 HDC hdc_src
, const POINT
*pts_src
, COLORREF key
,
848 const BLENDFUNCTION
*blend
, DWORD flags
, const RECT
*dirty
);
849 WORD WINAPI
NtUserVkKeyScanEx( WCHAR chr
, HKL layout
);
850 DWORD WINAPI
NtUserWaitForInputIdle( HANDLE process
, DWORD timeout
, BOOL wow
);
851 HWND WINAPI
NtUserWindowFromDC( HDC hdc
);
852 HWND WINAPI
NtUserWindowFromPoint( LONG x
, LONG y
);
854 /* NtUserCallNoParam codes, not compatible with Windows */
857 NtUserCallNoParam_DestroyCaret
,
858 NtUserCallNoParam_GetDesktopWindow
,
859 NtUserCallNoParam_GetDialogBaseUnits
,
860 NtUserCallNoParam_GetInputState
,
861 NtUserCallNoParam_GetProcessDefaultLayout
,
862 NtUserCallNoParam_ReleaseCapture
,
863 /* temporary exports */
868 static inline BOOL
NtUserDestroyCaret(void)
870 return NtUserCallNoParam( NtUserCallNoParam_DestroyCaret
);
873 static inline HWND
NtUserGetDesktopWindow(void)
875 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetDesktopWindow
));
878 static inline DWORD
NtUserGetDialogBaseUnits(void)
880 return NtUserCallNoParam( NtUserCallNoParam_GetDialogBaseUnits
);
883 static inline BOOL
NtUserGetInputState(void)
885 return NtUserCallNoParam( NtUserCallNoParam_GetInputState
);
888 static inline DWORD
NtUserGetProcessDefaultLayout(void)
890 return NtUserCallNoParam( NtUserCallNoParam_GetProcessDefaultLayout
);
893 static inline BOOL
NtUserReleaseCapture(void)
895 return NtUserCallNoParam( NtUserCallNoParam_ReleaseCapture
);
898 /* NtUserCallOneParam codes, not compatible with Windows */
901 NtUserCallOneParam_BeginDeferWindowPos
,
902 NtUserCallOneParam_CreateCursorIcon
,
903 NtUserCallOneParam_CreateMenu
,
904 NtUserCallOneParam_DispatchMessageA
,
905 NtUserCallOneParam_EnableDC
,
906 NtUserCallOneParam_EnableThunkLock
,
907 NtUserCallOneParam_EnumClipboardFormats
,
908 NtUserCallOneParam_GetClipCursor
,
909 NtUserCallOneParam_GetCursorPos
,
910 NtUserCallOneParam_GetIconParam
,
911 NtUserCallOneParam_GetMenuItemCount
,
912 NtUserCallOneParam_GetPrimaryMonitorRect
,
913 NtUserCallOneParam_GetSysColor
,
914 NtUserCallOneParam_GetSysColorBrush
,
915 NtUserCallOneParam_GetSysColorPen
,
916 NtUserCallOneParam_GetSystemMetrics
,
917 NtUserCallOneParam_GetVirtualScreenRect
,
918 NtUserCallOneParam_IsWindowRectFullScreen
,
919 NtUserCallOneParam_MessageBeep
,
920 NtUserCallOneParam_RealizePalette
,
921 NtUserCallOneParam_SetCaretBlinkTime
,
922 NtUserCallOneParam_SetProcessDefaultLayout
,
923 /* temporary exports */
924 NtUserGetDeskPattern
,
928 NtUserSpyGetVKeyName
,
931 static inline HDWP
NtUserBeginDeferWindowPos( INT count
)
933 return UlongToHandle( NtUserCallOneParam( count
, NtUserCallOneParam_BeginDeferWindowPos
));
936 static inline HICON
NtUserCreateCursorIcon( BOOL is_icon
)
938 return UlongToHandle( NtUserCallOneParam( is_icon
, NtUserCallOneParam_CreateCursorIcon
));
941 static inline HMENU
NtUserCreateMenu( BOOL is_popup
)
943 return UlongToHandle( NtUserCallOneParam( is_popup
, NtUserCallOneParam_CreateMenu
));
946 static inline LRESULT
NtUserDispatchMessageA( const MSG
*msg
)
948 return NtUserCallOneParam( (UINT_PTR
)msg
, NtUserCallOneParam_DispatchMessageA
);
951 static inline WORD
NtUserEnableDC( HDC hdc
)
953 return NtUserCallOneParam( HandleToUlong(hdc
), NtUserCallOneParam_EnableDC
);
956 static inline void NtUserEnableThunkLock( BOOL enable
)
958 NtUserCallOneParam( enable
, NtUserCallOneParam_EnableThunkLock
);
961 static inline UINT
NtUserEnumClipboardFormats( UINT format
)
963 return NtUserCallOneParam( format
, NtUserCallOneParam_EnumClipboardFormats
);
966 static inline BOOL
NtUserGetClipCursor( RECT
*rect
)
968 return NtUserCallOneParam( (UINT_PTR
)rect
, NtUserCallOneParam_GetClipCursor
);
971 static inline BOOL
NtUserGetCursorPos( POINT
*pt
)
973 return NtUserCallOneParam( (UINT_PTR
)pt
, NtUserCallOneParam_GetCursorPos
);
976 static inline UINT_PTR
NtUserGetIconParam( HICON icon
)
978 return NtUserCallOneParam( HandleToUlong(icon
), NtUserCallOneParam_GetIconParam
);
981 static inline UINT_PTR
NtUserGetMenuItemCount( HMENU menu
)
983 return NtUserCallOneParam( HandleToUlong(menu
), NtUserCallOneParam_GetMenuItemCount
);
986 static inline RECT
NtUserGetPrimaryMonitorRect(void)
989 NtUserCallOneParam( (UINT_PTR
)&primary
, NtUserCallOneParam_GetPrimaryMonitorRect
);
993 static inline BOOL
NtUserSetCaretBlinkTime( unsigned int time
)
995 return NtUserCallOneParam( time
, NtUserCallOneParam_SetCaretBlinkTime
);
998 static inline COLORREF
NtUserGetSysColor( INT index
)
1000 return NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColor
);
1003 static inline HBRUSH
NtUserGetSysColorBrush( INT index
)
1005 return UlongToHandle( NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColorBrush
));
1008 static inline HPEN
NtUserGetSysColorPen( INT index
)
1010 return UlongToHandle( NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColorPen
));
1013 static inline INT
NtUserGetSystemMetrics( INT index
)
1015 return NtUserCallOneParam( index
, NtUserCallOneParam_GetSystemMetrics
);
1018 static inline RECT
NtUserGetVirtualScreenRect(void)
1021 NtUserCallOneParam( (UINT_PTR
)&virtual, NtUserCallOneParam_GetVirtualScreenRect
);
1025 static inline BOOL
NtUserIsWindowRectFullScreen( const RECT
*rect
)
1027 return NtUserCallOneParam( (UINT_PTR
)rect
, NtUserCallOneParam_IsWindowRectFullScreen
);
1030 static inline BOOL
NtUserMessageBeep( UINT i
)
1032 return NtUserCallOneParam( i
, NtUserCallOneParam_MessageBeep
);
1035 static inline UINT
NtUserRealizePalette( HDC hdc
)
1037 return NtUserCallOneParam( HandleToUlong(hdc
), NtUserCallOneParam_RealizePalette
);
1040 static inline UINT
NtUserSetProcessDefaultLayout( DWORD layout
)
1042 return NtUserCallOneParam( layout
, NtUserCallOneParam_SetProcessDefaultLayout
);
1045 /* NtUserCallTwoParam codes, not compatible with Windows */
1048 NtUserCallTwoParam_GetMenuInfo
,
1049 NtUserCallTwoParam_GetMonitorInfo
,
1050 NtUserCallTwoParam_GetSystemMetricsForDpi
,
1051 NtUserCallTwoParam_MonitorFromRect
,
1052 NtUserCallTwoParam_ReplyMessage
,
1053 NtUserCallTwoParam_SetCaretPos
,
1054 NtUserCallTwoParam_SetIconParam
,
1055 NtUserCallTwoParam_UnhookWindowsHook
,
1056 /* temporary exports */
1061 static inline BOOL
NtUserGetMenuInfo( HMENU menu
, MENUINFO
*info
)
1063 return NtUserCallTwoParam( HandleToUlong(menu
), (ULONG_PTR
)info
,
1064 NtUserCallTwoParam_GetMenuInfo
);
1067 static inline BOOL
NtUserGetMonitorInfo( HMONITOR monitor
, MONITORINFO
*info
)
1069 return NtUserCallTwoParam( HandleToUlong(monitor
), (ULONG_PTR
)info
,
1070 NtUserCallTwoParam_GetMonitorInfo
);
1073 static inline INT
NtUserGetSystemMetricsForDpi( INT index
, UINT dpi
)
1075 return NtUserCallTwoParam( index
, dpi
, NtUserCallTwoParam_GetSystemMetricsForDpi
);
1078 static inline HMONITOR
NtUserMonitorFromRect( const RECT
*rect
, DWORD flags
)
1080 ULONG ret
= NtUserCallTwoParam( (LONG_PTR
)rect
, flags
, NtUserCallTwoParam_MonitorFromRect
);
1081 return UlongToHandle( ret
);
1084 static inline BOOL
NtUserReplyMessage( LRESULT result
, MSG
*msg
)
1086 return NtUserCallTwoParam( result
, (UINT_PTR
)msg
, NtUserCallTwoParam_ReplyMessage
);
1089 static inline BOOL
NtUserSetCaretPos( int x
, int y
)
1091 return NtUserCallTwoParam( x
, y
, NtUserCallTwoParam_SetCaretPos
);
1094 static inline UINT_PTR
NtUserSetIconParam( HICON icon
, ULONG_PTR param
)
1096 return NtUserCallTwoParam( HandleToUlong(icon
), param
, NtUserCallTwoParam_SetIconParam
);
1099 static inline BOOL
NtUserUnhookWindowsHook( INT id
, HOOKPROC proc
)
1101 return NtUserCallTwoParam( id
, (UINT_PTR
)proc
, NtUserCallTwoParam_UnhookWindowsHook
);
1104 /* NtUserCallHwnd codes, not compatible with Windows */
1107 NtUserCallHwnd_ArrangeIconicWindows
,
1108 NtUserCallHwnd_DrawMenuBar
,
1109 NtUserCallHwnd_GetDefaultImeWindow
,
1110 NtUserCallHwnd_GetDpiForWindow
,
1111 NtUserCallHwnd_GetParent
,
1112 NtUserCallHwnd_GetWindowContextHelpId
,
1113 NtUserCallHwnd_GetWindowDpiAwarenessContext
,
1114 NtUserCallHwnd_GetWindowInputContext
,
1115 NtUserCallHwnd_GetWindowTextLength
,
1116 NtUserCallHwnd_IsWindow
,
1117 NtUserCallHwnd_IsWindowEnabled
,
1118 NtUserCallHwnd_IsWindowUnicode
,
1119 NtUserCallHwnd_IsWindowVisible
,
1120 NtUserCallHwnd_SetForegroundWindow
,
1123 static inline UINT
NtUserArrangeIconicWindows( HWND parent
)
1125 return NtUserCallHwnd( parent
, NtUserCallHwnd_ArrangeIconicWindows
);
1128 static inline BOOL
NtUserDrawMenuBar( HWND hwnd
)
1130 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_DrawMenuBar
);
1133 static inline DWORD
NtUserGetWindowContextHelpId( HWND hwnd
)
1135 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowContextHelpId
);
1138 static inline HWND
NtUserGetDefaultImeWindow( HWND hwnd
)
1140 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDefaultImeWindow
));
1143 static inline UINT
NtUserGetDpiForWindow( HWND hwnd
)
1145 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDpiForWindow
);
1148 static inline HWND
NtUserGetParent( HWND hwnd
)
1150 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetParent
));
1153 static inline DPI_AWARENESS_CONTEXT
NtUserGetWindowDpiAwarenessContext( HWND hwnd
)
1155 return (DPI_AWARENESS_CONTEXT
)NtUserCallHwnd( hwnd
,
1156 NtUserCallHwnd_GetWindowDpiAwarenessContext
);
1159 static inline HIMC
NtUserGetWindowInputContext( HWND hwnd
)
1161 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowInputContext
));
1164 static inline INT
NtUserGetWindowTextLength( HWND hwnd
)
1166 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowTextLength
);
1169 static inline BOOL
NtUserIsWindow( HWND hwnd
)
1171 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindow
);
1174 static inline BOOL
NtUserIsWindowEnabled( HWND hwnd
)
1176 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowEnabled
);
1179 static inline BOOL
NtUserIsWindowUnicode( HWND hwnd
)
1181 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowUnicode
);
1184 static inline BOOL
NtUserIsWindowVisible( HWND hwnd
)
1186 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowVisible
);
1189 static inline BOOL
NtUserSetForegroundWindow( HWND hwnd
)
1191 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_SetForegroundWindow
);
1194 /* NtUserCallHwndParam codes, not compatible with Windows */
1197 NtUserCallHwndParam_ClientToScreen
,
1198 NtUserCallHwndParam_EnableWindow
,
1199 NtUserCallHwndParam_GetClassLongA
,
1200 NtUserCallHwndParam_GetClassLongW
,
1201 NtUserCallHwndParam_GetClassLongPtrA
,
1202 NtUserCallHwndParam_GetClassLongPtrW
,
1203 NtUserCallHwndParam_GetClassWord
,
1204 NtUserCallHwndParam_GetClientRect
,
1205 NtUserCallHwndParam_GetScrollInfo
,
1206 NtUserCallHwndParam_GetWindowInfo
,
1207 NtUserCallHwndParam_GetWindowLongA
,
1208 NtUserCallHwndParam_GetWindowLongW
,
1209 NtUserCallHwndParam_GetWindowLongPtrA
,
1210 NtUserCallHwndParam_GetWindowLongPtrW
,
1211 NtUserCallHwndParam_GetWindowRect
,
1212 NtUserCallHwndParam_GetWindowRelative
,
1213 NtUserCallHwndParam_GetWindowThread
,
1214 NtUserCallHwndParam_GetWindowWord
,
1215 NtUserCallHwndParam_IsChild
,
1216 NtUserCallHwndParam_KillSystemTimer
,
1217 NtUserCallHwndParam_MapWindowPoints
,
1218 NtUserCallHwndParam_MirrorRgn
,
1219 NtUserCallHwndParam_MonitorFromWindow
,
1220 NtUserCallHwndParam_ScreenToClient
,
1221 NtUserCallHwndParam_SetWindowContextHelpId
,
1222 NtUserCallHwndParam_SetWindowPixelFormat
,
1223 NtUserCallHwndParam_ShowOwnedPopups
,
1224 /* temporary exports */
1225 NtUserSetWindowStyle
,
1226 NtUserSpyGetMsgName
,
1229 static inline BOOL
NtUserClientToScreen( HWND hwnd
, POINT
*pt
)
1231 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)pt
, NtUserCallHwndParam_ClientToScreen
);
1234 static inline BOOL
NtUserEnableWindow( HWND hwnd
, BOOL enable
)
1236 return NtUserCallHwndParam( hwnd
, enable
, NtUserCallHwndParam_EnableWindow
);
1239 static inline DWORD
NtUserGetClassLongA( HWND hwnd
, INT offset
)
1241 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongA
);
1244 static inline ULONG_PTR
NtUserGetClassLongPtrA( HWND hwnd
, INT offset
)
1246 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongPtrA
);
1249 static inline ULONG_PTR
NtUserGetClassLongPtrW( HWND hwnd
, INT offset
)
1251 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongPtrW
);
1254 static inline DWORD
NtUserGetClassLongW( HWND hwnd
, INT offset
)
1256 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongW
);
1259 static inline WORD
NtUserGetClassWord( HWND hwnd
, INT offset
)
1261 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassWord
);
1264 static inline BOOL
NtUserGetClientRect( HWND hwnd
, RECT
*rect
)
1266 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)rect
, NtUserCallHwndParam_GetClientRect
);
1269 struct get_scroll_info_params
1275 static inline BOOL
NtUserGetScrollInfo( HWND hwnd
, INT bar
, SCROLLINFO
*info
)
1277 struct get_scroll_info_params params
= { .bar
= bar
, .info
= info
};
1278 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)¶ms
, NtUserCallHwndParam_GetScrollInfo
);
1281 static inline BOOL
NtUserGetWindowInfo( HWND hwnd
, WINDOWINFO
*info
)
1283 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)info
, NtUserCallHwndParam_GetWindowInfo
);
1286 static inline LONG
NtUserGetWindowLongA( HWND hwnd
, INT offset
)
1288 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongA
);
1291 static inline LONG_PTR
NtUserGetWindowLongPtrA( HWND hwnd
, INT offset
)
1293 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongPtrA
);
1296 static inline LONG_PTR
NtUserGetWindowLongPtrW( HWND hwnd
, INT offset
)
1298 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongPtrW
);
1301 static inline LONG
NtUserGetWindowLongW( HWND hwnd
, INT offset
)
1303 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongW
);
1306 static inline BOOL
NtUserGetWindowRect( HWND hwnd
, RECT
*rect
)
1308 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)rect
, NtUserCallHwndParam_GetWindowRect
);
1311 static inline HWND
NtUserGetWindowRelative( HWND hwnd
, UINT rel
)
1313 return UlongToHandle( NtUserCallHwndParam( hwnd
, rel
,
1314 NtUserCallHwndParam_GetWindowRelative
));
1317 static inline DWORD
NtUserGetWindowThread( HWND hwnd
, DWORD
*process
)
1319 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)process
, NtUserCallHwndParam_GetWindowThread
);
1322 static inline WORD
NtUserGetWindowWord( HWND hwnd
, INT offset
)
1324 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowWord
);
1327 static inline BOOL
NtUserIsChild( HWND parent
, HWND child
)
1329 return NtUserCallHwndParam( parent
, HandleToUlong(child
), NtUserCallHwndParam_IsChild
);
1332 static inline BOOL
NtUserKillSystemTimer( HWND hwnd
, UINT_PTR id
)
1334 return NtUserCallHwndParam( hwnd
, id
, NtUserCallHwndParam_KillSystemTimer
);
1337 struct map_window_points_params
1344 static inline int NtUserMapWindowPoints( HWND hwnd_from
, HWND hwnd_to
, POINT
*points
, UINT count
)
1346 struct map_window_points_params params
;
1347 params
.hwnd_to
= hwnd_to
;
1348 params
.points
= points
;
1349 params
.count
= count
;
1350 return NtUserCallHwndParam( hwnd_from
, (UINT_PTR
)¶ms
,
1351 NtUserCallHwndParam_MapWindowPoints
);
1354 static inline BOOL
NtUserMirrorRgn( HWND hwnd
, HRGN hrgn
)
1356 return NtUserCallHwndParam( hwnd
, HandleToUlong(hrgn
), NtUserCallHwndParam_MirrorRgn
);
1359 static inline HMONITOR
NtUserMonitorFromWindow( HWND hwnd
, DWORD flags
)
1361 ULONG ret
= NtUserCallHwndParam( hwnd
, flags
, NtUserCallHwndParam_MonitorFromWindow
);
1362 return UlongToHandle( ret
);
1365 static inline BOOL
NtUserScreenToClient( HWND hwnd
, POINT
*pt
)
1367 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)pt
, NtUserCallHwndParam_ScreenToClient
);
1370 static inline BOOL
NtUserSetWindowContextHelpId( HWND hwnd
, DWORD id
)
1372 return NtUserCallHwndParam( hwnd
, id
, NtUserCallHwndParam_SetWindowContextHelpId
);
1375 static inline BOOL
NtUserSetWindowPixelFormat( HWND hwnd
, int format
)
1377 return NtUserCallHwndParam( hwnd
, format
, NtUserCallHwndParam_SetWindowPixelFormat
);
1380 static inline BOOL
NtUserShowOwnedPopups( HWND hwnd
, BOOL show
)
1382 return NtUserCallHwndParam( hwnd
, show
, NtUserCallHwndParam_ShowOwnedPopups
);
1385 #endif /* _NTUSER_ */