win32u: Move NtUserSetWinEventHook implementation from user32.
[wine.git] / include / ntuser.h
blob65e9d20d90aa7524ef49ca038a3cecdfac11b8e3
1 /*
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
19 #ifndef _NTUSER_
20 #define _NTUSER_
22 #include <winuser.h>
23 #include <wingdi.h>
24 #include <winternl.h>
26 /* KernelCallbackTable codes, not compatible with Windows */
27 enum
29 NtUserCallEnumDisplayMonitor,
30 NtUserCallVulkanDebugReportCallback,
31 NtUserCallVulkanDebugUtilsCallback,
32 NtUserCallCount
35 /* NtUserCallEnumDisplayMonitor params */
36 struct enum_display_monitor_params
38 MONITORENUMPROC proc;
39 HMONITOR monitor;
40 HDC hdc;
41 RECT rect;
42 LPARAM lparam;
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 /* NtUserCallNoParam codes, not compatible with Windows */
53 enum
55 NtUserGetInputState,
56 /* temporary exports */
57 NtUserThreadDetach,
60 /* NtUserCallOneParam codes, not compatible with Windows */
61 enum
63 NtUserGetClipCursor,
64 NtUserGetCursorPos,
65 NtUserGetSysColor,
66 NtUserGetSysColorBrush,
67 NtUserGetSysColorPen,
68 NtUserGetSystemMetrics,
69 NtUserMessageBeep,
70 NtUserRealizePalette,
71 /* temporary exports */
72 NtUserFlushWindowSurfaces,
73 NtUserGetDeskPattern,
74 NtUserIncrementKeyStateCounter,
77 /* NtUserCallTwoParam codes, not compatible with Windows */
78 enum
80 NtUserGetMonitorInfo,
81 NtUserGetSystemMetricsForDpi,
82 NtUserMirrorRgn,
83 NtUserMonitorFromRect,
84 /* temporary exports */
85 NtUserRegisterWindowSurface,
88 /* color index used to retrieve system 55aa brush */
89 #define COLOR_55AA_BRUSH 0x100
91 /* internal messages codes */
92 enum wine_internal_message
94 WM_WINE_DESTROYWINDOW = 0x80000000,
95 WM_WINE_SETWINDOWPOS,
96 WM_WINE_SHOWWINDOW,
97 WM_WINE_SETPARENT,
98 WM_WINE_SETWINDOWLONG,
99 WM_WINE_SETSTYLE,
100 WM_WINE_SETACTIVEWINDOW,
101 WM_WINE_KEYBOARD_LL_HOOK,
102 WM_WINE_MOUSE_LL_HOOK,
103 WM_WINE_CLIPCURSOR,
104 WM_WINE_UPDATEWINDOWSTATE,
105 WM_WINE_FIRST_DRIVER_MSG = 0x80001000, /* range of messages reserved for the USER driver */
106 WM_WINE_LAST_DRIVER_MSG = 0x80001fff
110 HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags );
111 BOOL WINAPI NtUserAddClipboardFormatListener( HWND hwnd );
112 BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach );
113 NTSTATUS WINAPI NtUserBuildHwndList( HDESK desktop, ULONG unk2, ULONG unk3, ULONG unk4,
114 ULONG thread_id, ULONG count, HWND *buffer, ULONG *size );
115 ULONG_PTR WINAPI NtUserCallNoParam( ULONG code );
116 ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code );
117 ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code );
118 LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
119 DWORD flags, void *lparam );
120 BOOL WINAPI NtUserClipCursor( const RECT *rect );
121 BOOL WINAPI NtUserCloseDesktop( HDESK handle );
122 BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
123 INT WINAPI NtUserCountClipboardFormats(void);
124 HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *device,
125 DEVMODEW *devmode, DWORD flags, ACCESS_MASK access,
126 ULONG heap_size );
127 HWINSTA WINAPI NtUserCreateWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK mask, ULONG arg3,
128 ULONG arg4, ULONG arg5, ULONG arg6, ULONG arg7 );
129 NTSTATUS WINAPI NtUserEnumDisplayDevices( UNICODE_STRING *device, DWORD index,
130 DISPLAY_DEVICEW *info, DWORD flags );
131 BOOL WINAPI NtUserEnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC proc, LPARAM lp );
132 BOOL WINAPI NtUserEnumDisplaySettings( UNICODE_STRING *device, DWORD mode,
133 DEVMODEW *dev_mode, DWORD flags );
134 SHORT WINAPI NtUserGetAsyncKeyState( INT key );
135 INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT maxlen );
136 HWND WINAPI NtUserGetClipboardOwner(void);
137 DWORD WINAPI NtUserGetClipboardSequenceNumber(void);
138 HWND WINAPI NtUserGetClipboardViewer(void);
139 HCURSOR WINAPI NtUserGetCursor(void);
140 LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info,
141 UINT32 *num_mode_info );
142 UINT WINAPI NtUserGetDoubleClickTime(void);
143 BOOL WINAPI NtUserGetDpiForMonitor( HMONITOR monitor, UINT type, UINT *x, UINT *y );
144 INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size );
145 SHORT WINAPI NtUserGetKeyState( INT vkey );
146 HKL WINAPI NtUserGetKeyboardLayout( DWORD thread_id );
147 UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts );
148 BOOL WINAPI NtUserGetKeyboardLayoutName( WCHAR *name );
149 BOOL WINAPI NtUserGetKeyboardState( BYTE *state );
150 BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags );
151 int WINAPI NtUserGetMouseMovePointsEx( UINT size, MOUSEMOVEPOINT *ptin, MOUSEMOVEPOINT *ptout,
152 int count, DWORD resolution );
153 BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
154 DWORD len, DWORD *needed );
155 HWND WINAPI NtUserGetOpenClipboardWindow(void);
156 INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count );
157 HWINSTA WINAPI NtUserGetProcessWindowStation(void);
158 HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str );
159 ULONG WINAPI NtUserGetProcessDpiAwarenessContext( HANDLE process );
160 DWORD WINAPI NtUserGetQueueStatus( UINT flags );
161 ULONG WINAPI NtUserGetSystemDpiForProcess( HANDLE process );
162 HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
163 BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
164 BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format );
165 UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout );
166 HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK access );
167 BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
168 HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access );
169 HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access );
170 BOOL WINAPI NtUserRemoveClipboardFormatListener( HWND hwnd );
171 HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str );
172 BOOL WINAPI NtUserScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
173 HRGN ret_update_rgn, RECT *update_rect );
174 HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE palette, WORD force_background );
175 BOOL WINAPI NtUserSetCursorPos( INT x, INT y );
176 BOOL WINAPI NtUserSetKeyboardState( BYTE *state );
177 BOOL WINAPI NtUserSetProcessDpiAwarenessContext( ULONG awareness, ULONG unknown );
178 BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
179 BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle );
180 BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *values );
181 BOOL WINAPI NtUserSetThreadDesktop( HDESK handle );
182 HWINEVENTHOOK WINAPI NtUserSetWinEventHook( DWORD event_min, DWORD event_max, HMODULE inst,
183 UNICODE_STRING *module, WINEVENTPROC proc,
184 DWORD pid, DWORD tid, DWORD flags );
185 INT WINAPI NtUserShowCursor( BOOL show );
186 BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, void *ptr, UINT winini );
187 BOOL WINAPI NtUserSystemParametersInfoForDpi( UINT action, UINT val, PVOID ptr, UINT winini, UINT dpi );
188 INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
189 WCHAR *str, int size, UINT flags, HKL layout );
190 BOOL WINAPI NtUserUnhookWinEvent( HWINEVENTHOOK hEventHook );
191 BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id );
192 WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout );
194 #endif /* _NTUSER_ */