1 #ifndef __WIN32K_NTUSER_H
2 #define __WIN32K_NTUSER_H
6 #define WM_SYSTIMER 280
9 NtUserGetSystemMetrics(ULONG Index
);
12 NtUserGetClassLong(HWND hWnd
, DWORD Offset
, BOOL Ansi
);
15 NtUserGetWindowLong(HWND hWnd
, DWORD Index
, BOOL Ansi
);
18 NtUserReleaseDC(HWND hWnd
, HDC hDc
);
21 NtUserGetWindowRect(HWND hWnd
, LPRECT Rect
);
24 NtUserGetClientRect(HWND hWnd
, LPRECT Rect
);
27 NtUserGetProp(HWND hWnd
, ATOM Atom
);
30 NtUserGetClientOrigin(HWND hWnd
, LPPOINT Point
);
33 NtUserGetDesktopWindow();
37 NtUserAcquireOrReleaseInputOwnership(
42 NtUserActivateKeyboardLayout(
48 NtUserAlterWindowStyle(
55 NtUserAttachThreadInput(
61 NtUserBeginPaint(HWND hWnd
, PAINTSTRUCT
* lPs
);
96 PULONG pRequiredSize
);
112 #define HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS 0x54
113 #define HWNDLOCK_ROUTINE_DRAWMENUBAR 0x55
114 #define HWNDLOCK_ROUTINE_REDRAWFRAME 0x58
115 #define HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW 0x5B
116 #define HWNDLOCK_ROUTINE_UPDATEWINDOW 0x5E
123 #define HWNDOPT_ROUTINE_SETPROGMANWINDOW 0x4A
124 #define HWNDOPT_ROUTINE_SETTASKMANWINDOW 0x4B
140 NtUserCallHwndParamLock(
153 NtUserCallNextHookEx(
159 #define NOPARAM_ROUTINE_REGISTER_PRIMITIVE 0xffff0001 /* Private ROS */
160 #define NOPARAM_ROUTINE_DESTROY_CARET 0xffff0002
161 #define NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP 0xffff0003
162 #define NOPARAM_ROUTINE_INIT_MESSAGE_PUMP 0xffff0004
163 #define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005
164 #define NOPARAM_ROUTINE_ANYPOPUP 0xffff0006
165 #define NOPARAM_ROUTINE_CSRSS_INITIALIZED 0xffff0007
166 #define NOPARAM_ROUTINE_GDI_QUERY_TABLE 0xffff0008
167 #define NOPARAM_ROUTINE_IS_GUI_ACTIVE 0xffff0009
173 #define ONEPARAM_ROUTINE_GETMENU 0x01
174 #define ONEPARAM_ROUTINE_ISWINDOWUNICODE 0x02
175 #define ONEPARAM_ROUTINE_WINDOWFROMDC 0x03
176 #define ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID 0x04
177 #define ONEPARAM_ROUTINE_SWAPMOUSEBUTTON 0x05
178 #define ONEPARAM_ROUTINE_SETCARETBLINKTIME 0x06
179 #define ONEPARAM_ROUTINE_GETCARETINFO 0x07
180 #define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0x08
181 #define ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS 0x09
182 #define ONEPARAM_ROUTINE_GETWINDOWINSTANCE 0x10
183 #define ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO 0x0a
184 #define ONEPARAM_ROUTINE_GETCURSORPOSITION 0x0b
185 #define ONEPARAM_ROUTINE_ISWINDOWINDESTROY 0x0c
186 #define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0x0d
193 #define TWOPARAM_ROUTINE_SETDCPENCOLOR 0x45
194 #define TWOPARAM_ROUTINE_SETDCBRUSHCOLOR 0x46
195 #define TWOPARAM_ROUTINE_GETDCCOLOR 0x47
196 #define TWOPARAM_ROUTINE_GETWINDOWRGNBOX 0x48
197 #define TWOPARAM_ROUTINE_GETWINDOWRGN 0x49
198 #define TWOPARAM_ROUTINE_SETMENUBARHEIGHT 0x50
199 #define TWOPARAM_ROUTINE_SETMENUITEMRECT 0x51
200 #define TWOPARAM_ROUTINE_SETGUITHRDHANDLE 0x52
201 #define MSQ_STATE_CAPTURE 0x1
202 #define MSQ_STATE_ACTIVE 0x2
203 #define MSQ_STATE_FOCUS 0x3
204 #define MSQ_STATE_MENUOWNER 0x4
205 #define MSQ_STATE_MOVESIZE 0x5
206 #define MSQ_STATE_CARET 0x6
207 #define TWOPARAM_ROUTINE_ENABLEWINDOW 0x53
208 #define TWOPARAM_ROUTINE_UNKNOWN 0x54
209 #define TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS 0x55
210 #define TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW 0x56
211 #define TWOPARAM_ROUTINE_VALIDATERGN 0x57
212 #define TWOPARAM_ROUTINE_SETWNDCONTEXTHLPID 0x58
213 #define TWOPARAM_ROUTINE_SETCARETPOS 0x60
214 #define TWOPARAM_ROUTINE_GETWINDOWINFO 0x61
215 #define TWOPARAM_ROUTINE_REGISTERLOGONPROC 0x62
216 #define TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES 0x63
217 #define TWOPARAM_ROUTINE_GETSYSCOLORPENS 0x64
218 #define TWOPARAM_ROUTINE_GETSYSCOLORS 0x65
219 #define TWOPARAM_ROUTINE_SETSYSCOLORS 0x66
229 NtUserChangeClipboardChain(
235 NtUserChangeDisplaySettings(
236 PUNICODE_STRING lpszDeviceName
,
237 LPDEVMODEW lpDevMode
,
243 NtUserChildWindowFromPointEx(HWND Parent
,
255 NtUserCloseClipboard(VOID
);
264 NtUserCloseWindowStation(
269 NtUserConvertMemHandle(
275 NtUserCopyAcceleratorTable(
282 NtUserCountClipboardFormats(VOID
);
286 NtUserCreateAcceleratorTable(
288 SIZE_T EntriesCount
);
300 NtUserCreateCursorIconHandle(
307 PUNICODE_STRING lpszDesktopName
,
309 ACCESS_MASK dwDesiredAccess
,
310 LPSECURITY_ATTRIBUTES lpSecurity
,
311 HWINSTA hWindowStation
);
315 NtUserCreateLocalMemHandle(
323 NtUserCreateWindowEx(
325 PUNICODE_STRING lpClassName
,
326 PUNICODE_STRING lpWindowName
,
337 BOOL bUnicodeWindow
);
341 NtUserCreateWindowStation(
342 PUNICODE_STRING lpszWindowStationName
,
343 ACCESS_MASK dwDesiredAccess
,
344 LPSECURITY_ATTRIBUTES lpSecurity
,
351 NtUserDdeGetQualityOfService(
367 NtUserDdeSetQualityOfService(
373 NtUserDeferWindowPos(HDWP WinPosInfo
,
382 NtUserDefSetText(HWND WindowHandle
, PUNICODE_STRING WindowText
);
386 NtUserDestroyAcceleratorTable(
391 NtUserDestroyCursorIcon(
396 NtUserDestroyWindow(HWND Wnd
);
398 typedef struct tagNTUSERDISPATCHMESSAGEINFO
400 BOOL HandledByKernel
;
404 } NTUSERDISPATCHMESSAGEINFO
, *PNTUSERDISPATCHMESSAGEINFO
;
408 NtUserDispatchMessage(PNTUSERDISPATCHMESSAGEINFO MsgInfo
);
429 NtUserDrawAnimatedRects(
445 NtUserDrawCaptionTemp(
464 HBRUSH hbrFlickerFreeDraw
,
471 NtUserEmptyClipboard(VOID
);
475 NtUserEnableScrollBar(
482 NtUserEndDeferWindowPosEx(
487 NtUserEndPaint(HWND hWnd
, CONST PAINTSTRUCT
* lPs
);
491 NtUserEnumDisplayDevices (
492 PUNICODE_STRING lpDevice
, /* device name */
493 DWORD iDevNum
, /* display device */
494 PDISPLAY_DEVICE lpDisplayDevice
, /* device information */
495 DWORD dwFlags
); /* reserved */
499 NtUserEnumDisplayMonitors (
502 MONITORENUMPROC lpfnEnum,
505 #define MONITORINFOF_PRIMARY 1
506 #define MONITOR_DEFAULTTONULL 0
507 #define MONITOR_DEFAULTTOPRIMARY 1
508 #define MONITOR_DEFAULTTONEAREST 2
511 NtUserEnumDisplayMonitors(
513 OPTIONAL IN LPCRECT pRect
,
514 OPTIONAL OUT HMONITOR
*hMonitorList
,
515 OPTIONAL OUT LPRECT monitorRectList
,
516 OPTIONAL IN DWORD listSize
);
521 NtUserEnumDisplaySettings(
522 PUNICODE_STRING lpszDeviceName
,
524 LPDEVMODEW lpDevMode
, /* FIXME is this correct? */
534 NtUserExcludeUpdateRgn(
548 NtUserFindExistingCursorIcon(
559 PUNICODE_STRING ucClassName
,
560 PUNICODE_STRING ucWindowName
579 NtUserGetAncestor(HWND hWnd
, UINT Flags
);
584 NtUserGetAsyncKeyState(
589 NtUserGetCaretBlinkTime(VOID
);
597 NtUserGetClassInfo(HINSTANCE hInst
,
605 NtUserGetClassName(HWND hWnd
,
611 NtUserGetClipboardData(
617 NtUserGetClipboardFormatName(
619 PUNICODE_STRING FormatName
,
624 NtUserGetClipboardOwner(VOID
);
628 NtUserGetClipboardSequenceNumber(VOID
);
632 NtUserGetClipboardViewer(VOID
);
641 NtUserGetComboBoxInfo(
647 NtUserGetControlBrush(
654 NtUserGetControlColor(
669 NtUserGetCursorFrameInfo(
694 NtUserGetDoubleClickTime(VOID
);
698 NtUserGetForegroundWindow(VOID
);
702 NtUserGetGuiResources(
708 NtUserGetGUIThreadInfo(
710 LPGUITHREADINFO lpgui
);
714 NtUserGetCursorIconInfo(
720 NtUserGetCursorIconSize(
735 NtUserGetInternalWindowPos(
742 NtUserGetKeyboardLayoutList(
748 NtUserGetKeyboardLayoutName(
753 NtUserGetKeyboardState(
758 NtUserGetKeyNameText( LONG lParam
, LPWSTR lpString
, int nSize
);
767 NtUserGetListBoxInfo(
770 typedef struct tagNTUSERGETMESSAGEINFO
774 } NTUSERGETMESSAGEINFO
, *PNTUSERGETMESSAGEINFO
;
779 PNTUSERGETMESSAGEINFO MsgInfo
,
786 NtUserGetMonitorInfo(
787 IN HMONITOR hMonitor
,
788 OUT LPMONITORINFO pMonitorInfo
);
792 NtUserGetMouseMovePointsEx(
801 NtUserGetObjectInformation(
806 PDWORD nLengthNeeded
);
810 NtUserGetOpenClipboardWindow(VOID
);
814 NtUserGetPriorityClipboardFormat(
815 UINT
*paFormatPriorityList
,
820 NtUserGetProcessWindowStation(VOID
);
824 NtUserGetScrollBarInfo(
827 PSCROLLBARINFO psbi
);
838 NtUserGetThreadDesktop(
842 #define THREADSTATE_FOCUSWINDOW (1)
843 #define THREADSTATE_INSENDMESSAGE (2)
846 NtUserGetThreadState(
851 NtUserGetTitleBarInfo(
856 NtUserGetUpdateRect(HWND hWnd
, LPRECT lpRect
, BOOL fErase
);
872 NtUserGetWindowPlacement(
874 WINDOWPLACEMENT
*lpwndpl
);
889 NtUserImpersonateDdeClientWindow(
895 NtUserInitializeClientPfnArrays(
918 NtUserInternalGetWindowText(
925 NtUserInvalidateRect(
940 NtUserIsClipboardFormatAvailable(
945 NtUserKillSystemTimer
961 NtUserLoadKeyboardLayoutEx(
971 NtUserLockWindowStation(
972 HWINSTA hWindowStation
);
976 NtUserLockWindowUpdate(
981 NtUserLockWorkStation(VOID
);
985 NtUserMapVirtualKeyEx( UINT keyCode
,
1003 NtUserGetMinMaxInfo(
1005 MINMAXINFO
*MinMaxInfo
,
1010 NtUserMNDragLeave(VOID
);
1020 NtUserModifyUserStartupInfoFlags(
1026 NtUserMonitorFromPoint(
1032 NtUserMonitorFromRect(
1038 NtUserMonitorFromWindow(
1056 NtUserNotifyIMEStatus(
1063 NtUserNotifyWinEvent(
1071 NtUserOpenClipboard(
1078 PUNICODE_STRING lpszDesktopName
,
1080 ACCESS_MASK dwDesiredAccess
);
1084 NtUserOpenInputDesktop(
1087 ACCESS_MASK dwDesiredAccess
);
1091 NtUserOpenWindowStation(
1092 PUNICODE_STRING lpszWindowStationName
,
1093 ACCESS_MASK dwDesiredAccess
);
1103 PNTUSERGETMESSAGEINFO MsgInfo
,
1119 NtUserPostThreadMessage(
1127 NtUserQuerySendMessage(
1132 NtUserQueryUserCounters(
1139 #define QUERY_WINDOW_UNIQUE_PROCESS_ID 0x00
1140 #define QUERY_WINDOW_UNIQUE_THREAD_ID 0x01
1141 #define QUERY_WINDOW_ISHUNG 0x04
1150 NtUserRealChildWindowFromPoint(
1160 CONST RECT
*lprcUpdate
,
1165 /* FIXME: These flag constans aren't what Windows uses. */
1166 #define REGISTERCLASS_ANSI 2
1167 #define REGISTERCLASS_SYSTEM 4
1168 #define REGISTERCLASS_ALL (REGISTERCLASS_ANSI | REGISTERCLASS_SYSTEM)
1171 NtUserRegisterClassEx(
1172 CONST WNDCLASSEXW
* lpwcx
,
1173 PUNICODE_STRING ClassName
,
1174 PUNICODE_STRING MenuName
,
1177 HWINSTA hWindowStation OPTIONAL
);
1181 NtUserRegisterHotKey(HWND hWnd
,
1188 NtUserRegisterTasklist(
1192 NtUserRegisterWindowMessage(PUNICODE_STRING MessageName
);
1195 NtUserRemoveProp(HWND hWnd
, ATOM Atom
);
1199 NtUserResolveDesktopForWOW(
1216 CONST RECT
*lprcScroll
,
1217 CONST RECT
*lprcClip
,
1222 NtUserScrollWindowEx(HWND hWnd
, INT dx
, INT dy
, const RECT
*rect
,
1223 const RECT
*clipRect
, HRGN hrgnUpdate
, LPRECT rcUpdate
, UINT flags
);
1232 typedef struct tagNTUSERSENDMESSAGEINFO
1234 BOOL HandledByKernel
;
1237 } NTUSERSENDMESSAGEINFO
, *PNTUSERSENDMESSAGEINFO
;
1240 NtUserSendMessage(HWND hWnd
,
1244 PNTUSERSENDMESSAGEINFO Info
);
1248 NtUserSendMessageCallback(
1253 SENDASYNCPROC lpCallBack
,
1257 NtUserSendMessageTimeout(HWND hWnd
,
1264 PNTUSERSENDMESSAGEINFO Info
);
1268 NtUserSendNotifyMessage(
1275 NtUserSetActiveWindow(HWND Wnd
);
1277 NtUserGetActiveWindow(VOID
);
1280 NtUserSetCapture(HWND Wnd
);
1282 NtUserGetCapture(VOID
);
1301 NtUserSetClipboardData(
1308 NtUserSetClipboardViewer(
1309 HWND hWndNewViewer
);
1313 NtUserSetConsoleReserveKeys(
1324 NtUserSetCursorIconContents(
1326 PICONINFO IconInfo
);
1330 NtUserSetCursorIconData(
1360 NtUserSetImeOwnerWindow(
1366 NtUserSetInternalWindowPos(
1374 NtUserSetKeyboardState(
1379 NtUserSetLayeredWindowAttributes(
1387 NtUserSetLogonNotifyWindow(
1392 NtUserSetObjectInformation(
1395 PVOID pvInformation
,
1402 HWND hWndNewParent
);
1406 NtUserSetProcessWindowStation(
1407 HWINSTA hWindowStation
);
1410 NtUserSetProp(HWND hWnd
, ATOM Atom
, HANDLE Data
);
1420 NtUserSetScrollInfo(
1428 NtUserSetShellWindowEx(
1430 HWND hwndShellListView
);
1434 NtUserGetShellWindow();
1446 NtUserSetSystemCursor(
1452 NtUserSetThreadDesktop(
1457 NtUserSetThreadState(
1463 NtUserSetSystemTimer
1468 TIMERPROC lpTimerFunc
1478 TIMERPROC lpTimerFunc
1483 NtUserSetWindowFNID(
1489 NtUserSetWindowLong(
1497 NtUserSetWindowPlacement(
1499 WINDOWPLACEMENT
*lpwndpl
);
1502 STDCALL
NtUserSetWindowPos(
1504 HWND hWndInsertAfter
,
1521 NtUserSetWindowsHookAW(
1528 NtUserSetWindowsHookEx(
1530 PUNICODE_STRING ModuleName
,
1538 NtUserSetWindowStationUser(
1545 NtUserSetWindowWord(HWND hWnd
, INT Index
, WORD NewVal
);
1549 NtUserSetWinEventHook(
1566 NtUserShowScrollBar(HWND hWnd
, int wBar
, DWORD bShow
);
1576 NtUserShowWindowAsync(
1582 NtUserSwitchDesktop(
1587 NtUserSystemParametersInfo(
1606 NtUserTrackMouseEvent(
1611 NtUserTranslateAccelerator(
1618 NtUserTranslateMessage(
1624 NtUserUnhookWindowsHookEx(
1629 NtUserUnhookWinEvent(
1634 NtUserUnloadKeyboardLayout(
1639 NtUserUnlockWindowStation(
1640 HWINSTA hWindowStation
);
1644 NtUserUnregisterClass(
1645 LPCWSTR ClassNameOrAtom
,
1646 HINSTANCE hInstance
,
1651 NtUserUnregisterHotKey(HWND hWnd
,
1656 NtUserUpdateInputContext(
1663 NtUserUpdateInstance(
1669 NtUserUpdateWindow( HWND hWnd
);
1673 NtUserUpdateLayeredWindow(
1686 NtUserUpdatePerUserSystemParameters(
1692 NtUserUserHandleGrantAccess(
1699 NtUserValidateHandleSecure(
1703 NtUserValidateRect(HWND Wnd
, const RECT
* Rect
);
1715 NtUserWaitForInputIdle(
1722 NtUserWaitForMsgAndEvent(
1727 NtUserWaitMessage(VOID
);
1731 NtUserWin32PoolAllocationStats(
1741 NtUserWindowFromPoint(
1747 NtUserYieldTask(VOID
);
1750 NtUserGetWindowThreadProcessId(HWND hWnd
, LPDWORD UnsafePid
);
1753 NtUserGetQueueStatus(BOOL ClearChanges
);
1756 NtUserGetParent(HWND hWnd
);
1759 NtUserGetWindow(HWND hWnd
, UINT Relationship
);
1762 NtUserGetLastActivePopup(HWND hWnd
);
1763 typedef struct _WndProcHandle
1771 NtUserDereferenceWndProcHandle(WNDPROC wpHandle
, WndProcHandle
*Data
);
1774 NtUserManualGuiCheck(LONG Check
);
1776 typedef struct _SETSCROLLBARINFO
1780 DWORD rgstate
[CCHILDREN_SCROLLBAR
+1];
1781 } SETSCROLLBARINFO
, *PSETSCROLLBARINFO
;
1785 NtUserSetScrollBarInfo(
1788 SETSCROLLBARINFO
*info
);
1790 /* lParam of DDE messages */
1791 typedef struct tagKMDDEEXECUTEDATA
1795 /* BYTE Data[DataSize] */
1796 } KMDDEEXECUTEDATA
, *PKMDDEEXECUTEDATA
;
1798 typedef struct tagKMDDELPARAM
1810 } KMDDELPARAM
, *PKMDDELPARAM
;
1812 typedef struct _GDI_TABLE_ENTRY
1814 PVOID KernelData
; /* Points to the kernel mode structure */
1815 LONG ProcessId
; /* process id that created the object, 0 for stock objects */
1816 LONG Type
; /* the first 16 bit is the object type including the stock obj flag, the last 16 bits is just the object type */
1817 PVOID UserData
; /* Points to the user mode structure, usually NULL though */
1818 } GDI_TABLE_ENTRY
, *PGDI_TABLE_ENTRY
;
1820 #endif /* __WIN32K_NTUSER_H */