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_MSQCLEARWAKEMASK 0x3
160 #define NOPARAM_ROUTINE_REGISTER_PRIMITIVE 0xffff0001 /* Private ROS */
161 #define NOPARAM_ROUTINE_DESTROY_CARET 0xffff0002
162 #define NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP 0xffff0003
163 #define NOPARAM_ROUTINE_INIT_MESSAGE_PUMP 0xffff0004
164 #define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005
165 #define NOPARAM_ROUTINE_ANYPOPUP 0xffff0006
166 #define NOPARAM_ROUTINE_CSRSS_INITIALIZED 0xffff0007
167 #define NOPARAM_ROUTINE_GDI_QUERY_TABLE 0xffff0008
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_SETMESSAGEEXTRAINFO 0x0a
183 #define ONEPARAM_ROUTINE_GETCURSORPOSITION 0x0b
184 #define ONEPARAM_ROUTINE_ISWINDOWINDESTROY 0x0c
185 #define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0x0d
186 #define ONEPARAM_ROUTINE_GETWINDOWINSTANCE 0x10
187 #define ONEPARAM_ROUTINE_MSQSETWAKEMASK 0x27
194 #define TWOPARAM_ROUTINE_SETDCPENCOLOR 0x45
195 #define TWOPARAM_ROUTINE_SETDCBRUSHCOLOR 0x46
196 #define TWOPARAM_ROUTINE_GETDCCOLOR 0x47
197 #define TWOPARAM_ROUTINE_GETWINDOWRGNBOX 0x48
198 #define TWOPARAM_ROUTINE_GETWINDOWRGN 0x49
199 #define TWOPARAM_ROUTINE_SETMENUBARHEIGHT 0x50
200 #define TWOPARAM_ROUTINE_SETMENUITEMRECT 0x51
201 #define TWOPARAM_ROUTINE_SETGUITHRDHANDLE 0x52
202 #define MSQ_STATE_CAPTURE 0x1
203 #define MSQ_STATE_ACTIVE 0x2
204 #define MSQ_STATE_FOCUS 0x3
205 #define MSQ_STATE_MENUOWNER 0x4
206 #define MSQ_STATE_MOVESIZE 0x5
207 #define MSQ_STATE_CARET 0x6
208 #define TWOPARAM_ROUTINE_ENABLEWINDOW 0x53
209 #define TWOPARAM_ROUTINE_UNKNOWN 0x54
210 #define TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS 0x55
211 #define TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW 0x56
212 #define TWOPARAM_ROUTINE_VALIDATERGN 0x57
213 #define TWOPARAM_ROUTINE_SETWNDCONTEXTHLPID 0x58
214 #define TWOPARAM_ROUTINE_SETCARETPOS 0x60
215 #define TWOPARAM_ROUTINE_GETWINDOWINFO 0x61
216 #define TWOPARAM_ROUTINE_REGISTERLOGONPROC 0x62
217 #define TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES 0x63
218 #define TWOPARAM_ROUTINE_GETSYSCOLORPENS 0x64
219 #define TWOPARAM_ROUTINE_GETSYSCOLORS 0x65
220 #define TWOPARAM_ROUTINE_SETSYSCOLORS 0x66
230 NtUserChangeClipboardChain(
236 NtUserChangeDisplaySettings(
237 PUNICODE_STRING lpszDeviceName
,
238 LPDEVMODEW lpDevMode
,
244 NtUserChildWindowFromPointEx(HWND Parent
,
256 NtUserCloseClipboard(VOID
);
265 NtUserCloseWindowStation(
270 NtUserConvertMemHandle(
276 NtUserCopyAcceleratorTable(
283 NtUserCountClipboardFormats(VOID
);
287 NtUserCreateAcceleratorTable(
289 SIZE_T EntriesCount
);
301 NtUserCreateCursorIconHandle(
308 PUNICODE_STRING lpszDesktopName
,
310 ACCESS_MASK dwDesiredAccess
,
311 LPSECURITY_ATTRIBUTES lpSecurity
,
312 HWINSTA hWindowStation
);
316 NtUserCreateLocalMemHandle(
324 NtUserCreateWindowEx(
326 PUNICODE_STRING lpClassName
,
327 PUNICODE_STRING lpWindowName
,
338 BOOL bUnicodeWindow
);
342 NtUserCreateWindowStation(
343 PUNICODE_STRING lpszWindowStationName
,
344 ACCESS_MASK dwDesiredAccess
,
345 LPSECURITY_ATTRIBUTES lpSecurity
,
352 NtUserDdeGetQualityOfService(
368 NtUserDdeSetQualityOfService(
374 NtUserDeferWindowPos(HDWP WinPosInfo
,
383 NtUserDefSetText(HWND WindowHandle
, PUNICODE_STRING WindowText
);
387 NtUserDestroyAcceleratorTable(
392 NtUserDestroyCursorIcon(
397 NtUserDestroyWindow(HWND Wnd
);
399 typedef struct tagNTUSERDISPATCHMESSAGEINFO
401 BOOL HandledByKernel
;
405 } NTUSERDISPATCHMESSAGEINFO
, *PNTUSERDISPATCHMESSAGEINFO
;
409 NtUserDispatchMessage(PNTUSERDISPATCHMESSAGEINFO MsgInfo
);
430 NtUserDrawAnimatedRects(
446 NtUserDrawCaptionTemp(
465 HBRUSH hbrFlickerFreeDraw
,
472 NtUserEmptyClipboard(VOID
);
476 NtUserEnableScrollBar(
483 NtUserEndDeferWindowPosEx(
488 NtUserEndPaint(HWND hWnd
, CONST PAINTSTRUCT
* lPs
);
492 NtUserEnumDisplayDevices (
493 PUNICODE_STRING lpDevice
, /* device name */
494 DWORD iDevNum
, /* display device */
495 PDISPLAY_DEVICE lpDisplayDevice
, /* device information */
496 DWORD dwFlags
); /* reserved */
500 NtUserEnumDisplayMonitors (
503 MONITORENUMPROC lpfnEnum,
506 #define MONITORINFOF_PRIMARY 1
507 #define MONITOR_DEFAULTTONULL 0
508 #define MONITOR_DEFAULTTOPRIMARY 1
509 #define MONITOR_DEFAULTTONEAREST 2
512 NtUserEnumDisplayMonitors(
514 OPTIONAL IN LPCRECT pRect
,
515 OPTIONAL OUT HMONITOR
*hMonitorList
,
516 OPTIONAL OUT LPRECT monitorRectList
,
517 OPTIONAL IN DWORD listSize
);
522 NtUserEnumDisplaySettings(
523 PUNICODE_STRING lpszDeviceName
,
525 LPDEVMODEW lpDevMode
, /* FIXME is this correct? */
535 NtUserExcludeUpdateRgn(
549 NtUserFindExistingCursorIcon(
560 PUNICODE_STRING ucClassName
,
561 PUNICODE_STRING ucWindowName
580 NtUserGetAncestor(HWND hWnd
, UINT Flags
);
585 NtUserGetAsyncKeyState(
590 NtUserGetCaretBlinkTime(VOID
);
598 NtUserGetClassInfo(HINSTANCE hInst
,
606 NtUserGetClassName(HWND hWnd
,
612 NtUserGetClipboardData(
618 NtUserGetClipboardFormatName(
620 PUNICODE_STRING FormatName
,
625 NtUserGetClipboardOwner(VOID
);
629 NtUserGetClipboardSequenceNumber(VOID
);
633 NtUserGetClipboardViewer(VOID
);
642 NtUserGetComboBoxInfo(
648 NtUserGetControlBrush(
655 NtUserGetControlColor(
670 NtUserGetCursorFrameInfo(
695 NtUserGetDoubleClickTime(VOID
);
699 NtUserGetForegroundWindow(VOID
);
703 NtUserGetGuiResources(
709 NtUserGetGUIThreadInfo(
711 LPGUITHREADINFO lpgui
);
715 NtUserGetCursorIconInfo(
721 NtUserGetCursorIconSize(
736 NtUserGetInternalWindowPos(
743 NtUserGetKeyboardLayoutList(
749 NtUserGetKeyboardLayoutName(
754 NtUserGetKeyboardState(
759 NtUserGetKeyNameText( LONG lParam
, LPWSTR lpString
, int nSize
);
768 NtUserGetListBoxInfo(
771 typedef struct tagNTUSERGETMESSAGEINFO
775 } NTUSERGETMESSAGEINFO
, *PNTUSERGETMESSAGEINFO
;
780 PNTUSERGETMESSAGEINFO MsgInfo
,
787 NtUserGetMonitorInfo(
788 IN HMONITOR hMonitor
,
789 OUT LPMONITORINFO pMonitorInfo
);
793 NtUserGetMouseMovePointsEx(
802 NtUserGetObjectInformation(
807 PDWORD nLengthNeeded
);
811 NtUserGetOpenClipboardWindow(VOID
);
815 NtUserGetPriorityClipboardFormat(
816 UINT
*paFormatPriorityList
,
821 NtUserGetProcessWindowStation(VOID
);
825 NtUserGetScrollBarInfo(
828 PSCROLLBARINFO psbi
);
839 NtUserGetThreadDesktop(
843 #define THREADSTATE_FOCUSWINDOW (1)
844 #define THREADSTATE_INSENDMESSAGE (2)
847 NtUserGetThreadState(
852 NtUserGetTitleBarInfo(
857 NtUserGetUpdateRect(HWND hWnd
, LPRECT lpRect
, BOOL fErase
);
873 NtUserGetWindowPlacement(
875 WINDOWPLACEMENT
*lpwndpl
);
890 NtUserImpersonateDdeClientWindow(
896 NtUserInitializeClientPfnArrays(
919 NtUserInternalGetWindowText(
926 NtUserInvalidateRect(
941 NtUserIsClipboardFormatAvailable(
946 NtUserKillSystemTimer
962 NtUserLoadKeyboardLayoutEx(
972 NtUserLockWindowStation(
973 HWINSTA hWindowStation
);
977 NtUserLockWindowUpdate(
982 NtUserLockWorkStation(VOID
);
986 NtUserMapVirtualKeyEx( UINT keyCode
,
1004 NtUserGetMinMaxInfo(
1006 MINMAXINFO
*MinMaxInfo
,
1011 NtUserMNDragLeave(VOID
);
1021 NtUserModifyUserStartupInfoFlags(
1027 NtUserMonitorFromPoint(
1033 NtUserMonitorFromRect(
1039 NtUserMonitorFromWindow(
1057 NtUserNotifyIMEStatus(
1064 NtUserNotifyWinEvent(
1072 NtUserOpenClipboard(
1079 PUNICODE_STRING lpszDesktopName
,
1081 ACCESS_MASK dwDesiredAccess
);
1085 NtUserOpenInputDesktop(
1088 ACCESS_MASK dwDesiredAccess
);
1092 NtUserOpenWindowStation(
1093 PUNICODE_STRING lpszWindowStationName
,
1094 ACCESS_MASK dwDesiredAccess
);
1104 PNTUSERGETMESSAGEINFO MsgInfo
,
1120 NtUserPostThreadMessage(
1128 NtUserQuerySendMessage(
1133 NtUserQueryUserCounters(
1140 #define QUERY_WINDOW_UNIQUE_PROCESS_ID 0x00
1141 #define QUERY_WINDOW_UNIQUE_THREAD_ID 0x01
1142 #define QUERY_WINDOW_ISHUNG 0x04
1151 NtUserRealChildWindowFromPoint(
1161 CONST RECT
*lprcUpdate
,
1166 /* FIXME: These flag constans aren't what Windows uses. */
1167 #define REGISTERCLASS_ANSI 2
1168 #define REGISTERCLASS_SYSTEM 4
1169 #define REGISTERCLASS_ALL (REGISTERCLASS_ANSI | REGISTERCLASS_SYSTEM)
1172 NtUserRegisterClassExWOW(
1173 CONST WNDCLASSEXW
* lpwcx
,
1174 PUNICODE_STRING ClassName
,
1175 PUNICODE_STRING ClassNameCopy
,
1176 PUNICODE_STRING MenuName
,
1183 NtUserRegisterHotKey(HWND hWnd
,
1190 NtUserRegisterTasklist(
1194 NtUserRegisterWindowMessage(PUNICODE_STRING MessageName
);
1197 NtUserRemoveProp(HWND hWnd
, ATOM Atom
);
1201 NtUserResolveDesktopForWOW(
1218 CONST RECT
*lprcScroll
,
1219 CONST RECT
*lprcClip
,
1224 NtUserScrollWindowEx(HWND hWnd
, INT dx
, INT dy
, const RECT
*rect
,
1225 const RECT
*clipRect
, HRGN hrgnUpdate
, LPRECT rcUpdate
, UINT flags
);
1234 typedef struct tagNTUSERSENDMESSAGEINFO
1236 BOOL HandledByKernel
;
1239 } NTUSERSENDMESSAGEINFO
, *PNTUSERSENDMESSAGEINFO
;
1242 NtUserSendMessage(HWND hWnd
,
1246 PNTUSERSENDMESSAGEINFO Info
);
1250 NtUserSendMessageCallback(
1255 SENDASYNCPROC lpCallBack
,
1259 NtUserSendMessageTimeout(HWND hWnd
,
1266 PNTUSERSENDMESSAGEINFO Info
);
1270 NtUserSendNotifyMessage(
1277 NtUserSetActiveWindow(HWND Wnd
);
1279 NtUserGetActiveWindow(VOID
);
1282 NtUserSetCapture(HWND Wnd
);
1284 NtUserGetCapture(VOID
);
1303 NtUserSetClipboardData(
1310 NtUserSetClipboardViewer(
1311 HWND hWndNewViewer
);
1315 NtUserSetConsoleReserveKeys(
1326 NtUserSetCursorIconContents(
1328 PICONINFO IconInfo
);
1332 NtUserSetCursorIconData(
1362 NtUserSetImeOwnerWindow(
1368 NtUserSetInternalWindowPos(
1376 NtUserSetKeyboardState(
1381 NtUserSetLayeredWindowAttributes(
1389 NtUserSetLogonNotifyWindow(
1394 NtUserSetObjectInformation(
1397 PVOID pvInformation
,
1404 HWND hWndNewParent
);
1408 NtUserSetProcessWindowStation(
1409 HWINSTA hWindowStation
);
1412 NtUserSetProp(HWND hWnd
, ATOM Atom
, HANDLE Data
);
1422 NtUserSetScrollInfo(
1430 NtUserSetShellWindowEx(
1432 HWND hwndShellListView
);
1436 NtUserGetShellWindow();
1448 NtUserSetSystemCursor(
1454 NtUserSetThreadDesktop(
1459 NtUserSetThreadState(
1465 NtUserSetSystemTimer
1470 TIMERPROC lpTimerFunc
1480 TIMERPROC lpTimerFunc
1485 NtUserSetWindowFNID(
1491 NtUserSetWindowLong(
1499 NtUserSetWindowPlacement(
1501 WINDOWPLACEMENT
*lpwndpl
);
1504 STDCALL
NtUserSetWindowPos(
1506 HWND hWndInsertAfter
,
1523 NtUserSetWindowsHookAW(
1530 NtUserSetWindowsHookEx(
1532 PUNICODE_STRING ModuleName
,
1540 NtUserSetWindowStationUser(
1547 NtUserSetWindowWord(HWND hWnd
, INT Index
, WORD NewVal
);
1551 NtUserSetWinEventHook(
1568 NtUserShowScrollBar(HWND hWnd
, int wBar
, DWORD bShow
);
1578 NtUserShowWindowAsync(
1584 NtUserSwitchDesktop(
1589 NtUserSystemParametersInfo(
1608 NtUserTrackMouseEvent(
1613 NtUserTranslateAccelerator(
1620 NtUserTranslateMessage(
1626 NtUserUnhookWindowsHookEx(
1631 NtUserUnhookWinEvent(
1636 NtUserUnloadKeyboardLayout(
1641 NtUserUnlockWindowStation(
1642 HWINSTA hWindowStation
);
1646 NtUserUnregisterClass(
1647 LPCWSTR ClassNameOrAtom
,
1648 HINSTANCE hInstance
,
1653 NtUserUnregisterHotKey(HWND hWnd
,
1658 NtUserUpdateInputContext(
1665 NtUserUpdateInstance(
1671 NtUserUpdateWindow( HWND hWnd
);
1675 NtUserUpdateLayeredWindow(
1688 NtUserUpdatePerUserSystemParameters(
1694 NtUserUserHandleGrantAccess(
1701 NtUserValidateHandleSecure(
1705 NtUserValidateRect(HWND Wnd
, const RECT
* Rect
);
1717 NtUserWaitForInputIdle(
1724 NtUserWaitForMsgAndEvent(
1729 NtUserWaitMessage(VOID
);
1733 NtUserWin32PoolAllocationStats(
1743 NtUserWindowFromPoint(
1749 NtUserYieldTask(VOID
);
1752 NtUserGetWindowThreadProcessId(HWND hWnd
, LPDWORD UnsafePid
);
1755 NtUserGetQueueStatus(BOOL ClearChanges
);
1758 NtUserGetParent(HWND hWnd
);
1761 NtUserGetWindow(HWND hWnd
, UINT Relationship
);
1764 NtUserGetLastActivePopup(HWND hWnd
);
1765 typedef struct _WndProcHandle
1773 NtUserDereferenceWndProcHandle(WNDPROC wpHandle
, WndProcHandle
*Data
);
1776 NtUserManualGuiCheck(LONG Check
);
1778 typedef struct _SETSCROLLBARINFO
1782 DWORD rgstate
[CCHILDREN_SCROLLBAR
+1];
1783 } SETSCROLLBARINFO
, *PSETSCROLLBARINFO
;
1787 NtUserSetScrollBarInfo(
1790 SETSCROLLBARINFO
*info
);
1792 /* lParam of DDE messages */
1793 typedef struct tagKMDDEEXECUTEDATA
1797 /* BYTE Data[DataSize] */
1798 } KMDDEEXECUTEDATA
, *PKMDDEEXECUTEDATA
;
1800 typedef struct tagKMDDELPARAM
1812 } KMDDELPARAM
, *PKMDDELPARAM
;
1814 typedef struct _GDI_TABLE_ENTRY
1816 PVOID KernelData
; /* Points to the kernel mode structure */
1817 LONG ProcessId
; /* process id that created the object, 0 for stock objects */
1818 LONG Type
; /* the first 16 bit is the object type including the stock obj flag, the last 16 bits is just the object type */
1819 PVOID UserData
; /* Points to the user mode structure, usually NULL though */
1820 } GDI_TABLE_ENTRY
, *PGDI_TABLE_ENTRY
;
1822 #endif /* __WIN32K_NTUSER_H */