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
26 /* KernelCallbackTable codes, not compatible with Windows */
29 NtUserCallEnumDisplayMonitor
,
30 NtUserCallVulkanDebugReportCallback
,
31 NtUserCallVulkanDebugUtilsCallback
,
35 /* NtUserCallEnumDisplayMonitor params */
36 struct enum_display_monitor_params
45 /* process DPI awareness contexts */
46 #define NTUSER_DPI_UNAWARE 0x00006010
47 #define NTUSER_DPI_SYSTEM_AWARE 0x00006011
48 #define NTUSER_DPI_PER_MONITOR_AWARE 0x00000012
49 #define NTUSER_DPI_PER_MONITOR_AWARE_V2 0x00000022
50 #define NTUSER_DPI_PER_UNAWARE_GDISCALED 0x40006010
52 /* NtUserCallOneParam codes, not compatible with Windows */
56 NtUserGetSysColorBrush
,
58 NtUserGetSystemMetrics
,
60 /* temporary exports */
64 /* NtUserCallTwoParam codes, not compatible with Windows */
68 NtUserGetSystemMetricsForDpi
,
72 /* color index used to retrieve system 55aa brush */
73 #define COLOR_55AA_BRUSH 0x100
75 /* this is the structure stored in TEB->Win32ClientInfo */
76 /* no attempt is made to keep the layout compatible with the Windows one */
77 struct user_thread_info
79 HANDLE server_queue
; /* Handle to server-side queue */
80 DWORD wake_mask
; /* Current queue wake mask */
81 DWORD changed_mask
; /* Current queue changed mask */
82 WORD recursion_count
; /* SendMessage recursion counter */
83 WORD message_count
; /* Get/PeekMessage loop counter */
84 WORD hook_call_depth
; /* Number of recursively called hook procs */
85 WORD hook_unicode
; /* Is current hook unicode? */
86 HHOOK hook
; /* Current hook */
87 UINT active_hooks
; /* Bitmap of active hooks */
88 DPI_AWARENESS dpi_awareness
; /* DPI awareness */
89 INPUT_MESSAGE_SOURCE msg_source
; /* Message source for current message */
90 struct received_message_info
*receive_info
; /* Message being currently received */
91 struct wm_char_mapping_data
*wmchar_data
; /* Data for WM_CHAR mappings */
92 DWORD GetMessageTimeVal
; /* Value for GetMessageTime */
93 DWORD GetMessagePosVal
; /* Value for GetMessagePos */
94 ULONG_PTR GetMessageExtraInfoVal
; /* Value for GetMessageExtraInfo */
95 struct user_key_state_info
*key_state
; /* Cache of global key state */
96 HKL kbd_layout
; /* Current keyboard layout */
97 DWORD kbd_layout_id
; /* Current keyboard layout ID */
98 HWND top_window
; /* Desktop window */
99 HWND msg_window
; /* HWND_MESSAGE parent window */
100 struct rawinput_thread_data
*rawinput
; /* RawInput thread local data / buffer */
103 C_ASSERT( sizeof(struct user_thread_info
) <= sizeof(((TEB
*)0)->Win32ClientInfo
) );
105 HKL WINAPI
NtUserActivateKeyboardLayout( HKL layout
, UINT flags
);
106 BOOL WINAPI
NtUserAddClipboardFormatListener( HWND hwnd
);
107 BOOL WINAPI
NtUserAttachThreadInput( DWORD from
, DWORD to
, BOOL attach
);
108 ULONG_PTR WINAPI
NtUserCallOneParam( ULONG_PTR arg
, ULONG code
);
109 ULONG_PTR WINAPI
NtUserCallTwoParam( ULONG_PTR arg1
, ULONG_PTR arg2
, ULONG code
);
110 LONG WINAPI
NtUserChangeDisplaySettings( UNICODE_STRING
*devname
, DEVMODEW
*devmode
, HWND hwnd
,
111 DWORD flags
, void *lparam
);
112 BOOL WINAPI
NtUserCloseDesktop( HDESK handle
);
113 BOOL WINAPI
NtUserCloseWindowStation( HWINSTA handle
);
114 INT WINAPI
NtUserCountClipboardFormats(void);
115 HDESK WINAPI
NtUserCreateDesktopEx( OBJECT_ATTRIBUTES
*attr
, UNICODE_STRING
*device
,
116 DEVMODEW
*devmode
, DWORD flags
, ACCESS_MASK access
,
118 HWINSTA WINAPI
NtUserCreateWindowStation( OBJECT_ATTRIBUTES
*attr
, ACCESS_MASK mask
, ULONG arg3
,
119 ULONG arg4
, ULONG arg5
, ULONG arg6
, ULONG arg7
);
120 NTSTATUS WINAPI
NtUserEnumDisplayDevices( UNICODE_STRING
*device
, DWORD index
,
121 DISPLAY_DEVICEW
*info
, DWORD flags
);
122 BOOL WINAPI
NtUserEnumDisplayMonitors( HDC hdc
, RECT
*rect
, MONITORENUMPROC proc
, LPARAM lp
);
123 BOOL WINAPI
NtUserEnumDisplaySettings( UNICODE_STRING
*device
, DWORD mode
,
124 DEVMODEW
*dev_mode
, DWORD flags
);
125 INT WINAPI
NtUserGetClipboardFormatName( UINT format
, WCHAR
*buffer
, INT maxlen
);
126 HWND WINAPI
NtUserGetClipboardOwner(void);
127 DWORD WINAPI
NtUserGetClipboardSequenceNumber(void);
128 HWND WINAPI
NtUserGetClipboardViewer(void);
129 HCURSOR WINAPI
NtUserGetCursor(void);
130 LONG WINAPI
NtUserGetDisplayConfigBufferSizes( UINT32 flags
, UINT32
*num_path_info
,
131 UINT32
*num_mode_info
);
132 UINT WINAPI
NtUserGetDoubleClickTime(void);
133 BOOL WINAPI
NtUserGetDpiForMonitor( HMONITOR monitor
, UINT type
, UINT
*x
, UINT
*y
);
134 INT WINAPI
NtUserGetKeyNameText( LONG lparam
, WCHAR
*buffer
, INT size
);
135 SHORT WINAPI
NtUserGetKeyState( INT vkey
);
136 HKL WINAPI
NtUserGetKeyboardLayout( DWORD thread_id
);
137 UINT WINAPI
NtUserGetKeyboardLayoutList( INT size
, HKL
*layouts
);
138 BOOL WINAPI
NtUserGetKeyboardLayoutName( WCHAR
*name
);
139 BOOL WINAPI
NtUserGetKeyboardState( BYTE
*state
);
140 BOOL WINAPI
NtUserGetLayeredWindowAttributes( HWND hwnd
, COLORREF
*key
, BYTE
*alpha
, DWORD
*flags
);
141 int WINAPI
NtUserGetMouseMovePointsEx( UINT size
, MOUSEMOVEPOINT
*ptin
, MOUSEMOVEPOINT
*ptout
,
142 int count
, DWORD resolution
);
143 BOOL WINAPI
NtUserGetObjectInformation( HANDLE handle
, INT index
, void *info
,
144 DWORD len
, DWORD
*needed
);
145 HWND WINAPI
NtUserGetOpenClipboardWindow(void);
146 INT WINAPI
NtUserGetPriorityClipboardFormat( UINT
*list
, INT count
);
147 HWINSTA WINAPI
NtUserGetProcessWindowStation(void);
148 HANDLE WINAPI
NtUserGetProp( HWND hwnd
, const WCHAR
*str
);
149 ULONG WINAPI
NtUserGetProcessDpiAwarenessContext( HANDLE process
);
150 ULONG WINAPI
NtUserGetSystemDpiForProcess( HANDLE process
);
151 HDESK WINAPI
NtUserGetThreadDesktop( DWORD thread
);
152 BOOL WINAPI
NtUserGetUpdatedClipboardFormats( UINT
*formats
, UINT size
, UINT
*out_size
);
153 BOOL WINAPI
NtUserIsClipboardFormatAvailable( UINT format
);
154 UINT WINAPI
NtUserMapVirtualKeyEx( UINT code
, UINT type
, HKL layout
);
155 HWINSTA WINAPI
NtUserOpenWindowStation( OBJECT_ATTRIBUTES
*attr
, ACCESS_MASK access
);
156 BOOL WINAPI
NtUserSetObjectInformation( HANDLE handle
, INT index
, void *info
, DWORD len
);
157 HDESK WINAPI
NtUserOpenDesktop( OBJECT_ATTRIBUTES
*attr
, DWORD flags
, ACCESS_MASK access
);
158 HDESK WINAPI
NtUserOpenInputDesktop( DWORD flags
, BOOL inherit
, ACCESS_MASK access
);
159 BOOL WINAPI
NtUserRemoveClipboardFormatListener( HWND hwnd
);
160 HANDLE WINAPI
NtUserRemoveProp( HWND hwnd
, const WCHAR
*str
);
161 BOOL WINAPI
NtUserScrollDC( HDC hdc
, INT dx
, INT dy
, const RECT
*scroll
, const RECT
*clip
,
162 HRGN ret_update_rgn
, RECT
*update_rect
);
163 HPALETTE WINAPI
NtUserSelectPalette( HDC hdc
, HPALETTE palette
, WORD force_background
);
164 BOOL WINAPI
NtUserSetKeyboardState( BYTE
*state
);
165 BOOL WINAPI
NtUserSetProcessDpiAwarenessContext( ULONG awareness
, ULONG unknown
);
166 BOOL WINAPI
NtUserSetProcessWindowStation( HWINSTA handle
);
167 BOOL WINAPI
NtUserSetProp( HWND hwnd
, const WCHAR
*str
, HANDLE handle
);
168 BOOL WINAPI
NtUserSetSysColors( INT count
, const INT
*colors
, const COLORREF
*values
);
169 BOOL WINAPI
NtUserSetThreadDesktop( HDESK handle
);
170 INT WINAPI
NtUserShowCursor( BOOL show
);
171 BOOL WINAPI
NtUserSystemParametersInfo( UINT action
, UINT val
, void *ptr
, UINT winini
);
172 BOOL WINAPI
NtUserSystemParametersInfoForDpi( UINT action
, UINT val
, PVOID ptr
, UINT winini
, UINT dpi
);
173 INT WINAPI
NtUserToUnicodeEx( UINT virt
, UINT scan
, const BYTE
*state
,
174 WCHAR
*str
, int size
, UINT flags
, HKL layout
);
175 BOOL WINAPI
NtUserUnregisterHotKey( HWND hwnd
, INT id
);
176 WORD WINAPI
NtUserVkKeyScanEx( WCHAR chr
, HKL layout
);
178 #endif /* _NTUSER_ */