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 NtUserGetDispatchParams
= 0x3001,
280 NtUserSpyEnter
= 0x0302,
281 NtUserSpyExit
= 0x0303,
284 /* NtUserThunkedMenuItemInfo codes */
287 NtUserSetMenuItemInfo
,
288 NtUserInsertMenuItem
,
289 /* Wine extensions */
290 NtUserCheckMenuRadioItem
,
291 NtUserGetMenuDefaultItem
,
293 NtUserGetMenuItemInfoA
,
294 NtUserGetMenuItemInfoW
,
299 struct send_message_timeout_params
306 struct send_message_callback_params
308 SENDASYNCPROC callback
;
312 /* color index used to retrieve system 55aa brush */
313 #define COLOR_55AA_BRUSH 0x100
315 /* user object types */
316 #define NTUSER_OBJ_WINDOW 0x01
317 #define NTUSER_OBJ_MENU 0x02
318 #define NTUSER_OBJ_ICON 0x03
319 #define NTUSER_OBJ_WINPOS 0x04
320 #define NTUSER_OBJ_ACCEL 0x08
321 #define NTUSER_OBJ_HOOK 0x0f
322 #define NTUSER_OBJ_IMC 0x11
324 /* NtUserScrollWindowEx flag */
325 #define SW_NODCCACHE 0x8000
327 /* NtUserSetScrollInfo flag */
328 #define SIF_RETURNPREV 0x1000
330 /* NtUserInitializeClientPfnArrays parameter, not compatible with Windows */
331 struct user_client_procs
333 WNDPROC pButtonWndProc
;
334 WNDPROC pComboWndProc
;
335 WNDPROC pDefWindowProc
;
337 WNDPROC pEditWndProc
;
338 WNDPROC pListBoxWndProc
;
339 WNDPROC pMDIClientWndProc
;
340 WNDPROC pScrollBarWndProc
;
341 WNDPROC pStaticWndProc
;
343 WNDPROC pDesktopWndProc
;
344 WNDPROC pIconTitleWndProc
;
345 WNDPROC pPopupMenuWndProc
;
346 WNDPROC pMessageWndProc
;
349 /* NtUserSetCursorIconData parameter, not compatible with Windows */
350 struct cursoricon_frame
352 UINT width
; /* frame-specific width */
353 UINT height
; /* frame-specific height */
354 HBITMAP color
; /* color bitmap */
355 HBITMAP alpha
; /* pre-multiplied alpha bitmap for 32-bpp icons */
356 HBITMAP mask
; /* mask bitmap (followed by color for 1-bpp icons) */
360 struct cursoricon_desc
366 struct cursoricon_frame
*frames
;
372 struct client_menu_name
376 UNICODE_STRING
*nameUS
;
379 /* NtUserGetClipboardData params, not compatible with Windows */
380 struct get_clipboard_params
389 /* NtUserSetClipboardData params, not compatible with Windows */
390 struct set_clipboard_params
398 /* NtUserDrawScrollBar params */
399 struct draw_scroll_bar_params
405 struct SCROLL_TRACKING_INFO tracking_info
;
416 /* NtUserUpdateInputContext param, not compatible with Window */
417 enum input_context_attr
419 NtUserInputContextClientPtr
,
420 NtUserInputContextThreadId
,
423 /* NtUserAssociateInputContext result */
424 enum associate_input_context_result
431 /* internal messages codes */
432 enum wine_internal_message
434 WM_WINE_DESTROYWINDOW
= 0x80000000,
435 WM_WINE_SETWINDOWPOS
,
438 WM_WINE_SETWINDOWLONG
,
440 WM_WINE_SETACTIVEWINDOW
,
441 WM_WINE_KEYBOARD_LL_HOOK
,
442 WM_WINE_MOUSE_LL_HOOK
,
444 WM_WINE_UPDATEWINDOWSTATE
,
445 WM_WINE_FIRST_DRIVER_MSG
= 0x80001000, /* range of messages reserved for the USER driver */
446 WM_WINE_LAST_DRIVER_MSG
= 0x80001fff
449 /* internal IME message */
450 #define WM_IME_INTERNAL 0x287
451 #define IME_INTERNAL_ACTIVATE 0x17
452 #define IME_INTERNAL_DEACTIVATE 0x18
454 /* the various structures that can be sent in messages, in platform-independent layout */
455 struct packed_CREATESTRUCTW
457 ULONGLONG lpCreateParams
;
474 struct packed_DRAWITEMSTRUCT
489 struct packed_MEASUREITEMSTRUCT
499 struct packed_DELETEITEMSTRUCT
509 struct packed_COMPAREITEMSTRUCT
523 struct packed_WINDOWPOS
527 UINT hwndInsertAfter
;
537 struct packed_COPYDATASTRUCT
544 struct packed_HELPINFO
551 ULONGLONG dwContextId
;
555 struct packed_NCCALCSIZE_PARAMS
561 UINT hwndInsertAfter
;
583 struct packed_MDINEXTMENU
593 struct packed_MDICREATESTRUCTW
607 HKL WINAPI
NtUserActivateKeyboardLayout( HKL layout
, UINT flags
);
608 BOOL WINAPI
NtUserAddClipboardFormatListener( HWND hwnd
);
609 UINT WINAPI
NtUserAssociateInputContext( HWND hwnd
, HIMC ctx
, ULONG flags
);
610 BOOL WINAPI
NtUserAttachThreadInput( DWORD from
, DWORD to
, BOOL attach
);
611 HDC WINAPI
NtUserBeginPaint( HWND hwnd
, PAINTSTRUCT
*ps
);
612 NTSTATUS WINAPI
NtUserBuildHwndList( HDESK desktop
, ULONG unk2
, ULONG unk3
, ULONG unk4
,
613 ULONG thread_id
, ULONG count
, HWND
*buffer
, ULONG
*size
);
614 ULONG_PTR WINAPI
NtUserCallHwnd( HWND hwnd
, DWORD code
);
615 ULONG_PTR WINAPI
NtUserCallHwndParam( HWND hwnd
, DWORD_PTR param
, DWORD code
);
616 LRESULT WINAPI
NtUserCallNextHookEx( HHOOK hhook
, INT code
, WPARAM wparam
, LPARAM lparam
);
617 BOOL WINAPI
NtUserCallMsgFilter( MSG
*msg
, INT code
);
618 ULONG_PTR WINAPI
NtUserCallNoParam( ULONG code
);
619 ULONG_PTR WINAPI
NtUserCallOneParam( ULONG_PTR arg
, ULONG code
);
620 ULONG_PTR WINAPI
NtUserCallTwoParam( ULONG_PTR arg1
, ULONG_PTR arg2
, ULONG code
);
621 BOOL WINAPI
NtUserChangeClipboardChain( HWND hwnd
, HWND next
);
622 LONG WINAPI
NtUserChangeDisplaySettings( UNICODE_STRING
*devname
, DEVMODEW
*devmode
, HWND hwnd
,
623 DWORD flags
, void *lparam
);
624 DWORD WINAPI
NtUserCheckMenuItem( HMENU handle
, UINT id
, UINT flags
);
625 HWND WINAPI
NtUserChildWindowFromPointEx( HWND parent
, LONG x
, LONG y
, UINT flags
);
626 BOOL WINAPI
NtUserClipCursor( const RECT
*rect
);
627 BOOL WINAPI
NtUserCloseClipboard(void);
628 BOOL WINAPI
NtUserCloseDesktop( HDESK handle
);
629 BOOL WINAPI
NtUserCloseWindowStation( HWINSTA handle
);
630 INT WINAPI
NtUserCopyAcceleratorTable( HACCEL src
, ACCEL
*dst
, INT count
);
631 INT WINAPI
NtUserCountClipboardFormats(void);
632 HACCEL WINAPI
NtUserCreateAcceleratorTable( ACCEL
*table
, INT count
);
633 BOOL WINAPI
NtUserCreateCaret( HWND hwnd
, HBITMAP bitmap
, int width
, int height
);
634 HDESK WINAPI
NtUserCreateDesktopEx( OBJECT_ATTRIBUTES
*attr
, UNICODE_STRING
*device
,
635 DEVMODEW
*devmode
, DWORD flags
, ACCESS_MASK access
,
637 HIMC WINAPI
NtUserCreateInputContext( UINT_PTR client_ptr
);
638 HWND WINAPI
NtUserCreateWindowEx( DWORD ex_style
, UNICODE_STRING
*class_name
,
639 UNICODE_STRING
*version
, UNICODE_STRING
*window_name
,
640 DWORD style
, INT x
, INT y
, INT cx
, INT cy
,
641 HWND parent
, HMENU menu
, HINSTANCE instance
, void *params
,
642 DWORD flags
, CBT_CREATEWNDW
*cbtc
, DWORD unk
, BOOL ansi
);
643 HWINSTA WINAPI
NtUserCreateWindowStation( OBJECT_ATTRIBUTES
*attr
, ACCESS_MASK mask
, ULONG arg3
,
644 ULONG arg4
, ULONG arg5
, ULONG arg6
, ULONG arg7
);
645 HDWP WINAPI
NtUserDeferWindowPosAndBand( HDWP hdwp
, HWND hwnd
, HWND after
, INT x
, INT y
,
646 INT cx
, INT cy
, UINT flags
, UINT unk1
, UINT unk2
);
647 BOOL WINAPI
NtUserDeleteMenu( HMENU menu
, UINT id
, UINT flags
);
648 BOOL WINAPI
NtUserDestroyAcceleratorTable( HACCEL handle
);
649 BOOL WINAPI
NtUserDestroyCursor( HCURSOR cursor
, ULONG arg
);
650 BOOL WINAPI
NtUserDestroyInputContext( HIMC handle
);
651 BOOL WINAPI
NtUserDestroyMenu( HMENU menu
);
652 BOOL WINAPI
NtUserDestroyWindow( HWND hwnd
);
653 BOOL WINAPI
NtUserDisableThreadIme( DWORD thread_id
);
654 LRESULT WINAPI
NtUserDispatchMessage( const MSG
*msg
);
655 BOOL WINAPI
NtUserDragDetect( HWND hwnd
, int x
, int y
);
656 BOOL WINAPI
NtUserDrawCaptionTemp( HWND hwnd
, HDC hdc
, const RECT
*rect
, HFONT font
,
657 HICON icon
, const WCHAR
*str
, UINT flags
);
658 BOOL WINAPI
NtUserDrawIconEx( HDC hdc
, INT x0
, INT y0
, HICON icon
, INT width
,
659 INT height
, UINT istep
, HBRUSH hbr
, UINT flags
);
660 DWORD WINAPI
NtUserDrawMenuBarTemp( HWND hwnd
, HDC hdc
, RECT
*rect
, HMENU handle
, HFONT font
);
661 BOOL WINAPI
NtUserEmptyClipboard(void);
662 BOOL WINAPI
NtUserEnableMenuItem( HMENU handle
, UINT id
, UINT flags
);
663 BOOL WINAPI
NtUserEnableScrollBar( HWND hwnd
, UINT bar
, UINT flags
);
664 BOOL WINAPI
NtUserEndDeferWindowPosEx( HDWP hdwp
, BOOL async
);
665 BOOL WINAPI
NtUserEndMenu(void);
666 BOOL WINAPI
NtUserEndPaint( HWND hwnd
, const PAINTSTRUCT
*ps
);
667 NTSTATUS WINAPI
NtUserEnumDisplayDevices( UNICODE_STRING
*device
, DWORD index
,
668 DISPLAY_DEVICEW
*info
, DWORD flags
);
669 BOOL WINAPI
NtUserEnumDisplayMonitors( HDC hdc
, RECT
*rect
, MONITORENUMPROC proc
, LPARAM lp
);
670 BOOL WINAPI
NtUserEnumDisplaySettings( UNICODE_STRING
*device
, DWORD mode
,
671 DEVMODEW
*dev_mode
, DWORD flags
);
672 INT WINAPI
NtUserExcludeUpdateRgn( HDC hdc
, HWND hwnd
);
673 HICON WINAPI
NtUserFindExistingCursorIcon( UNICODE_STRING
*module
, UNICODE_STRING
*res_name
,
675 HWND WINAPI
NtUserFindWindowEx( HWND parent
, HWND child
, UNICODE_STRING
*class,
676 UNICODE_STRING
*title
, ULONG unk
);
677 BOOL WINAPI
NtUserFlashWindowEx( FLASHWINFO
*info
);
678 HWND WINAPI
NtUserGetAncestor( HWND hwnd
, UINT type
);
679 SHORT WINAPI
NtUserGetAsyncKeyState( INT key
);
680 ULONG WINAPI
NtUserGetAtomName( ATOM atom
, UNICODE_STRING
*name
);
681 UINT WINAPI
NtUserGetCaretBlinkTime(void);
682 BOOL WINAPI
NtUserGetCaretPos( POINT
*point
);
683 ATOM WINAPI
NtUserGetClassInfoEx( HINSTANCE instance
, UNICODE_STRING
*name
, WNDCLASSEXW
*wc
,
684 struct client_menu_name
*menu_name
, BOOL ansi
);
685 INT WINAPI
NtUserGetClassName( HWND hwnd
, BOOL real
, UNICODE_STRING
*name
);
686 HANDLE WINAPI
NtUserGetClipboardData( UINT format
, struct get_clipboard_params
*params
);
687 INT WINAPI
NtUserGetClipboardFormatName( UINT format
, WCHAR
*buffer
, INT maxlen
);
688 HWND WINAPI
NtUserGetClipboardOwner(void);
689 DWORD WINAPI
NtUserGetClipboardSequenceNumber(void);
690 HWND WINAPI
NtUserGetClipboardViewer(void);
691 HCURSOR WINAPI
NtUserGetCursor(void);
692 HCURSOR WINAPI
NtUserGetCursorFrameInfo( HCURSOR hCursor
, DWORD istep
, DWORD
*rate_jiffies
,
694 BOOL WINAPI
NtUserGetCursorInfo( CURSORINFO
*info
);
695 HDC WINAPI
NtUserGetDCEx( HWND hwnd
, HRGN clip_rgn
, DWORD flags
);
696 LONG WINAPI
NtUserGetDisplayConfigBufferSizes( UINT32 flags
, UINT32
*num_path_info
,
697 UINT32
*num_mode_info
);
698 UINT WINAPI
NtUserGetDoubleClickTime(void);
699 BOOL WINAPI
NtUserGetDpiForMonitor( HMONITOR monitor
, UINT type
, UINT
*x
, UINT
*y
);
700 HWND WINAPI
NtUserGetForegroundWindow(void);
701 BOOL WINAPI
NtUserGetGUIThreadInfo( DWORD id
, GUITHREADINFO
*info
);
702 BOOL WINAPI
NtUserGetIconInfo( HICON icon
, ICONINFO
*info
, UNICODE_STRING
*module
,
703 UNICODE_STRING
*res_name
, DWORD
*bpp
, LONG unk
);
704 BOOL WINAPI
NtUserGetIconSize( HICON handle
, UINT step
, LONG
*width
, LONG
*height
);
705 INT WINAPI
NtUserGetKeyNameText( LONG lparam
, WCHAR
*buffer
, INT size
);
706 SHORT WINAPI
NtUserGetKeyState( INT vkey
);
707 HKL WINAPI
NtUserGetKeyboardLayout( DWORD thread_id
);
708 UINT WINAPI
NtUserGetKeyboardLayoutList( INT size
, HKL
*layouts
);
709 BOOL WINAPI
NtUserGetKeyboardLayoutName( WCHAR
*name
);
710 BOOL WINAPI
NtUserGetKeyboardState( BYTE
*state
);
711 BOOL WINAPI
NtUserGetLayeredWindowAttributes( HWND hwnd
, COLORREF
*key
, BYTE
*alpha
, DWORD
*flags
);
712 BOOL WINAPI
NtUserGetMenuBarInfo( HWND hwnd
, LONG id
, LONG item
, MENUBARINFO
*info
);
713 BOOL WINAPI
NtUserGetMenuItemRect( HWND hwnd
, HMENU menu
, UINT item
, RECT
*rect
);
714 BOOL WINAPI
NtUserGetMessage( MSG
*msg
, HWND hwnd
, UINT first
, UINT last
);
715 int WINAPI
NtUserGetMouseMovePointsEx( UINT size
, MOUSEMOVEPOINT
*ptin
, MOUSEMOVEPOINT
*ptout
,
716 int count
, DWORD resolution
);
717 BOOL WINAPI
NtUserGetObjectInformation( HANDLE handle
, INT index
, void *info
,
718 DWORD len
, DWORD
*needed
);
719 HWND WINAPI
NtUserGetOpenClipboardWindow(void);
720 INT WINAPI
NtUserGetPriorityClipboardFormat( UINT
*list
, INT count
);
721 HWINSTA WINAPI
NtUserGetProcessWindowStation(void);
722 HANDLE WINAPI
NtUserGetProp( HWND hwnd
, const WCHAR
*str
);
723 ULONG WINAPI
NtUserGetProcessDpiAwarenessContext( HANDLE process
);
724 DWORD WINAPI
NtUserGetQueueStatus( UINT flags
);
725 UINT WINAPI
NtUserGetRawInputBuffer( RAWINPUT
*data
, UINT
*data_size
, UINT header_size
);
726 UINT WINAPI
NtUserGetRawInputData( HRAWINPUT rawinput
, UINT command
, void *data
, UINT
*data_size
, UINT header_size
);
727 UINT WINAPI
NtUserGetRawInputDeviceInfo( HANDLE handle
, UINT command
, void *data
, UINT
*data_size
);
728 UINT WINAPI
NtUserGetRawInputDeviceList( RAWINPUTDEVICELIST
*devices
, UINT
*device_count
, UINT size
);
729 UINT WINAPI
NtUserGetRegisteredRawInputDevices( RAWINPUTDEVICE
*devices
, UINT
*device_count
, UINT size
);
730 BOOL WINAPI
NtUserGetScrollBarInfo( HWND hwnd
, LONG id
, SCROLLBARINFO
*info
);
731 ULONG WINAPI
NtUserGetSystemDpiForProcess( HANDLE process
);
732 HMENU WINAPI
NtUserGetSystemMenu( HWND hwnd
, BOOL revert
);
733 HDESK WINAPI
NtUserGetThreadDesktop( DWORD thread
);
734 BOOL WINAPI
NtUserGetTitleBarInfo( HWND hwnd
, TITLEBARINFO
*info
);
735 INT WINAPI
NtUserGetUpdateRgn( HWND hwnd
, HRGN hrgn
, BOOL erase
);
736 BOOL WINAPI
NtUserGetUpdatedClipboardFormats( UINT
*formats
, UINT size
, UINT
*out_size
);
737 BOOL WINAPI
NtUserGetUpdateRect( HWND hwnd
, RECT
*rect
, BOOL erase
);
738 BOOL WINAPI
NtUserGetWindowPlacement( HWND hwnd
, WINDOWPLACEMENT
*placement
);
739 int WINAPI
NtUserGetWindowRgnEx( HWND hwnd
, HRGN hrgn
, UINT unk
);
740 BOOL WINAPI
NtUserHideCaret( HWND hwnd
);
741 BOOL WINAPI
NtUserHiliteMenuItem( HWND hwnd
, HMENU handle
, UINT item
, UINT hilite
);
742 NTSTATUS WINAPI
NtUserInitializeClientPfnArrays( const struct user_client_procs
*client_procsA
,
743 const struct user_client_procs
*client_procsW
,
744 const void *client_workers
, HINSTANCE user_module
);
745 HICON WINAPI
NtUserInternalGetWindowIcon( HWND hwnd
, UINT type
);
746 INT WINAPI
NtUserInternalGetWindowText( HWND hwnd
, WCHAR
*text
, INT count
);
747 BOOL WINAPI
NtUserIsClipboardFormatAvailable( UINT format
);
748 BOOL WINAPI
NtUserInvalidateRect( HWND hwnd
, const RECT
*rect
, BOOL erase
);
749 BOOL WINAPI
NtUserInvalidateRgn( HWND hwnd
, HRGN hrgn
, BOOL erase
);
750 BOOL WINAPI
NtUserKillTimer( HWND hwnd
, UINT_PTR id
);
751 BOOL WINAPI
NtUserLockWindowUpdate( HWND hwnd
);
752 UINT WINAPI
NtUserMapVirtualKeyEx( UINT code
, UINT type
, HKL layout
);
753 INT WINAPI
NtUserMenuItemFromPoint( HWND hwnd
, HMENU handle
, int x
, int y
);
754 LRESULT WINAPI
NtUserMessageCall( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
,
755 void *result_info
, DWORD type
, BOOL ansi
);
756 BOOL WINAPI
NtUserMoveWindow( HWND hwnd
, INT x
, INT y
, INT cx
, INT cy
, BOOL repaint
);
757 DWORD WINAPI
NtUserMsgWaitForMultipleObjectsEx( DWORD count
, const HANDLE
*handles
,
758 DWORD timeout
, DWORD mask
, DWORD flags
);
759 void WINAPI
NtUserNotifyWinEvent( DWORD event
, HWND hwnd
, LONG object_id
, LONG child_id
);
760 HWINSTA WINAPI
NtUserOpenWindowStation( OBJECT_ATTRIBUTES
*attr
, ACCESS_MASK access
);
761 BOOL WINAPI
NtUserSetObjectInformation( HANDLE handle
, INT index
, void *info
, DWORD len
);
762 BOOL WINAPI
NtUserOpenClipboard( HWND hwnd
, ULONG unk
);
763 HDESK WINAPI
NtUserOpenDesktop( OBJECT_ATTRIBUTES
*attr
, DWORD flags
, ACCESS_MASK access
);
764 HDESK WINAPI
NtUserOpenInputDesktop( DWORD flags
, BOOL inherit
, ACCESS_MASK access
);
765 BOOL WINAPI
NtUserPeekMessage( MSG
*msg_out
, HWND hwnd
, UINT first
, UINT last
, UINT flags
);
766 BOOL WINAPI
NtUserPostMessage( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
);
767 BOOL WINAPI
NtUserPostThreadMessage( DWORD thread
, UINT msg
, WPARAM wparam
, LPARAM lparam
);
768 UINT_PTR WINAPI
NtUserQueryInputContext( HIMC handle
, UINT attr
);
769 BOOL WINAPI
NtUserRedrawWindow( HWND hwnd
, const RECT
*rect
, HRGN hrgn
, UINT flags
);
770 ATOM WINAPI
NtUserRegisterClassExWOW( const WNDCLASSEXW
*wc
, UNICODE_STRING
*name
, UNICODE_STRING
*version
,
771 struct client_menu_name
*client_menu_name
, DWORD fnid
, DWORD flags
,
773 BOOL WINAPI
NtUserRegisterHotKey( HWND hwnd
, INT id
, UINT modifiers
, UINT vk
);
774 BOOL WINAPI
NtUserRegisterRawInputDevices( const RAWINPUTDEVICE
*devices
, UINT device_count
, UINT size
);
775 INT WINAPI
NtUserReleaseDC( HWND hwnd
, HDC hdc
);
776 BOOL WINAPI
NtUserRemoveClipboardFormatListener( HWND hwnd
);
777 BOOL WINAPI
NtUserRemoveMenu( HMENU menu
, UINT id
, UINT flags
);
778 HANDLE WINAPI
NtUserRemoveProp( HWND hwnd
, const WCHAR
*str
);
779 BOOL WINAPI
NtUserScrollDC( HDC hdc
, INT dx
, INT dy
, const RECT
*scroll
, const RECT
*clip
,
780 HRGN ret_update_rgn
, RECT
*update_rect
);
781 INT WINAPI
NtUserScrollWindowEx( HWND hwnd
, INT dx
, INT dy
, const RECT
*rect
,
782 const RECT
*clip_rect
, HRGN update_rgn
,
783 RECT
*update_rect
, UINT flags
) DECLSPEC_HIDDEN
;
784 HPALETTE WINAPI
NtUserSelectPalette( HDC hdc
, HPALETTE palette
, WORD force_background
);
785 UINT WINAPI
NtUserSendInput( UINT count
, INPUT
*inputs
, int size
);
786 HWND WINAPI
NtUserSetActiveWindow( HWND hwnd
);
787 HWND WINAPI
NtUserSetCapture( HWND hwnd
);
788 DWORD WINAPI
NtUserSetClassLong( HWND hwnd
, INT offset
, LONG newval
, BOOL ansi
);
789 ULONG_PTR WINAPI
NtUserSetClassLongPtr( HWND hwnd
, INT offset
, LONG_PTR newval
, BOOL ansi
);
790 WORD WINAPI
NtUserSetClassWord( HWND hwnd
, INT offset
, WORD newval
);
791 NTSTATUS WINAPI
NtUserSetClipboardData( UINT format
, HANDLE handle
, struct set_clipboard_params
*params
);
792 HWND WINAPI
NtUserSetClipboardViewer( HWND hwnd
);
793 HCURSOR WINAPI
NtUserSetCursor( HCURSOR cursor
);
794 BOOL WINAPI
NtUserSetCursorIconData( HCURSOR cursor
, UNICODE_STRING
*module
, UNICODE_STRING
*res_name
,
795 struct cursoricon_desc
*desc
);
796 BOOL WINAPI
NtUserSetCursorPos( INT x
, INT y
);
797 HWND WINAPI
NtUserSetFocus( HWND hwnd
);
798 void WINAPI
NtUserSetInternalWindowPos( HWND hwnd
, UINT cmd
, RECT
*rect
, POINT
*pt
);
799 BOOL WINAPI
NtUserSetKeyboardState( BYTE
*state
);
800 BOOL WINAPI
NtUserSetLayeredWindowAttributes( HWND hwnd
, COLORREF key
, BYTE alpha
, DWORD flags
);
801 BOOL WINAPI
NtUserSetMenu( HWND hwnd
, HMENU menu
);
802 BOOL WINAPI
NtUserSetMenuContextHelpId( HMENU handle
, DWORD id
);
803 BOOL WINAPI
NtUserSetMenuDefaultItem( HMENU handle
, UINT item
, UINT bypos
);
804 HWND WINAPI
NtUserSetParent( HWND hwnd
, HWND parent
);
805 BOOL WINAPI
NtUserSetProcessDpiAwarenessContext( ULONG awareness
, ULONG unknown
);
806 BOOL WINAPI
NtUserSetProcessWindowStation( HWINSTA handle
);
807 BOOL WINAPI
NtUserSetProp( HWND hwnd
, const WCHAR
*str
, HANDLE handle
);
808 INT WINAPI
NtUserSetScrollInfo( HWND hwnd
, INT bar
, const SCROLLINFO
*info
, BOOL redraw
);
809 BOOL WINAPI
NtUserSetSysColors( INT count
, const INT
*colors
, const COLORREF
*values
);
810 BOOL WINAPI
NtUserSetSystemMenu( HWND hwnd
, HMENU menu
);
811 UINT_PTR WINAPI
NtUserSetSystemTimer( HWND hwnd
, UINT_PTR id
, UINT timeout
);
812 BOOL WINAPI
NtUserSetThreadDesktop( HDESK handle
);
813 UINT_PTR WINAPI
NtUserSetTimer( HWND hwnd
, UINT_PTR id
, UINT timeout
, TIMERPROC proc
, ULONG tolerance
);
814 LONG WINAPI
NtUserSetWindowLong( HWND hwnd
, INT offset
, LONG newval
, BOOL ansi
);
815 LONG_PTR WINAPI
NtUserSetWindowLongPtr( HWND hwnd
, INT offset
, LONG_PTR newval
, BOOL ansi
);
816 BOOL WINAPI
NtUserSetWindowPlacement( HWND hwnd
, const WINDOWPLACEMENT
*wpl
);
817 BOOL WINAPI
NtUserSetWindowPos( HWND hwnd
, HWND after
, INT x
, INT y
, INT cx
, INT cy
, UINT flags
);
818 int WINAPI
NtUserSetWindowRgn( HWND hwnd
, HRGN hrgn
, BOOL redraw
);
819 WORD WINAPI
NtUserSetWindowWord( HWND hwnd
, INT offset
, WORD newval
);
820 HHOOK WINAPI
NtUserSetWindowsHookEx( HINSTANCE inst
, UNICODE_STRING
*module
, DWORD tid
, INT id
,
821 HOOKPROC proc
, BOOL ansi
);
822 HWINEVENTHOOK WINAPI
NtUserSetWinEventHook( DWORD event_min
, DWORD event_max
, HMODULE inst
,
823 UNICODE_STRING
*module
, WINEVENTPROC proc
,
824 DWORD pid
, DWORD tid
, DWORD flags
);
825 BOOL WINAPI
NtUserShowCaret( HWND hwnd
);
826 INT WINAPI
NtUserShowCursor( BOOL show
);
827 BOOL WINAPI
NtUserShowScrollBar( HWND hwnd
, INT bar
, BOOL show
);
828 BOOL WINAPI
NtUserShowWindow( HWND hwnd
, INT cmd
);
829 BOOL WINAPI
NtUserShowWindowAsync( HWND hwnd
, INT cmd
);
830 BOOL WINAPI
NtUserSystemParametersInfo( UINT action
, UINT val
, void *ptr
, UINT winini
);
831 BOOL WINAPI
NtUserSystemParametersInfoForDpi( UINT action
, UINT val
, PVOID ptr
, UINT winini
, UINT dpi
);
832 BOOL WINAPI
NtUserThunkedMenuInfo( HMENU menu
, const MENUINFO
*info
);
833 UINT WINAPI
NtUserThunkedMenuItemInfo( HMENU menu
, UINT pos
, UINT flags
, UINT method
,
834 MENUITEMINFOW
*info
, UNICODE_STRING
*str
);
835 INT WINAPI
NtUserToUnicodeEx( UINT virt
, UINT scan
, const BYTE
*state
,
836 WCHAR
*str
, int size
, UINT flags
, HKL layout
);
837 BOOL WINAPI
NtUserTrackMouseEvent( TRACKMOUSEEVENT
*info
);
838 BOOL WINAPI
NtUserTrackPopupMenuEx( HMENU handle
, UINT flags
, INT x
, INT y
, HWND hwnd
, TPMPARAMS
*params
);
839 INT WINAPI
NtUserTranslateAccelerator( HWND hwnd
, HACCEL accel
, MSG
*msg
);
840 BOOL WINAPI
NtUserTranslateMessage( const MSG
*msg
, UINT flags
);
841 BOOL WINAPI
NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook
);
842 BOOL WINAPI
NtUserUnhookWindowsHookEx( HHOOK handle
);
843 BOOL WINAPI
NtUserUnregisterClass( UNICODE_STRING
*name
, HINSTANCE instance
,
844 struct client_menu_name
*client_menu_name
);
845 BOOL WINAPI
NtUserUnregisterHotKey( HWND hwnd
, INT id
);
846 BOOL WINAPI
NtUserUpdateInputContext( HIMC handle
, UINT attr
, UINT_PTR value
);
847 BOOL WINAPI
NtUserUpdateLayeredWindow( HWND hwnd
, HDC hdc_dst
, const POINT
*pts_dst
, const SIZE
*size
,
848 HDC hdc_src
, const POINT
*pts_src
, COLORREF key
,
849 const BLENDFUNCTION
*blend
, DWORD flags
, const RECT
*dirty
);
850 WORD WINAPI
NtUserVkKeyScanEx( WCHAR chr
, HKL layout
);
851 DWORD WINAPI
NtUserWaitForInputIdle( HANDLE process
, DWORD timeout
, BOOL wow
);
852 HWND WINAPI
NtUserWindowFromDC( HDC hdc
);
853 HWND WINAPI
NtUserWindowFromPoint( LONG x
, LONG y
);
855 /* NtUserCallNoParam codes, not compatible with Windows */
858 NtUserCallNoParam_DestroyCaret
,
859 NtUserCallNoParam_GetDesktopWindow
,
860 NtUserCallNoParam_GetDialogBaseUnits
,
861 NtUserCallNoParam_GetInputState
,
862 NtUserCallNoParam_GetProcessDefaultLayout
,
863 NtUserCallNoParam_ReleaseCapture
,
864 /* temporary exports */
869 static inline BOOL
NtUserDestroyCaret(void)
871 return NtUserCallNoParam( NtUserCallNoParam_DestroyCaret
);
874 static inline HWND
NtUserGetDesktopWindow(void)
876 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetDesktopWindow
));
879 static inline DWORD
NtUserGetDialogBaseUnits(void)
881 return NtUserCallNoParam( NtUserCallNoParam_GetDialogBaseUnits
);
884 static inline BOOL
NtUserGetInputState(void)
886 return NtUserCallNoParam( NtUserCallNoParam_GetInputState
);
889 static inline DWORD
NtUserGetProcessDefaultLayout(void)
891 return NtUserCallNoParam( NtUserCallNoParam_GetProcessDefaultLayout
);
894 static inline BOOL
NtUserReleaseCapture(void)
896 return NtUserCallNoParam( NtUserCallNoParam_ReleaseCapture
);
899 /* NtUserCallOneParam codes, not compatible with Windows */
902 NtUserCallOneParam_BeginDeferWindowPos
,
903 NtUserCallOneParam_CreateCursorIcon
,
904 NtUserCallOneParam_CreateMenu
,
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 static inline HDWP
NtUserBeginDeferWindowPos( INT count
)
930 return UlongToHandle( NtUserCallOneParam( count
, NtUserCallOneParam_BeginDeferWindowPos
));
933 static inline HICON
NtUserCreateCursorIcon( BOOL is_icon
)
935 return UlongToHandle( NtUserCallOneParam( is_icon
, NtUserCallOneParam_CreateCursorIcon
));
938 static inline HMENU
NtUserCreateMenu( BOOL is_popup
)
940 return UlongToHandle( NtUserCallOneParam( is_popup
, NtUserCallOneParam_CreateMenu
));
943 static inline WORD
NtUserEnableDC( HDC hdc
)
945 return NtUserCallOneParam( HandleToUlong(hdc
), NtUserCallOneParam_EnableDC
);
948 static inline void NtUserEnableThunkLock( BOOL enable
)
950 NtUserCallOneParam( enable
, NtUserCallOneParam_EnableThunkLock
);
953 static inline UINT
NtUserEnumClipboardFormats( UINT format
)
955 return NtUserCallOneParam( format
, NtUserCallOneParam_EnumClipboardFormats
);
958 static inline BOOL
NtUserGetClipCursor( RECT
*rect
)
960 return NtUserCallOneParam( (UINT_PTR
)rect
, NtUserCallOneParam_GetClipCursor
);
963 static inline BOOL
NtUserGetCursorPos( POINT
*pt
)
965 return NtUserCallOneParam( (UINT_PTR
)pt
, NtUserCallOneParam_GetCursorPos
);
968 static inline UINT_PTR
NtUserGetIconParam( HICON icon
)
970 return NtUserCallOneParam( HandleToUlong(icon
), NtUserCallOneParam_GetIconParam
);
973 static inline UINT_PTR
NtUserGetMenuItemCount( HMENU menu
)
975 return NtUserCallOneParam( HandleToUlong(menu
), NtUserCallOneParam_GetMenuItemCount
);
978 static inline RECT
NtUserGetPrimaryMonitorRect(void)
981 NtUserCallOneParam( (UINT_PTR
)&primary
, NtUserCallOneParam_GetPrimaryMonitorRect
);
985 static inline BOOL
NtUserSetCaretBlinkTime( unsigned int time
)
987 return NtUserCallOneParam( time
, NtUserCallOneParam_SetCaretBlinkTime
);
990 static inline COLORREF
NtUserGetSysColor( INT index
)
992 return NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColor
);
995 static inline HBRUSH
NtUserGetSysColorBrush( INT index
)
997 return UlongToHandle( NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColorBrush
));
1000 static inline HPEN
NtUserGetSysColorPen( INT index
)
1002 return UlongToHandle( NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColorPen
));
1005 static inline INT
NtUserGetSystemMetrics( INT index
)
1007 return NtUserCallOneParam( index
, NtUserCallOneParam_GetSystemMetrics
);
1010 static inline RECT
NtUserGetVirtualScreenRect(void)
1013 NtUserCallOneParam( (UINT_PTR
)&virtual, NtUserCallOneParam_GetVirtualScreenRect
);
1017 static inline BOOL
NtUserIsWindowRectFullScreen( const RECT
*rect
)
1019 return NtUserCallOneParam( (UINT_PTR
)rect
, NtUserCallOneParam_IsWindowRectFullScreen
);
1022 static inline BOOL
NtUserMessageBeep( UINT i
)
1024 return NtUserCallOneParam( i
, NtUserCallOneParam_MessageBeep
);
1027 static inline UINT
NtUserRealizePalette( HDC hdc
)
1029 return NtUserCallOneParam( HandleToUlong(hdc
), NtUserCallOneParam_RealizePalette
);
1032 static inline UINT
NtUserSetProcessDefaultLayout( DWORD layout
)
1034 return NtUserCallOneParam( layout
, NtUserCallOneParam_SetProcessDefaultLayout
);
1037 /* NtUserCallTwoParam codes, not compatible with Windows */
1040 NtUserCallTwoParam_GetMenuInfo
,
1041 NtUserCallTwoParam_GetMonitorInfo
,
1042 NtUserCallTwoParam_GetSystemMetricsForDpi
,
1043 NtUserCallTwoParam_MonitorFromRect
,
1044 NtUserCallTwoParam_ReplyMessage
,
1045 NtUserCallTwoParam_SetCaretPos
,
1046 NtUserCallTwoParam_SetIconParam
,
1047 NtUserCallTwoParam_UnhookWindowsHook
,
1048 /* temporary exports */
1053 static inline BOOL
NtUserGetMenuInfo( HMENU menu
, MENUINFO
*info
)
1055 return NtUserCallTwoParam( HandleToUlong(menu
), (ULONG_PTR
)info
,
1056 NtUserCallTwoParam_GetMenuInfo
);
1059 static inline BOOL
NtUserGetMonitorInfo( HMONITOR monitor
, MONITORINFO
*info
)
1061 return NtUserCallTwoParam( HandleToUlong(monitor
), (ULONG_PTR
)info
,
1062 NtUserCallTwoParam_GetMonitorInfo
);
1065 static inline INT
NtUserGetSystemMetricsForDpi( INT index
, UINT dpi
)
1067 return NtUserCallTwoParam( index
, dpi
, NtUserCallTwoParam_GetSystemMetricsForDpi
);
1070 static inline HMONITOR
NtUserMonitorFromRect( const RECT
*rect
, DWORD flags
)
1072 ULONG ret
= NtUserCallTwoParam( (LONG_PTR
)rect
, flags
, NtUserCallTwoParam_MonitorFromRect
);
1073 return UlongToHandle( ret
);
1076 static inline BOOL
NtUserReplyMessage( LRESULT result
, MSG
*msg
)
1078 return NtUserCallTwoParam( result
, (UINT_PTR
)msg
, NtUserCallTwoParam_ReplyMessage
);
1081 static inline BOOL
NtUserSetCaretPos( int x
, int y
)
1083 return NtUserCallTwoParam( x
, y
, NtUserCallTwoParam_SetCaretPos
);
1086 static inline UINT_PTR
NtUserSetIconParam( HICON icon
, ULONG_PTR param
)
1088 return NtUserCallTwoParam( HandleToUlong(icon
), param
, NtUserCallTwoParam_SetIconParam
);
1091 static inline BOOL
NtUserUnhookWindowsHook( INT id
, HOOKPROC proc
)
1093 return NtUserCallTwoParam( id
, (UINT_PTR
)proc
, NtUserCallTwoParam_UnhookWindowsHook
);
1096 /* NtUserCallHwnd codes, not compatible with Windows */
1099 NtUserCallHwnd_ArrangeIconicWindows
,
1100 NtUserCallHwnd_DrawMenuBar
,
1101 NtUserCallHwnd_GetDefaultImeWindow
,
1102 NtUserCallHwnd_GetDialogInfo
,
1103 NtUserCallHwnd_GetDpiForWindow
,
1104 NtUserCallHwnd_GetMDIClientInfo
,
1105 NtUserCallHwnd_GetParent
,
1106 NtUserCallHwnd_GetWindowContextHelpId
,
1107 NtUserCallHwnd_GetWindowDpiAwarenessContext
,
1108 NtUserCallHwnd_GetWindowInputContext
,
1109 NtUserCallHwnd_GetWindowSysSubMenu
,
1110 NtUserCallHwnd_GetWindowTextLength
,
1111 NtUserCallHwnd_IsWindow
,
1112 NtUserCallHwnd_IsWindowEnabled
,
1113 NtUserCallHwnd_IsWindowUnicode
,
1114 NtUserCallHwnd_IsWindowVisible
,
1115 NtUserCallHwnd_SetForegroundWindow
,
1116 /* temporary exports */
1117 NtUserGetFullWindowHandle
,
1118 NtUserIsCurrehtProcessWindow
,
1119 NtUserIsCurrehtThreadWindow
,
1122 static inline UINT
NtUserArrangeIconicWindows( HWND parent
)
1124 return NtUserCallHwnd( parent
, NtUserCallHwnd_ArrangeIconicWindows
);
1127 static inline BOOL
NtUserDrawMenuBar( HWND hwnd
)
1129 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_DrawMenuBar
);
1132 static inline DWORD
NtUserGetWindowContextHelpId( HWND hwnd
)
1134 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowContextHelpId
);
1137 static inline HWND
NtUserGetDefaultImeWindow( HWND hwnd
)
1139 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDefaultImeWindow
));
1142 static inline void *NtUserGetDialogInfo( HWND hwnd
)
1144 return (void *)NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDialogInfo
);
1147 static inline UINT
NtUserGetDpiForWindow( HWND hwnd
)
1149 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDpiForWindow
);
1152 static inline void *NtUserGetMDIClientInfo( HWND hwnd
)
1154 return (void *)NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetMDIClientInfo
);
1157 static inline HWND
NtUserGetParent( HWND hwnd
)
1159 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetParent
));
1162 static inline DPI_AWARENESS_CONTEXT
NtUserGetWindowDpiAwarenessContext( HWND hwnd
)
1164 return (DPI_AWARENESS_CONTEXT
)NtUserCallHwnd( hwnd
,
1165 NtUserCallHwnd_GetWindowDpiAwarenessContext
);
1168 static inline HIMC
NtUserGetWindowInputContext( HWND hwnd
)
1170 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowInputContext
));
1173 static inline HMENU
NtUserGetWindowSysSubMenu( HWND hwnd
)
1175 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowSysSubMenu
));
1178 static inline INT
NtUserGetWindowTextLength( HWND hwnd
)
1180 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowTextLength
);
1183 static inline BOOL
NtUserIsWindow( HWND hwnd
)
1185 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindow
);
1188 static inline BOOL
NtUserIsWindowEnabled( HWND hwnd
)
1190 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowEnabled
);
1193 static inline BOOL
NtUserIsWindowUnicode( HWND hwnd
)
1195 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowUnicode
);
1198 static inline BOOL
NtUserIsWindowVisible( HWND hwnd
)
1200 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowVisible
);
1203 static inline BOOL
NtUserSetForegroundWindow( HWND hwnd
)
1205 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_SetForegroundWindow
);
1208 /* NtUserCallHwndParam codes, not compatible with Windows */
1211 NtUserCallHwndParam_ClientToScreen
,
1212 NtUserCallHwndParam_EnableWindow
,
1213 NtUserCallHwndParam_GetClassLongA
,
1214 NtUserCallHwndParam_GetClassLongW
,
1215 NtUserCallHwndParam_GetClassLongPtrA
,
1216 NtUserCallHwndParam_GetClassLongPtrW
,
1217 NtUserCallHwndParam_GetClassWord
,
1218 NtUserCallHwndParam_GetClientRect
,
1219 NtUserCallHwndParam_GetDialogProc
,
1220 NtUserCallHwndParam_GetScrollInfo
,
1221 NtUserCallHwndParam_GetWindowInfo
,
1222 NtUserCallHwndParam_GetWindowLongA
,
1223 NtUserCallHwndParam_GetWindowLongW
,
1224 NtUserCallHwndParam_GetWindowLongPtrA
,
1225 NtUserCallHwndParam_GetWindowLongPtrW
,
1226 NtUserCallHwndParam_GetWindowRect
,
1227 NtUserCallHwndParam_GetWindowRelative
,
1228 NtUserCallHwndParam_GetWindowThread
,
1229 NtUserCallHwndParam_GetWindowWord
,
1230 NtUserCallHwndParam_IsChild
,
1231 NtUserCallHwndParam_KillSystemTimer
,
1232 NtUserCallHwndParam_MapWindowPoints
,
1233 NtUserCallHwndParam_MirrorRgn
,
1234 NtUserCallHwndParam_MonitorFromWindow
,
1235 NtUserCallHwndParam_ScreenToClient
,
1236 NtUserCallHwndParam_SetDialogInfo
,
1237 NtUserCallHwndParam_SetMDIClientInfo
,
1238 NtUserCallHwndParam_SetWindowContextHelpId
,
1239 NtUserCallHwndParam_SetWindowPixelFormat
,
1240 NtUserCallHwndParam_ShowOwnedPopups
,
1241 /* temporary exports */
1242 NtUserSetWindowStyle
,
1243 NtUserSpyGetMsgName
,
1246 static inline BOOL
NtUserClientToScreen( HWND hwnd
, POINT
*pt
)
1248 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)pt
, NtUserCallHwndParam_ClientToScreen
);
1251 static inline BOOL
NtUserEnableWindow( HWND hwnd
, BOOL enable
)
1253 return NtUserCallHwndParam( hwnd
, enable
, NtUserCallHwndParam_EnableWindow
);
1256 static inline DWORD
NtUserGetClassLongA( HWND hwnd
, INT offset
)
1258 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongA
);
1261 static inline ULONG_PTR
NtUserGetClassLongPtrA( HWND hwnd
, INT offset
)
1263 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongPtrA
);
1266 static inline ULONG_PTR
NtUserGetClassLongPtrW( HWND hwnd
, INT offset
)
1268 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongPtrW
);
1271 static inline DWORD
NtUserGetClassLongW( HWND hwnd
, INT offset
)
1273 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassLongW
);
1276 static inline WORD
NtUserGetClassWord( HWND hwnd
, INT offset
)
1278 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetClassWord
);
1281 static inline BOOL
NtUserGetClientRect( HWND hwnd
, RECT
*rect
)
1283 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)rect
, NtUserCallHwndParam_GetClientRect
);
1286 enum dialog_proc_type
1293 static inline DLGPROC
NtUserGetDialogProc( HWND hwnd
, enum dialog_proc_type type
)
1295 return (DLGPROC
)NtUserCallHwndParam( hwnd
, type
, NtUserCallHwndParam_GetDialogProc
);
1298 struct get_scroll_info_params
1304 static inline BOOL
NtUserGetScrollInfo( HWND hwnd
, INT bar
, SCROLLINFO
*info
)
1306 struct get_scroll_info_params params
= { .bar
= bar
, .info
= info
};
1307 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)¶ms
, NtUserCallHwndParam_GetScrollInfo
);
1310 static inline BOOL
NtUserGetWindowInfo( HWND hwnd
, WINDOWINFO
*info
)
1312 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)info
, NtUserCallHwndParam_GetWindowInfo
);
1315 static inline LONG
NtUserGetWindowLongA( HWND hwnd
, INT offset
)
1317 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongA
);
1320 static inline LONG_PTR
NtUserGetWindowLongPtrA( HWND hwnd
, INT offset
)
1322 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongPtrA
);
1325 static inline LONG_PTR
NtUserGetWindowLongPtrW( HWND hwnd
, INT offset
)
1327 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongPtrW
);
1330 static inline LONG
NtUserGetWindowLongW( HWND hwnd
, INT offset
)
1332 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowLongW
);
1335 static inline BOOL
NtUserGetWindowRect( HWND hwnd
, RECT
*rect
)
1337 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)rect
, NtUserCallHwndParam_GetWindowRect
);
1340 static inline HWND
NtUserGetWindowRelative( HWND hwnd
, UINT rel
)
1342 return UlongToHandle( NtUserCallHwndParam( hwnd
, rel
,
1343 NtUserCallHwndParam_GetWindowRelative
));
1346 static inline DWORD
NtUserGetWindowThread( HWND hwnd
, DWORD
*process
)
1348 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)process
, NtUserCallHwndParam_GetWindowThread
);
1351 static inline WORD
NtUserGetWindowWord( HWND hwnd
, INT offset
)
1353 return NtUserCallHwndParam( hwnd
, offset
, NtUserCallHwndParam_GetWindowWord
);
1356 static inline BOOL
NtUserIsChild( HWND parent
, HWND child
)
1358 return NtUserCallHwndParam( parent
, HandleToUlong(child
), NtUserCallHwndParam_IsChild
);
1361 static inline BOOL
NtUserKillSystemTimer( HWND hwnd
, UINT_PTR id
)
1363 return NtUserCallHwndParam( hwnd
, id
, NtUserCallHwndParam_KillSystemTimer
);
1366 struct map_window_points_params
1373 static inline int NtUserMapWindowPoints( HWND hwnd_from
, HWND hwnd_to
, POINT
*points
, UINT count
)
1375 struct map_window_points_params params
;
1376 params
.hwnd_to
= hwnd_to
;
1377 params
.points
= points
;
1378 params
.count
= count
;
1379 return NtUserCallHwndParam( hwnd_from
, (UINT_PTR
)¶ms
,
1380 NtUserCallHwndParam_MapWindowPoints
);
1383 static inline BOOL
NtUserMirrorRgn( HWND hwnd
, HRGN hrgn
)
1385 return NtUserCallHwndParam( hwnd
, HandleToUlong(hrgn
), NtUserCallHwndParam_MirrorRgn
);
1388 static inline HMONITOR
NtUserMonitorFromWindow( HWND hwnd
, DWORD flags
)
1390 ULONG ret
= NtUserCallHwndParam( hwnd
, flags
, NtUserCallHwndParam_MonitorFromWindow
);
1391 return UlongToHandle( ret
);
1394 static inline BOOL
NtUserScreenToClient( HWND hwnd
, POINT
*pt
)
1396 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)pt
, NtUserCallHwndParam_ScreenToClient
);
1399 static inline void NtUserSetDialogInfo( HWND hwnd
, void *info
)
1401 NtUserCallHwndParam( hwnd
, (UINT_PTR
)info
, NtUserCallHwndParam_SetDialogInfo
);
1404 static inline void NtUserSetMDIClientInfo( HWND hwnd
, void *info
)
1406 NtUserCallHwndParam( hwnd
, (UINT_PTR
)info
, NtUserCallHwndParam_SetMDIClientInfo
);
1409 static inline BOOL
NtUserSetWindowContextHelpId( HWND hwnd
, DWORD id
)
1411 return NtUserCallHwndParam( hwnd
, id
, NtUserCallHwndParam_SetWindowContextHelpId
);
1414 static inline BOOL
NtUserSetWindowPixelFormat( HWND hwnd
, int format
)
1416 return NtUserCallHwndParam( hwnd
, format
, NtUserCallHwndParam_SetWindowPixelFormat
);
1419 static inline BOOL
NtUserShowOwnedPopups( HWND hwnd
, BOOL show
)
1421 return NtUserCallHwndParam( hwnd
, show
, NtUserCallHwndParam_ShowOwnedPopups
);
1424 #endif /* _NTUSER_ */