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
29 # if defined(_WIN32U_) || defined(WINE_UNIX_LIB)
30 # define W32KAPI DECLSPEC_EXPORT
32 # define W32KAPI DECLSPEC_IMPORT
36 /* KernelCallbackTable codes, not compatible with Windows */
39 /* user32 callbacks */
40 NtUserCallEnumDisplayMonitor
,
41 NtUserCallSendAsyncCallback
,
42 NtUserCallWinEventHook
,
44 NtUserCallWindowsHook
,
46 NtUserDrawNonClientButton
,
49 NtUserFreeCachedClipboardData
,
51 NtUserImmTranslateMessage
,
52 NtUserInitBuiltinClasses
,
57 NtUserRenderSynthesizedFormat
,
58 NtUserUnpackDDEMessage
,
63 NtUserCallVulkanDebugReportCallback
,
64 NtUserCallVulkanDebugUtilsCallback
,
66 NtUserCallOpenGLDebugMessageCallback
,
67 /* Driver-specific callbacks */
68 NtUserDriverCallbackFirst
,
69 NtUserDriverCallbackLast
= NtUserDriverCallbackFirst
+ 9,
73 /* TEB thread info, not compatible with Windows */
74 struct ntuser_thread_info
76 UINT64 driver_data
; /* driver-specific data */
77 DWORD message_time
; /* value for GetMessageTime */
78 DWORD message_pos
; /* value for GetMessagePos */
79 UINT64 message_extra
; /* value for GetMessageExtraInfo */
80 INPUT_MESSAGE_SOURCE msg_source
; /* Message source for current message */
81 WORD recursion_count
; /* SendMessage recursion counter */
82 UINT receive_flags
; /* currently received message flags */
83 UINT top_window
; /* desktop window */
84 UINT msg_window
; /* HWND_MESSAGE parent window */
85 DPI_AWARENESS dpi_awareness
; /* DPI awareness */
86 UINT default_imc
; /* default input context */
87 UINT64 client_imm
; /* client IMM thread info */
88 UINT64 wmchar_data
; /* client data for WM_CHAR mappings */
91 static inline struct ntuser_thread_info
*NtUserGetThreadInfo(void)
94 if (NtCurrentTeb()->GdiBatchCount
)
96 TEB64
*teb64
= (TEB64
*)(UINT_PTR
)NtCurrentTeb()->GdiBatchCount
;
97 return (struct ntuser_thread_info
*)teb64
->Win32ClientInfo
;
100 return (struct ntuser_thread_info
*)NtCurrentTeb()->Win32ClientInfo
;
103 /* NtUserCallEnumDisplayMonitor params */
104 struct enum_display_monitor_params
106 MONITORENUMPROC proc
;
113 /* NtUserCallSendAsyncCallback params */
114 struct send_async_params
116 SENDASYNCPROC callback
;
123 /* NtUserCallWinEventHook params */
124 struct win_event_hook_params
134 WCHAR module
[MAX_PATH
];
137 /* type of message-sending functions that need special WM_CHAR handling */
140 WMCHAR_MAP_POSTMESSAGE
,
141 WMCHAR_MAP_SENDMESSAGE
,
142 WMCHAR_MAP_SENDMESSAGETIMEOUT
,
143 WMCHAR_MAP_RECVMESSAGE
,
144 WMCHAR_MAP_DISPATCHMESSAGE
,
145 WMCHAR_MAP_CALLWINDOWPROC
,
146 WMCHAR_MAP_ISDIALOGMESSAGE
,
148 WMCHAR_MAP_NOMAPPING
= WMCHAR_MAP_COUNT
151 /* NtUserCallWindowProc params */
152 struct win_proc_params
161 enum wm_char_mapping mapping
;
162 DPI_AWARENESS_CONTEXT dpi_awareness
;
167 /* NtUserCallWindowsHook params */
168 struct win_hook_params
183 /* NtUserCopyImage params */
184 struct copy_image_params
193 /* NtUserDrawText params */
194 struct draw_text_params
203 /* NtUserFreeCachedClipboardData params */
204 struct free_cached_data_params
210 /* NtUserImmProcessKey params */
211 struct imm_process_key_params
219 /* NtUserImmTranslateMessage params */
220 struct imm_translate_message_params
228 /* NtUserLoadImage params */
229 struct load_image_params
239 /* NtUserLoadSysMenu params */
240 struct load_sys_menu_params
245 /* NtUserPostDDEMessage params */
246 struct post_dde_message_params
256 /* NtUserRenderSynthesizedFormat params */
257 struct render_synthesized_format_params
263 /* NtUserUnpackDDEMessage params */
264 struct unpack_dde_message_result
270 struct unpack_dde_message_params
272 struct unpack_dde_message_result
*result
; /* FIXME: Use NtCallbackReturn instead */
280 /* process DPI awareness contexts */
281 #define NTUSER_DPI_UNAWARE 0x00006010
282 #define NTUSER_DPI_SYSTEM_AWARE 0x00006011
283 #define NTUSER_DPI_PER_MONITOR_AWARE 0x00000012
284 #define NTUSER_DPI_PER_MONITOR_AWARE_V2 0x00000022
285 #define NTUSER_DPI_PER_UNAWARE_GDISCALED 0x40006010
287 /* message spy definitions */
288 #define SPY_DISPATCHMESSAGE 0x0100
289 #define SPY_SENDMESSAGE 0x0101
290 #define SPY_DEFWNDPROC 0x0102
292 #define SPY_RESULT_OK 0x0001
293 #define SPY_RESULT_DEFWND 0x0002
295 /* CreateDesktop wine specific flag */
296 #define DF_WINE_CREATE_DESKTOP 0x80000000
298 /* NtUserMessageCall codes */
301 NtUserScrollBarWndProc
= 0x029a,
302 NtUserPopupMenuWndProc
= 0x029c,
303 NtUserDesktopWindowProc
= 0x029d,
304 NtUserDefWindowProc
= 0x029e,
305 NtUserCallWindowProc
= 0x02ab,
306 NtUserSendMessage
= 0x02b1,
307 NtUserSendMessageTimeout
= 0x02b3,
308 NtUserSendNotifyMessage
= 0x02b7,
309 NtUserSendMessageCallback
= 0x02b8,
310 /* Wine-specific exports */
311 NtUserClipboardWindowProc
= 0x0300,
312 NtUserGetDispatchParams
= 0x3001,
313 NtUserSpyGetMsgName
= 0x3002,
314 NtUserSpyEnter
= 0x0303,
315 NtUserSpyExit
= 0x0304,
316 NtUserImeDriverCall
= 0x0305,
319 /* NtUserThunkedMenuItemInfo codes */
322 NtUserSetMenuItemInfo
,
323 NtUserInsertMenuItem
,
324 /* Wine extensions */
325 NtUserCheckMenuRadioItem
,
326 NtUserGetMenuDefaultItem
,
328 NtUserGetMenuItemInfoA
,
329 NtUserGetMenuItemInfoW
,
334 struct send_message_timeout_params
341 struct send_message_callback_params
343 SENDASYNCPROC callback
;
347 /* color index used to retrieve system 55aa brush */
348 #define COLOR_55AA_BRUSH 0x100
350 /* user object types */
351 #define NTUSER_OBJ_WINDOW 0x01
352 #define NTUSER_OBJ_MENU 0x02
353 #define NTUSER_OBJ_ICON 0x03
354 #define NTUSER_OBJ_WINPOS 0x04
355 #define NTUSER_OBJ_ACCEL 0x08
356 #define NTUSER_OBJ_HOOK 0x0f
357 #define NTUSER_OBJ_IMC 0x11
359 /* NtUserScrollWindowEx flag */
360 #define SW_NODCCACHE 0x8000
362 /* NtUserSetScrollInfo flag */
363 #define SIF_RETURNPREV 0x1000
365 /* NtUserInitializeClientPfnArrays parameter, not compatible with Windows */
366 struct user_client_procs
368 WNDPROC pButtonWndProc
;
369 WNDPROC pComboWndProc
;
370 WNDPROC pDefWindowProc
;
372 WNDPROC pEditWndProc
;
373 WNDPROC pListBoxWndProc
;
374 WNDPROC pMDIClientWndProc
;
375 WNDPROC pScrollBarWndProc
;
376 WNDPROC pStaticWndProc
;
378 WNDPROC pDesktopWndProc
;
379 WNDPROC pIconTitleWndProc
;
380 WNDPROC pPopupMenuWndProc
;
381 WNDPROC pMessageWndProc
;
384 /* NtUserSetCursorIconData parameter, not compatible with Windows */
385 struct cursoricon_frame
387 UINT width
; /* frame-specific width */
388 UINT height
; /* frame-specific height */
389 HBITMAP color
; /* color bitmap */
390 HBITMAP alpha
; /* pre-multiplied alpha bitmap for 32-bpp icons */
391 HBITMAP mask
; /* mask bitmap (followed by color for 1-bpp icons) */
395 struct cursoricon_desc
401 struct cursoricon_frame
*frames
;
407 struct client_menu_name
411 UNICODE_STRING
*nameUS
;
414 /* NtUserGetClipboardData params, not compatible with Windows */
415 struct get_clipboard_params
424 /* NtUserSetClipboardData params, not compatible with Windows */
425 struct set_clipboard_params
433 /* NtUserNonClientButton params */
434 struct draw_non_client_button_params
438 enum NONCLIENT_BUTTON_TYPE type
;
444 /* NtUserDrawScrollBar params */
445 struct draw_scroll_bar_params
451 struct SCROLL_TRACKING_INFO tracking_info
;
462 /* NtUserUpdateInputContext param, not compatible with Window */
463 enum input_context_attr
465 NtUserInputContextClientPtr
,
466 NtUserInputContextThreadId
,
469 /* NtUserAssociateInputContext result */
470 enum associate_input_context_result
477 /* internal messages codes */
478 enum wine_internal_message
480 WM_WINE_DESTROYWINDOW
= 0x80000000,
481 WM_WINE_SETWINDOWPOS
,
484 WM_WINE_SETWINDOWLONG
,
486 WM_WINE_SETACTIVEWINDOW
,
487 WM_WINE_KEYBOARD_LL_HOOK
,
488 WM_WINE_MOUSE_LL_HOOK
,
491 WM_WINE_UPDATEWINDOWSTATE
,
492 WM_WINE_FIRST_DRIVER_MSG
= 0x80001000, /* range of messages reserved for the USER driver */
493 WM_WINE_LAST_DRIVER_MSG
= 0x80001fff
496 /* internal IME message */
497 #define WM_IME_INTERNAL 0x287
498 #define IME_INTERNAL_ACTIVATE 0x17
499 #define IME_INTERNAL_DEACTIVATE 0x18
500 #define IME_INTERNAL_HKL_ACTIVATE 0x19
501 #define IME_INTERNAL_HKL_DEACTIVATE 0x20
503 /* internal WM_IME_NOTIFY wparams, not compatible with Windows */
504 #define IMN_WINE_SET_OPEN_STATUS 0x000f
505 #define IMN_WINE_SET_COMP_STRING 0x0010
507 /* builtin IME driver calls */
510 WINE_IME_PROCESS_KEY
,
511 WINE_IME_TO_ASCII_EX
,
514 /* NtUserImeDriverCall params */
515 struct ime_driver_call_params
519 COMPOSITIONSTRING
*compstr
;
522 #define WM_SYSTIMER 0x0118
525 W32KAPI HKL WINAPI
NtUserActivateKeyboardLayout( HKL layout
, UINT flags
);
526 W32KAPI BOOL WINAPI
NtUserAddClipboardFormatListener( HWND hwnd
);
527 W32KAPI UINT WINAPI
NtUserAssociateInputContext( HWND hwnd
, HIMC ctx
, ULONG flags
);
528 W32KAPI BOOL WINAPI
NtUserAttachThreadInput( DWORD from
, DWORD to
, BOOL attach
);
529 W32KAPI HDC WINAPI
NtUserBeginPaint( HWND hwnd
, PAINTSTRUCT
*ps
);
530 W32KAPI NTSTATUS WINAPI
NtUserBuildHimcList( UINT thread_id
, UINT count
, HIMC
*buffer
, UINT
*size
);
531 W32KAPI NTSTATUS WINAPI
NtUserBuildHwndList( HDESK desktop
, ULONG unk2
, ULONG unk3
, ULONG unk4
,
532 ULONG thread_id
, ULONG count
, HWND
*buffer
, ULONG
*size
);
533 W32KAPI ULONG_PTR WINAPI
NtUserCallHwnd( HWND hwnd
, DWORD code
);
534 W32KAPI ULONG_PTR WINAPI
NtUserCallHwndParam( HWND hwnd
, DWORD_PTR param
, DWORD code
);
535 W32KAPI LRESULT WINAPI
NtUserCallNextHookEx( HHOOK hhook
, INT code
, WPARAM wparam
, LPARAM lparam
);
536 W32KAPI BOOL WINAPI
NtUserCallMsgFilter( MSG
*msg
, INT code
);
537 W32KAPI ULONG_PTR WINAPI
NtUserCallNoParam( ULONG code
);
538 W32KAPI ULONG_PTR WINAPI
NtUserCallOneParam( ULONG_PTR arg
, ULONG code
);
539 W32KAPI ULONG_PTR WINAPI
NtUserCallTwoParam( ULONG_PTR arg1
, ULONG_PTR arg2
, ULONG code
);
540 W32KAPI BOOL WINAPI
NtUserChangeClipboardChain( HWND hwnd
, HWND next
);
541 W32KAPI LONG WINAPI
NtUserChangeDisplaySettings( UNICODE_STRING
*devname
, DEVMODEW
*devmode
, HWND hwnd
,
542 DWORD flags
, void *lparam
);
543 W32KAPI DWORD WINAPI
NtUserCheckMenuItem( HMENU handle
, UINT id
, UINT flags
);
544 W32KAPI HWND WINAPI
NtUserChildWindowFromPointEx( HWND parent
, LONG x
, LONG y
, UINT flags
);
545 W32KAPI BOOL WINAPI
NtUserClipCursor( const RECT
*rect
);
546 W32KAPI BOOL WINAPI
NtUserCloseClipboard(void);
547 W32KAPI BOOL WINAPI
NtUserCloseDesktop( HDESK handle
);
548 W32KAPI BOOL WINAPI
NtUserCloseWindowStation( HWINSTA handle
);
549 W32KAPI INT WINAPI
NtUserCopyAcceleratorTable( HACCEL src
, ACCEL
*dst
, INT count
);
550 W32KAPI INT WINAPI
NtUserCountClipboardFormats(void);
551 W32KAPI HACCEL WINAPI
NtUserCreateAcceleratorTable( ACCEL
*table
, INT count
);
552 W32KAPI BOOL WINAPI
NtUserCreateCaret( HWND hwnd
, HBITMAP bitmap
, int width
, int height
);
553 W32KAPI HDESK WINAPI
NtUserCreateDesktopEx( OBJECT_ATTRIBUTES
*attr
, UNICODE_STRING
*device
,
554 DEVMODEW
*devmode
, DWORD flags
, ACCESS_MASK access
,
556 W32KAPI HIMC WINAPI
NtUserCreateInputContext( UINT_PTR client_ptr
);
557 W32KAPI HWND WINAPI
NtUserCreateWindowEx( DWORD ex_style
, UNICODE_STRING
*class_name
,
558 UNICODE_STRING
*version
, UNICODE_STRING
*window_name
,
559 DWORD style
, INT x
, INT y
, INT cx
, INT cy
,
560 HWND parent
, HMENU menu
, HINSTANCE instance
, void *params
,
561 DWORD flags
, HINSTANCE client_instance
, DWORD unk
, BOOL ansi
);
562 W32KAPI HWINSTA WINAPI
NtUserCreateWindowStation( OBJECT_ATTRIBUTES
*attr
, ACCESS_MASK mask
, ULONG arg3
,
563 ULONG arg4
, ULONG arg5
, ULONG arg6
, ULONG arg7
);
564 W32KAPI HDWP WINAPI
NtUserDeferWindowPosAndBand( HDWP hdwp
, HWND hwnd
, HWND after
, INT x
, INT y
,
565 INT cx
, INT cy
, UINT flags
, UINT unk1
, UINT unk2
);
566 W32KAPI BOOL WINAPI
NtUserDeleteMenu( HMENU menu
, UINT id
, UINT flags
);
567 W32KAPI BOOL WINAPI
NtUserDestroyAcceleratorTable( HACCEL handle
);
568 W32KAPI BOOL WINAPI
NtUserDestroyCursor( HCURSOR cursor
, ULONG arg
);
569 W32KAPI BOOL WINAPI
NtUserDestroyInputContext( HIMC handle
);
570 W32KAPI BOOL WINAPI
NtUserDestroyMenu( HMENU menu
);
571 W32KAPI BOOL WINAPI
NtUserDestroyWindow( HWND hwnd
);
572 W32KAPI BOOL WINAPI
NtUserDisableThreadIme( DWORD thread_id
);
573 W32KAPI LRESULT WINAPI
NtUserDispatchMessage( const MSG
*msg
);
574 W32KAPI NTSTATUS WINAPI
NtUserDisplayConfigGetDeviceInfo( DISPLAYCONFIG_DEVICE_INFO_HEADER
*packet
);
575 W32KAPI BOOL WINAPI
NtUserDragDetect( HWND hwnd
, int x
, int y
);
576 W32KAPI DWORD WINAPI
NtUserDragObject( HWND parent
, HWND hwnd
, UINT fmt
, ULONG_PTR data
, HCURSOR cursor
);
577 W32KAPI BOOL WINAPI
NtUserDrawCaptionTemp( HWND hwnd
, HDC hdc
, const RECT
*rect
, HFONT font
,
578 HICON icon
, const WCHAR
*str
, UINT flags
);
579 W32KAPI BOOL WINAPI
NtUserDrawIconEx( HDC hdc
, INT x0
, INT y0
, HICON icon
, INT width
,
580 INT height
, UINT istep
, HBRUSH hbr
, UINT flags
);
581 W32KAPI DWORD WINAPI
NtUserDrawMenuBarTemp( HWND hwnd
, HDC hdc
, RECT
*rect
, HMENU handle
, HFONT font
);
582 W32KAPI BOOL WINAPI
NtUserEmptyClipboard(void);
583 W32KAPI BOOL WINAPI
NtUserEnableMenuItem( HMENU handle
, UINT id
, UINT flags
);
584 W32KAPI BOOL WINAPI
NtUserEnableMouseInPointer( BOOL
);
585 W32KAPI BOOL WINAPI
NtUserEnableScrollBar( HWND hwnd
, UINT bar
, UINT flags
);
586 W32KAPI BOOL WINAPI
NtUserEndDeferWindowPosEx( HDWP hdwp
, BOOL async
);
587 W32KAPI BOOL WINAPI
NtUserEndMenu(void);
588 W32KAPI BOOL WINAPI
NtUserEndPaint( HWND hwnd
, const PAINTSTRUCT
*ps
);
589 W32KAPI NTSTATUS WINAPI
NtUserEnumDisplayDevices( UNICODE_STRING
*device
, DWORD index
,
590 DISPLAY_DEVICEW
*info
, DWORD flags
);
591 W32KAPI BOOL WINAPI
NtUserEnumDisplayMonitors( HDC hdc
, RECT
*rect
, MONITORENUMPROC proc
, LPARAM lp
);
592 W32KAPI BOOL WINAPI
NtUserEnumDisplaySettings( UNICODE_STRING
*device
, DWORD mode
,
593 DEVMODEW
*dev_mode
, DWORD flags
);
594 W32KAPI INT WINAPI
NtUserExcludeUpdateRgn( HDC hdc
, HWND hwnd
);
595 W32KAPI HICON WINAPI
NtUserFindExistingCursorIcon( UNICODE_STRING
*module
, UNICODE_STRING
*res_name
,
597 W32KAPI HWND WINAPI
NtUserFindWindowEx( HWND parent
, HWND child
, UNICODE_STRING
*class,
598 UNICODE_STRING
*title
, ULONG unk
);
599 W32KAPI BOOL WINAPI
NtUserFlashWindowEx( FLASHWINFO
*info
);
600 W32KAPI HWND WINAPI
NtUserGetAncestor( HWND hwnd
, UINT type
);
601 W32KAPI SHORT WINAPI
NtUserGetAsyncKeyState( INT key
);
602 W32KAPI ULONG WINAPI
NtUserGetAtomName( ATOM atom
, UNICODE_STRING
*name
);
603 W32KAPI UINT WINAPI
NtUserGetCaretBlinkTime(void);
604 W32KAPI BOOL WINAPI
NtUserGetCaretPos( POINT
*point
);
605 W32KAPI ATOM WINAPI
NtUserGetClassInfoEx( HINSTANCE instance
, UNICODE_STRING
*name
, WNDCLASSEXW
*wc
,
606 struct client_menu_name
*menu_name
, BOOL ansi
);
607 W32KAPI INT WINAPI
NtUserGetClassName( HWND hwnd
, BOOL real
, UNICODE_STRING
*name
);
608 W32KAPI HANDLE WINAPI
NtUserGetClipboardData( UINT format
, struct get_clipboard_params
*params
);
609 W32KAPI INT WINAPI
NtUserGetClipboardFormatName( UINT format
, WCHAR
*buffer
, INT maxlen
);
610 W32KAPI HWND WINAPI
NtUserGetClipboardOwner(void);
611 W32KAPI DWORD WINAPI
NtUserGetClipboardSequenceNumber(void);
612 W32KAPI HWND WINAPI
NtUserGetClipboardViewer(void);
613 W32KAPI HCURSOR WINAPI
NtUserGetCursor(void);
614 W32KAPI HCURSOR WINAPI
NtUserGetCursorFrameInfo( HCURSOR hCursor
, DWORD istep
, DWORD
*rate_jiffies
,
616 W32KAPI BOOL WINAPI
NtUserGetCursorInfo( CURSORINFO
*info
);
617 W32KAPI HDC WINAPI
NtUserGetDC( HWND hwnd
);
618 W32KAPI HDC WINAPI
NtUserGetDCEx( HWND hwnd
, HRGN clip_rgn
, DWORD flags
);
619 W32KAPI LONG WINAPI
NtUserGetDisplayConfigBufferSizes( UINT32 flags
, UINT32
*num_path_info
,
620 UINT32
*num_mode_info
);
621 W32KAPI UINT WINAPI
NtUserGetDoubleClickTime(void);
622 W32KAPI BOOL WINAPI
NtUserGetDpiForMonitor( HMONITOR monitor
, UINT type
, UINT
*x
, UINT
*y
);
623 W32KAPI HWND WINAPI
NtUserGetForegroundWindow(void);
624 W32KAPI BOOL WINAPI
NtUserGetGUIThreadInfo( DWORD id
, GUITHREADINFO
*info
);
625 W32KAPI BOOL WINAPI
NtUserGetIconInfo( HICON icon
, ICONINFO
*info
, UNICODE_STRING
*module
,
626 UNICODE_STRING
*res_name
, DWORD
*bpp
, LONG unk
);
627 W32KAPI BOOL WINAPI
NtUserGetIconSize( HICON handle
, UINT step
, LONG
*width
, LONG
*height
);
628 W32KAPI UINT WINAPI
NtUserGetInternalWindowPos( HWND hwnd
, RECT
*rect
, POINT
*pt
);
629 W32KAPI INT WINAPI
NtUserGetKeyNameText( LONG lparam
, WCHAR
*buffer
, INT size
);
630 W32KAPI SHORT WINAPI
NtUserGetKeyState( INT vkey
);
631 W32KAPI HKL WINAPI
NtUserGetKeyboardLayout( DWORD thread_id
);
632 W32KAPI UINT WINAPI
NtUserGetKeyboardLayoutList( INT size
, HKL
*layouts
);
633 W32KAPI BOOL WINAPI
NtUserGetKeyboardLayoutName( WCHAR
*name
);
634 W32KAPI BOOL WINAPI
NtUserGetKeyboardState( BYTE
*state
);
635 W32KAPI BOOL WINAPI
NtUserGetLayeredWindowAttributes( HWND hwnd
, COLORREF
*key
, BYTE
*alpha
, DWORD
*flags
);
636 W32KAPI BOOL WINAPI
NtUserGetMenuBarInfo( HWND hwnd
, LONG id
, LONG item
, MENUBARINFO
*info
);
637 W32KAPI BOOL WINAPI
NtUserGetMenuItemRect( HWND hwnd
, HMENU menu
, UINT item
, RECT
*rect
);
638 W32KAPI BOOL WINAPI
NtUserGetMessage( MSG
*msg
, HWND hwnd
, UINT first
, UINT last
);
639 W32KAPI
int WINAPI
NtUserGetMouseMovePointsEx( UINT size
, MOUSEMOVEPOINT
*ptin
, MOUSEMOVEPOINT
*ptout
,
640 int count
, DWORD resolution
);
641 W32KAPI BOOL WINAPI
NtUserGetObjectInformation( HANDLE handle
, INT index
, void *info
,
642 DWORD len
, DWORD
*needed
);
643 W32KAPI HWND WINAPI
NtUserGetOpenClipboardWindow(void);
644 W32KAPI BOOL WINAPI
NtUserGetPointerInfoList( UINT32 id
, POINTER_INPUT_TYPE type
, UINT_PTR
, UINT_PTR
, SIZE_T size
,
645 UINT32
*entry_count
, UINT32
*pointer_count
, void *pointer_info
);
646 W32KAPI INT WINAPI
NtUserGetPriorityClipboardFormat( UINT
*list
, INT count
);
647 W32KAPI HWINSTA WINAPI
NtUserGetProcessWindowStation(void);
648 W32KAPI HANDLE WINAPI
NtUserGetProp( HWND hwnd
, const WCHAR
*str
);
649 W32KAPI ULONG WINAPI
NtUserGetProcessDpiAwarenessContext( HANDLE process
);
650 W32KAPI DWORD WINAPI
NtUserGetQueueStatus( UINT flags
);
651 W32KAPI UINT WINAPI
NtUserGetRawInputBuffer( RAWINPUT
*data
, UINT
*data_size
, UINT header_size
);
652 W32KAPI UINT WINAPI
NtUserGetRawInputData( HRAWINPUT rawinput
, UINT command
, void *data
, UINT
*data_size
, UINT header_size
);
653 W32KAPI UINT WINAPI
NtUserGetRawInputDeviceInfo( HANDLE handle
, UINT command
, void *data
, UINT
*data_size
);
654 W32KAPI UINT WINAPI
NtUserGetRawInputDeviceList( RAWINPUTDEVICELIST
*devices
, UINT
*device_count
, UINT size
);
655 W32KAPI UINT WINAPI
NtUserGetRegisteredRawInputDevices( RAWINPUTDEVICE
*devices
, UINT
*device_count
, UINT size
);
656 W32KAPI BOOL WINAPI
NtUserGetScrollBarInfo( HWND hwnd
, LONG id
, SCROLLBARINFO
*info
);
657 W32KAPI ULONG WINAPI
NtUserGetSystemDpiForProcess( HANDLE process
);
658 W32KAPI HMENU WINAPI
NtUserGetSystemMenu( HWND hwnd
, BOOL revert
);
659 W32KAPI HDESK WINAPI
NtUserGetThreadDesktop( DWORD thread
);
660 W32KAPI BOOL WINAPI
NtUserGetTitleBarInfo( HWND hwnd
, TITLEBARINFO
*info
);
661 W32KAPI INT WINAPI
NtUserGetUpdateRgn( HWND hwnd
, HRGN hrgn
, BOOL erase
);
662 W32KAPI BOOL WINAPI
NtUserGetUpdatedClipboardFormats( UINT
*formats
, UINT size
, UINT
*out_size
);
663 W32KAPI BOOL WINAPI
NtUserGetUpdateRect( HWND hwnd
, RECT
*rect
, BOOL erase
);
664 W32KAPI HDC WINAPI
NtUserGetWindowDC( HWND hwnd
);
665 W32KAPI BOOL WINAPI
NtUserGetWindowPlacement( HWND hwnd
, WINDOWPLACEMENT
*placement
);
666 W32KAPI
int WINAPI
NtUserGetWindowRgnEx( HWND hwnd
, HRGN hrgn
, UINT unk
);
667 W32KAPI BOOL WINAPI
NtUserHideCaret( HWND hwnd
);
668 W32KAPI BOOL WINAPI
NtUserHiliteMenuItem( HWND hwnd
, HMENU handle
, UINT item
, UINT hilite
);
669 W32KAPI NTSTATUS WINAPI
NtUserInitializeClientPfnArrays( const struct user_client_procs
*client_procsA
,
670 const struct user_client_procs
*client_procsW
,
671 const void *client_workers
, HINSTANCE user_module
);
672 W32KAPI HICON WINAPI
NtUserInternalGetWindowIcon( HWND hwnd
, UINT type
);
673 W32KAPI INT WINAPI
NtUserInternalGetWindowText( HWND hwnd
, WCHAR
*text
, INT count
);
674 W32KAPI BOOL WINAPI
NtUserIsClipboardFormatAvailable( UINT format
);
675 W32KAPI BOOL WINAPI
NtUserIsMouseInPointerEnabled(void);
676 W32KAPI BOOL WINAPI
NtUserInvalidateRect( HWND hwnd
, const RECT
*rect
, BOOL erase
);
677 W32KAPI BOOL WINAPI
NtUserInvalidateRgn( HWND hwnd
, HRGN hrgn
, BOOL erase
);
678 W32KAPI BOOL WINAPI
NtUserKillTimer( HWND hwnd
, UINT_PTR id
);
679 W32KAPI BOOL WINAPI
NtUserLockWindowUpdate( HWND hwnd
);
680 W32KAPI BOOL WINAPI
NtUserLogicalToPerMonitorDPIPhysicalPoint( HWND hwnd
, POINT
*pt
);
681 W32KAPI UINT WINAPI
NtUserMapVirtualKeyEx( UINT code
, UINT type
, HKL layout
);
682 W32KAPI INT WINAPI
NtUserMenuItemFromPoint( HWND hwnd
, HMENU handle
, int x
, int y
);
683 W32KAPI LRESULT WINAPI
NtUserMessageCall( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
,
684 void *result_info
, DWORD type
, BOOL ansi
);
685 W32KAPI BOOL WINAPI
NtUserMoveWindow( HWND hwnd
, INT x
, INT y
, INT cx
, INT cy
, BOOL repaint
);
686 W32KAPI DWORD WINAPI
NtUserMsgWaitForMultipleObjectsEx( DWORD count
, const HANDLE
*handles
,
687 DWORD timeout
, DWORD mask
, DWORD flags
);
688 W32KAPI
void WINAPI
NtUserNotifyIMEStatus( HWND hwnd
, UINT status
);
689 W32KAPI
void WINAPI
NtUserNotifyWinEvent( DWORD event
, HWND hwnd
, LONG object_id
, LONG child_id
);
690 W32KAPI HWINSTA WINAPI
NtUserOpenWindowStation( OBJECT_ATTRIBUTES
*attr
, ACCESS_MASK access
);
691 W32KAPI BOOL WINAPI
NtUserOpenClipboard( HWND hwnd
, ULONG unk
);
692 W32KAPI HDESK WINAPI
NtUserOpenDesktop( OBJECT_ATTRIBUTES
*attr
, DWORD flags
, ACCESS_MASK access
);
693 W32KAPI HDESK WINAPI
NtUserOpenInputDesktop( DWORD flags
, BOOL inherit
, ACCESS_MASK access
);
694 W32KAPI BOOL WINAPI
NtUserPeekMessage( MSG
*msg_out
, HWND hwnd
, UINT first
, UINT last
, UINT flags
);
695 W32KAPI BOOL WINAPI
NtUserPerMonitorDPIPhysicalToLogicalPoint( HWND hwnd
, POINT
*pt
);
696 W32KAPI BOOL WINAPI
NtUserPostMessage( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
);
697 W32KAPI BOOL WINAPI
NtUserPostThreadMessage( DWORD thread
, UINT msg
, WPARAM wparam
, LPARAM lparam
);
698 W32KAPI BOOL WINAPI
NtUserPrintWindow( HWND hwnd
, HDC hdc
, UINT flags
);
699 W32KAPI LONG WINAPI
NtUserQueryDisplayConfig( UINT32 flags
, UINT32
*paths_count
, DISPLAYCONFIG_PATH_INFO
*paths
,
700 UINT32
*modes_count
, DISPLAYCONFIG_MODE_INFO
*modes
,
701 DISPLAYCONFIG_TOPOLOGY_ID
*topology_id
);
702 W32KAPI UINT_PTR WINAPI
NtUserQueryInputContext( HIMC handle
, UINT attr
);
703 W32KAPI HWND WINAPI
NtUserRealChildWindowFromPoint( HWND parent
, LONG x
, LONG y
);
704 W32KAPI BOOL WINAPI
NtUserRedrawWindow( HWND hwnd
, const RECT
*rect
, HRGN hrgn
, UINT flags
);
705 W32KAPI ATOM WINAPI
NtUserRegisterClassExWOW( const WNDCLASSEXW
*wc
, UNICODE_STRING
*name
, UNICODE_STRING
*version
,
706 struct client_menu_name
*client_menu_name
, DWORD fnid
, DWORD flags
,
708 W32KAPI BOOL WINAPI
NtUserRegisterHotKey( HWND hwnd
, INT id
, UINT modifiers
, UINT vk
);
709 W32KAPI BOOL WINAPI
NtUserRegisterRawInputDevices( const RAWINPUTDEVICE
*devices
, UINT device_count
, UINT size
);
710 W32KAPI INT WINAPI
NtUserReleaseDC( HWND hwnd
, HDC hdc
);
711 W32KAPI BOOL WINAPI
NtUserRemoveClipboardFormatListener( HWND hwnd
);
712 W32KAPI BOOL WINAPI
NtUserRemoveMenu( HMENU menu
, UINT id
, UINT flags
);
713 W32KAPI HANDLE WINAPI
NtUserRemoveProp( HWND hwnd
, const WCHAR
*str
);
714 W32KAPI BOOL WINAPI
NtUserScrollDC( HDC hdc
, INT dx
, INT dy
, const RECT
*scroll
, const RECT
*clip
,
715 HRGN ret_update_rgn
, RECT
*update_rect
);
716 W32KAPI INT WINAPI
NtUserScrollWindowEx( HWND hwnd
, INT dx
, INT dy
, const RECT
*rect
,
717 const RECT
*clip_rect
, HRGN update_rgn
,
718 RECT
*update_rect
, UINT flags
);
719 W32KAPI HPALETTE WINAPI
NtUserSelectPalette( HDC hdc
, HPALETTE palette
, WORD force_background
);
720 W32KAPI UINT WINAPI
NtUserSendInput( UINT count
, INPUT
*inputs
, int size
);
721 W32KAPI HWND WINAPI
NtUserSetActiveWindow( HWND hwnd
);
722 W32KAPI HWND WINAPI
NtUserSetCapture( HWND hwnd
);
723 W32KAPI DWORD WINAPI
NtUserSetClassLong( HWND hwnd
, INT offset
, LONG newval
, BOOL ansi
);
724 W32KAPI ULONG_PTR WINAPI
NtUserSetClassLongPtr( HWND hwnd
, INT offset
, LONG_PTR newval
, BOOL ansi
);
725 W32KAPI WORD WINAPI
NtUserSetClassWord( HWND hwnd
, INT offset
, WORD newval
);
726 W32KAPI NTSTATUS WINAPI
NtUserSetClipboardData( UINT format
, HANDLE handle
, struct set_clipboard_params
*params
);
727 W32KAPI HWND WINAPI
NtUserSetClipboardViewer( HWND hwnd
);
728 W32KAPI HCURSOR WINAPI
NtUserSetCursor( HCURSOR cursor
);
729 W32KAPI BOOL WINAPI
NtUserSetCursorIconData( HCURSOR cursor
, UNICODE_STRING
*module
, UNICODE_STRING
*res_name
,
730 struct cursoricon_desc
*desc
);
731 W32KAPI BOOL WINAPI
NtUserSetCursorPos( INT x
, INT y
);
732 W32KAPI HWND WINAPI
NtUserSetFocus( HWND hwnd
);
733 W32KAPI
void WINAPI
NtUserSetInternalWindowPos( HWND hwnd
, UINT cmd
, RECT
*rect
, POINT
*pt
);
734 W32KAPI BOOL WINAPI
NtUserSetKeyboardState( BYTE
*state
);
735 W32KAPI BOOL WINAPI
NtUserSetLayeredWindowAttributes( HWND hwnd
, COLORREF key
, BYTE alpha
, DWORD flags
);
736 W32KAPI BOOL WINAPI
NtUserSetMenu( HWND hwnd
, HMENU menu
);
737 W32KAPI BOOL WINAPI
NtUserSetMenuContextHelpId( HMENU handle
, DWORD id
);
738 W32KAPI BOOL WINAPI
NtUserSetMenuDefaultItem( HMENU handle
, UINT item
, UINT bypos
);
739 W32KAPI BOOL WINAPI
NtUserSetObjectInformation( HANDLE handle
, INT index
, void *info
, DWORD len
);
740 W32KAPI HWND WINAPI
NtUserSetParent( HWND hwnd
, HWND parent
);
741 W32KAPI BOOL WINAPI
NtUserSetProcessDpiAwarenessContext( ULONG awareness
, ULONG unknown
);
742 W32KAPI BOOL WINAPI
NtUserSetProcessWindowStation( HWINSTA handle
);
743 W32KAPI BOOL WINAPI
NtUserSetProp( HWND hwnd
, const WCHAR
*str
, HANDLE handle
);
744 W32KAPI INT WINAPI
NtUserSetScrollInfo( HWND hwnd
, INT bar
, const SCROLLINFO
*info
, BOOL redraw
);
745 W32KAPI BOOL WINAPI
NtUserSetShellWindowEx( HWND shell
, HWND list_view
);
746 W32KAPI BOOL WINAPI
NtUserSetSysColors( INT count
, const INT
*colors
, const COLORREF
*values
);
747 W32KAPI BOOL WINAPI
NtUserSetSystemMenu( HWND hwnd
, HMENU menu
);
748 W32KAPI UINT_PTR WINAPI
NtUserSetSystemTimer( HWND hwnd
, UINT_PTR id
, UINT timeout
);
749 W32KAPI BOOL WINAPI
NtUserSetThreadDesktop( HDESK handle
);
750 W32KAPI UINT_PTR WINAPI
NtUserSetTimer( HWND hwnd
, UINT_PTR id
, UINT timeout
, TIMERPROC proc
, ULONG tolerance
);
751 W32KAPI LONG WINAPI
NtUserSetWindowLong( HWND hwnd
, INT offset
, LONG newval
, BOOL ansi
);
752 W32KAPI LONG_PTR WINAPI
NtUserSetWindowLongPtr( HWND hwnd
, INT offset
, LONG_PTR newval
, BOOL ansi
);
753 W32KAPI BOOL WINAPI
NtUserSetWindowPlacement( HWND hwnd
, const WINDOWPLACEMENT
*wpl
);
754 W32KAPI BOOL WINAPI
NtUserSetWindowPos( HWND hwnd
, HWND after
, INT x
, INT y
, INT cx
, INT cy
, UINT flags
);
755 W32KAPI
int WINAPI
NtUserSetWindowRgn( HWND hwnd
, HRGN hrgn
, BOOL redraw
);
756 W32KAPI WORD WINAPI
NtUserSetWindowWord( HWND hwnd
, INT offset
, WORD newval
);
757 W32KAPI HHOOK WINAPI
NtUserSetWindowsHookEx( HINSTANCE inst
, UNICODE_STRING
*module
, DWORD tid
, INT id
,
758 HOOKPROC proc
, BOOL ansi
);
759 W32KAPI HWINEVENTHOOK WINAPI
NtUserSetWinEventHook( DWORD event_min
, DWORD event_max
, HMODULE inst
,
760 UNICODE_STRING
*module
, WINEVENTPROC proc
,
761 DWORD pid
, DWORD tid
, DWORD flags
);
762 W32KAPI BOOL WINAPI
NtUserShowCaret( HWND hwnd
);
763 W32KAPI INT WINAPI
NtUserShowCursor( BOOL show
);
764 W32KAPI BOOL WINAPI
NtUserShowScrollBar( HWND hwnd
, INT bar
, BOOL show
);
765 W32KAPI BOOL WINAPI
NtUserShowWindow( HWND hwnd
, INT cmd
);
766 W32KAPI BOOL WINAPI
NtUserShowWindowAsync( HWND hwnd
, INT cmd
);
767 W32KAPI BOOL WINAPI
NtUserSystemParametersInfo( UINT action
, UINT val
, void *ptr
, UINT winini
);
768 W32KAPI BOOL WINAPI
NtUserSystemParametersInfoForDpi( UINT action
, UINT val
, PVOID ptr
, UINT winini
, UINT dpi
);
769 W32KAPI BOOL WINAPI
NtUserThunkedMenuInfo( HMENU menu
, const MENUINFO
*info
);
770 W32KAPI UINT WINAPI
NtUserThunkedMenuItemInfo( HMENU menu
, UINT pos
, UINT flags
, UINT method
,
771 MENUITEMINFOW
*info
, UNICODE_STRING
*str
);
772 W32KAPI INT WINAPI
NtUserToUnicodeEx( UINT virt
, UINT scan
, const BYTE
*state
,
773 WCHAR
*str
, int size
, UINT flags
, HKL layout
);
774 W32KAPI BOOL WINAPI
NtUserTrackMouseEvent( TRACKMOUSEEVENT
*info
);
775 W32KAPI BOOL WINAPI
NtUserTrackPopupMenuEx( HMENU handle
, UINT flags
, INT x
, INT y
, HWND hwnd
, TPMPARAMS
*params
);
776 W32KAPI INT WINAPI
NtUserTranslateAccelerator( HWND hwnd
, HACCEL accel
, MSG
*msg
);
777 W32KAPI BOOL WINAPI
NtUserTranslateMessage( const MSG
*msg
, UINT flags
);
778 W32KAPI BOOL WINAPI
NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook
);
779 W32KAPI BOOL WINAPI
NtUserUnhookWindowsHookEx( HHOOK handle
);
780 W32KAPI BOOL WINAPI
NtUserUnregisterClass( UNICODE_STRING
*name
, HINSTANCE instance
,
781 struct client_menu_name
*client_menu_name
);
782 W32KAPI BOOL WINAPI
NtUserUnregisterHotKey( HWND hwnd
, INT id
);
783 W32KAPI BOOL WINAPI
NtUserUpdateInputContext( HIMC handle
, UINT attr
, UINT_PTR value
);
784 W32KAPI BOOL WINAPI
NtUserUpdateLayeredWindow( HWND hwnd
, HDC hdc_dst
, const POINT
*pts_dst
, const SIZE
*size
,
785 HDC hdc_src
, const POINT
*pts_src
, COLORREF key
,
786 const BLENDFUNCTION
*blend
, DWORD flags
, const RECT
*dirty
);
787 W32KAPI BOOL WINAPI
NtUserValidateRect( HWND hwnd
, const RECT
*rect
);
788 W32KAPI WORD WINAPI
NtUserVkKeyScanEx( WCHAR chr
, HKL layout
);
789 W32KAPI DWORD WINAPI
NtUserWaitForInputIdle( HANDLE process
, DWORD timeout
, BOOL wow
);
790 W32KAPI BOOL WINAPI
NtUserWaitMessage(void);
791 W32KAPI HWND WINAPI
NtUserWindowFromDC( HDC hdc
);
792 W32KAPI HWND WINAPI
NtUserWindowFromPoint( LONG x
, LONG y
);
794 /* NtUserCallNoParam codes, not compatible with Windows */
797 NtUserCallNoParam_DestroyCaret
,
798 NtUserCallNoParam_GetDesktopWindow
,
799 NtUserCallNoParam_GetDialogBaseUnits
,
800 NtUserCallNoParam_GetInputState
,
801 NtUserCallNoParam_GetProcessDefaultLayout
,
802 NtUserCallNoParam_GetProgmanWindow
,
803 NtUserCallNoParam_GetShellWindow
,
804 NtUserCallNoParam_GetTaskmanWindow
,
805 NtUserCallNoParam_ReleaseCapture
,
806 /* temporary exports */
811 static inline BOOL
NtUserDestroyCaret(void)
813 return NtUserCallNoParam( NtUserCallNoParam_DestroyCaret
);
816 static inline HWND
NtUserGetDesktopWindow(void)
818 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetDesktopWindow
));
821 static inline DWORD
NtUserGetDialogBaseUnits(void)
823 return NtUserCallNoParam( NtUserCallNoParam_GetDialogBaseUnits
);
826 static inline BOOL
NtUserGetInputState(void)
828 return NtUserCallNoParam( NtUserCallNoParam_GetInputState
);
831 static inline DWORD
NtUserGetProcessDefaultLayout(void)
833 return NtUserCallNoParam( NtUserCallNoParam_GetProcessDefaultLayout
);
836 static inline HWND
NtUserGetProgmanWindow(void)
838 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetProgmanWindow
));
841 static inline HWND
NtUserGetShellWindow(void)
843 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetShellWindow
));
846 static inline HWND
NtUserGetTaskmanWindow(void)
848 return UlongToHandle( NtUserCallNoParam( NtUserCallNoParam_GetTaskmanWindow
));
851 static inline BOOL
NtUserReleaseCapture(void)
853 return NtUserCallNoParam( NtUserCallNoParam_ReleaseCapture
);
856 /* NtUserCallOneParam codes, not compatible with Windows */
859 NtUserCallOneParam_BeginDeferWindowPos
,
860 NtUserCallOneParam_CreateCursorIcon
,
861 NtUserCallOneParam_CreateMenu
,
862 NtUserCallOneParam_EnableDC
,
863 NtUserCallOneParam_EnableThunkLock
,
864 NtUserCallOneParam_EnumClipboardFormats
,
865 NtUserCallOneParam_GetClipCursor
,
866 NtUserCallOneParam_GetCursorPos
,
867 NtUserCallOneParam_GetIconParam
,
868 NtUserCallOneParam_GetMenuItemCount
,
869 NtUserCallOneParam_GetPrimaryMonitorRect
,
870 NtUserCallOneParam_GetSysColor
,
871 NtUserCallOneParam_GetSysColorBrush
,
872 NtUserCallOneParam_GetSysColorPen
,
873 NtUserCallOneParam_GetSystemMetrics
,
874 NtUserCallOneParam_GetVirtualScreenRect
,
875 NtUserCallOneParam_IsWindowRectFullScreen
,
876 NtUserCallOneParam_MessageBeep
,
877 NtUserCallOneParam_RealizePalette
,
878 NtUserCallOneParam_ReplyMessage
,
879 NtUserCallOneParam_SetCaretBlinkTime
,
880 NtUserCallOneParam_SetProcessDefaultLayout
,
881 NtUserCallOneParam_SetKeyboardAutoRepeat
,
882 /* temporary exports */
883 NtUserGetDeskPattern
,
886 static inline HDWP
NtUserBeginDeferWindowPos( INT count
)
888 return UlongToHandle( NtUserCallOneParam( count
, NtUserCallOneParam_BeginDeferWindowPos
));
891 static inline HICON
NtUserCreateCursorIcon( BOOL is_icon
)
893 return UlongToHandle( NtUserCallOneParam( is_icon
, NtUserCallOneParam_CreateCursorIcon
));
896 static inline HMENU
NtUserCreateMenu( BOOL is_popup
)
898 return UlongToHandle( NtUserCallOneParam( is_popup
, NtUserCallOneParam_CreateMenu
));
901 static inline WORD
NtUserEnableDC( HDC hdc
)
903 return NtUserCallOneParam( HandleToUlong(hdc
), NtUserCallOneParam_EnableDC
);
906 static inline void NtUserEnableThunkLock( BOOL enable
)
908 NtUserCallOneParam( enable
, NtUserCallOneParam_EnableThunkLock
);
911 static inline UINT
NtUserEnumClipboardFormats( UINT format
)
913 return NtUserCallOneParam( format
, NtUserCallOneParam_EnumClipboardFormats
);
916 static inline BOOL
NtUserGetClipCursor( RECT
*rect
)
918 return NtUserCallOneParam( (UINT_PTR
)rect
, NtUserCallOneParam_GetClipCursor
);
921 static inline BOOL
NtUserGetCursorPos( POINT
*pt
)
923 return NtUserCallOneParam( (UINT_PTR
)pt
, NtUserCallOneParam_GetCursorPos
);
926 static inline UINT_PTR
NtUserGetIconParam( HICON icon
)
928 return NtUserCallOneParam( HandleToUlong(icon
), NtUserCallOneParam_GetIconParam
);
931 static inline UINT_PTR
NtUserGetMenuItemCount( HMENU menu
)
933 return NtUserCallOneParam( HandleToUlong(menu
), NtUserCallOneParam_GetMenuItemCount
);
936 static inline RECT
NtUserGetPrimaryMonitorRect(void)
939 NtUserCallOneParam( (UINT_PTR
)&primary
, NtUserCallOneParam_GetPrimaryMonitorRect
);
943 static inline BOOL
NtUserSetCaretBlinkTime( unsigned int time
)
945 return NtUserCallOneParam( time
, NtUserCallOneParam_SetCaretBlinkTime
);
948 static inline COLORREF
NtUserGetSysColor( INT index
)
950 return NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColor
);
953 static inline HBRUSH
NtUserGetSysColorBrush( INT index
)
955 return UlongToHandle( NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColorBrush
));
958 static inline HPEN
NtUserGetSysColorPen( INT index
)
960 return UlongToHandle( NtUserCallOneParam( index
, NtUserCallOneParam_GetSysColorPen
));
963 static inline INT
NtUserGetSystemMetrics( INT index
)
965 return NtUserCallOneParam( index
, NtUserCallOneParam_GetSystemMetrics
);
968 static inline RECT
NtUserGetVirtualScreenRect(void)
971 NtUserCallOneParam( (UINT_PTR
)&virtual, NtUserCallOneParam_GetVirtualScreenRect
);
975 static inline BOOL
NtUserIsWindowRectFullScreen( const RECT
*rect
)
977 return NtUserCallOneParam( (UINT_PTR
)rect
, NtUserCallOneParam_IsWindowRectFullScreen
);
980 static inline BOOL
NtUserMessageBeep( UINT i
)
982 return NtUserCallOneParam( i
, NtUserCallOneParam_MessageBeep
);
985 static inline UINT
NtUserRealizePalette( HDC hdc
)
987 return NtUserCallOneParam( HandleToUlong(hdc
), NtUserCallOneParam_RealizePalette
);
990 static inline BOOL
NtUserReplyMessage( LRESULT result
)
992 return NtUserCallOneParam( result
, NtUserCallOneParam_ReplyMessage
);
995 static inline UINT
NtUserSetProcessDefaultLayout( DWORD layout
)
997 return NtUserCallOneParam( layout
, NtUserCallOneParam_SetProcessDefaultLayout
);
1000 /* NtUserCallTwoParam codes, not compatible with Windows */
1003 NtUserCallTwoParam_GetDialogProc
,
1004 NtUserCallTwoParam_GetMenuInfo
,
1005 NtUserCallTwoParam_GetMonitorInfo
,
1006 NtUserCallTwoParam_GetSystemMetricsForDpi
,
1007 NtUserCallTwoParam_MonitorFromRect
,
1008 NtUserCallTwoParam_SetCaretPos
,
1009 NtUserCallTwoParam_SetIconParam
,
1010 NtUserCallTwoParam_UnhookWindowsHook
,
1011 /* temporary exports */
1015 static inline DLGPROC
NtUserGetDialogProc( DLGPROC proc
, BOOL ansi
)
1017 return (DLGPROC
)NtUserCallTwoParam( (UINT_PTR
)proc
, ansi
, NtUserCallTwoParam_GetDialogProc
);
1020 static inline BOOL
NtUserGetMenuInfo( HMENU menu
, MENUINFO
*info
)
1022 return NtUserCallTwoParam( HandleToUlong(menu
), (ULONG_PTR
)info
,
1023 NtUserCallTwoParam_GetMenuInfo
);
1026 static inline BOOL
NtUserGetMonitorInfo( HMONITOR monitor
, MONITORINFO
*info
)
1028 return NtUserCallTwoParam( HandleToUlong(monitor
), (ULONG_PTR
)info
,
1029 NtUserCallTwoParam_GetMonitorInfo
);
1032 static inline INT
NtUserGetSystemMetricsForDpi( INT index
, UINT dpi
)
1034 return NtUserCallTwoParam( index
, dpi
, NtUserCallTwoParam_GetSystemMetricsForDpi
);
1037 static inline HMONITOR
NtUserMonitorFromRect( const RECT
*rect
, DWORD flags
)
1039 ULONG ret
= NtUserCallTwoParam( (LONG_PTR
)rect
, flags
, NtUserCallTwoParam_MonitorFromRect
);
1040 return UlongToHandle( ret
);
1043 static inline BOOL
NtUserSetCaretPos( int x
, int y
)
1045 return NtUserCallTwoParam( x
, y
, NtUserCallTwoParam_SetCaretPos
);
1048 static inline UINT_PTR
NtUserSetIconParam( HICON icon
, ULONG_PTR param
)
1050 return NtUserCallTwoParam( HandleToUlong(icon
), param
, NtUserCallTwoParam_SetIconParam
);
1053 static inline BOOL
NtUserUnhookWindowsHook( INT id
, HOOKPROC proc
)
1055 return NtUserCallTwoParam( id
, (UINT_PTR
)proc
, NtUserCallTwoParam_UnhookWindowsHook
);
1058 /* NtUserCallHwnd codes, not compatible with Windows */
1061 NtUserCallHwnd_ActivateOtherWindow
,
1062 NtUserCallHwnd_ArrangeIconicWindows
,
1063 NtUserCallHwnd_DrawMenuBar
,
1064 NtUserCallHwnd_GetDefaultImeWindow
,
1065 NtUserCallHwnd_GetDialogInfo
,
1066 NtUserCallHwnd_GetDpiForWindow
,
1067 NtUserCallHwnd_GetMDIClientInfo
,
1068 NtUserCallHwnd_GetParent
,
1069 NtUserCallHwnd_GetWindowContextHelpId
,
1070 NtUserCallHwnd_GetWindowDpiAwarenessContext
,
1071 NtUserCallHwnd_GetWindowInputContext
,
1072 NtUserCallHwnd_GetWindowSysSubMenu
,
1073 NtUserCallHwnd_GetWindowTextLength
,
1074 NtUserCallHwnd_IsWindow
,
1075 NtUserCallHwnd_IsWindowEnabled
,
1076 NtUserCallHwnd_IsWindowUnicode
,
1077 NtUserCallHwnd_IsWindowVisible
,
1078 NtUserCallHwnd_SetForegroundWindow
,
1079 NtUserCallHwnd_SetProgmanWindow
,
1080 NtUserCallHwnd_SetTaskmanWindow
,
1081 /* temporary exports */
1082 NtUserGetFullWindowHandle
,
1083 NtUserIsCurrentProcessWindow
,
1084 NtUserIsCurrentThreadWindow
,
1087 static inline void NtUserActivateOtherWindow( HWND hwnd
)
1089 NtUserCallHwnd( hwnd
, NtUserCallHwnd_ActivateOtherWindow
);
1092 static inline UINT
NtUserArrangeIconicWindows( HWND parent
)
1094 return NtUserCallHwnd( parent
, NtUserCallHwnd_ArrangeIconicWindows
);
1097 static inline BOOL
NtUserDrawMenuBar( HWND hwnd
)
1099 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_DrawMenuBar
);
1102 static inline DWORD
NtUserGetWindowContextHelpId( HWND hwnd
)
1104 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowContextHelpId
);
1107 static inline HWND
NtUserGetDefaultImeWindow( HWND hwnd
)
1109 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDefaultImeWindow
));
1112 static inline void *NtUserGetDialogInfo( HWND hwnd
)
1114 return (void *)NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDialogInfo
);
1117 static inline UINT
NtUserGetDpiForWindow( HWND hwnd
)
1119 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetDpiForWindow
);
1122 static inline void *NtUserGetMDIClientInfo( HWND hwnd
)
1124 return (void *)NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetMDIClientInfo
);
1127 static inline HWND
NtUserGetParent( HWND hwnd
)
1129 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetParent
));
1132 static inline DPI_AWARENESS_CONTEXT
NtUserGetWindowDpiAwarenessContext( HWND hwnd
)
1134 return (DPI_AWARENESS_CONTEXT
)NtUserCallHwnd( hwnd
,
1135 NtUserCallHwnd_GetWindowDpiAwarenessContext
);
1138 static inline HIMC
NtUserGetWindowInputContext( HWND hwnd
)
1140 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowInputContext
));
1143 static inline HMENU
NtUserGetWindowSysSubMenu( HWND hwnd
)
1145 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowSysSubMenu
));
1148 static inline INT
NtUserGetWindowTextLength( HWND hwnd
)
1150 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_GetWindowTextLength
);
1153 static inline BOOL
NtUserIsWindow( HWND hwnd
)
1155 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindow
);
1158 static inline BOOL
NtUserIsWindowEnabled( HWND hwnd
)
1160 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowEnabled
);
1163 static inline BOOL
NtUserIsWindowUnicode( HWND hwnd
)
1165 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowUnicode
);
1168 static inline BOOL
NtUserIsWindowVisible( HWND hwnd
)
1170 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_IsWindowVisible
);
1173 static inline BOOL
NtUserSetForegroundWindow( HWND hwnd
)
1175 return NtUserCallHwnd( hwnd
, NtUserCallHwnd_SetForegroundWindow
);
1178 static inline HWND
NtUserSetProgmanWindow( HWND hwnd
)
1180 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_SetProgmanWindow
));
1183 static inline HWND
NtUserSetTaskmanWindow( HWND hwnd
)
1185 return UlongToHandle( NtUserCallHwnd( hwnd
, NtUserCallHwnd_SetTaskmanWindow
));
1188 /* NtUserCallHwndParam codes, not compatible with Windows */
1191 NtUserCallHwndParam_ClientToScreen
,
1192 NtUserCallHwndParam_EnableWindow
,
1193 NtUserCallHwndParam_GetChildRect
,
1194 NtUserCallHwndParam_GetClassLongA
,
1195 NtUserCallHwndParam_GetClassLongW
,
1196 NtUserCallHwndParam_GetClassLongPtrA
,
1197 NtUserCallHwndParam_GetClassLongPtrW
,
1198 NtUserCallHwndParam_GetClassWord
,
1199 NtUserCallHwndParam_GetClientRect
,
1200 NtUserCallHwndParam_GetScrollInfo
,
1201 NtUserCallHwndParam_GetWindowInfo
,
1202 NtUserCallHwndParam_GetWindowLongA
,
1203 NtUserCallHwndParam_GetWindowLongW
,
1204 NtUserCallHwndParam_GetWindowLongPtrA
,
1205 NtUserCallHwndParam_GetWindowLongPtrW
,
1206 NtUserCallHwndParam_GetWindowRect
,
1207 NtUserCallHwndParam_GetWindowRelative
,
1208 NtUserCallHwndParam_GetWindowThread
,
1209 NtUserCallHwndParam_GetWindowWord
,
1210 NtUserCallHwndParam_IsChild
,
1211 NtUserCallHwndParam_KillSystemTimer
,
1212 NtUserCallHwndParam_MapWindowPoints
,
1213 NtUserCallHwndParam_MirrorRgn
,
1214 NtUserCallHwndParam_MonitorFromWindow
,
1215 NtUserCallHwndParam_ScreenToClient
,
1216 NtUserCallHwndParam_SetDialogInfo
,
1217 NtUserCallHwndParam_SetMDIClientInfo
,
1218 NtUserCallHwndParam_SetWindowContextHelpId
,
1219 NtUserCallHwndParam_ShowOwnedPopups
,
1220 /* temporary exports */
1221 NtUserSetWindowStyle
,
1224 static inline BOOL
NtUserClientToScreen( HWND hwnd
, POINT
*pt
)
1226 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)pt
, NtUserCallHwndParam_ClientToScreen
);
1229 static inline BOOL
NtUserEnableWindow( HWND hwnd
, BOOL enable
)
1231 return NtUserCallHwndParam( hwnd
, enable
, NtUserCallHwndParam_EnableWindow
);
1234 static inline BOOL
NtUserGetChildRect( HWND hwnd
, RECT
*rect
)
1236 return NtUserCallHwndParam( hwnd
, (UINT_PTR
)rect
, NtUserCallHwndParam_GetChildRect
);
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 void NtUserSetDialogInfo( HWND hwnd
, void *info
)
1372 NtUserCallHwndParam( hwnd
, (UINT_PTR
)info
, NtUserCallHwndParam_SetDialogInfo
);
1375 static inline void NtUserSetMDIClientInfo( HWND hwnd
, void *info
)
1377 NtUserCallHwndParam( hwnd
, (UINT_PTR
)info
, NtUserCallHwndParam_SetMDIClientInfo
);
1380 static inline BOOL
NtUserSetWindowContextHelpId( HWND hwnd
, DWORD id
)
1382 return NtUserCallHwndParam( hwnd
, id
, NtUserCallHwndParam_SetWindowContextHelpId
);
1385 static inline BOOL
NtUserShowOwnedPopups( HWND hwnd
, BOOL show
)
1387 return NtUserCallHwndParam( hwnd
, show
, NtUserCallHwndParam_ShowOwnedPopups
);
1390 /* Wine extensions */
1391 W32KAPI BOOL WINAPI
__wine_send_input( HWND hwnd
, const INPUT
*input
, const RAWINPUT
*rawinput
);
1393 #endif /* _NTUSER_ */