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
172 #define ONEPARAM_ROUTINE_GETMENU 0x01
173 #define ONEPARAM_ROUTINE_ISWINDOWUNICODE 0x02
174 #define ONEPARAM_ROUTINE_WINDOWFROMDC 0x03
175 #define ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID 0x04
176 #define ONEPARAM_ROUTINE_SWAPMOUSEBUTTON 0x05
177 #define ONEPARAM_ROUTINE_SETCARETBLINKTIME 0x06
178 #define ONEPARAM_ROUTINE_GETCARETINFO 0x07
179 #define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0x08
180 #define ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS 0x09
181 #define ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO 0x0a
182 #define ONEPARAM_ROUTINE_GETCURSORPOSITION 0x0b
183 #define ONEPARAM_ROUTINE_ISWINDOWINDESTROY 0x0c
184 #define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0x0d
185 #define ONEPARAM_ROUTINE_GETWINDOWINSTANCE 0x10
186 #define ONEPARAM_ROUTINE_MSQSETWAKEMASK 0x27
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 NtUserRegisterClassExWOW(
1172 CONST WNDCLASSEXW
* lpwcx
,
1173 PUNICODE_STRING ClassName
,
1174 PUNICODE_STRING ClassNameCopy
,
1175 PUNICODE_STRING MenuName
,
1182 NtUserRegisterHotKey(HWND hWnd
,
1189 NtUserRegisterTasklist(
1193 NtUserRegisterWindowMessage(PUNICODE_STRING MessageName
);
1196 NtUserRemoveProp(HWND hWnd
, ATOM Atom
);
1200 NtUserResolveDesktopForWOW(
1217 CONST RECT
*lprcScroll
,
1218 CONST RECT
*lprcClip
,
1223 NtUserScrollWindowEx(HWND hWnd
, INT dx
, INT dy
, const RECT
*rect
,
1224 const RECT
*clipRect
, HRGN hrgnUpdate
, LPRECT rcUpdate
, UINT flags
);
1233 typedef struct tagNTUSERSENDMESSAGEINFO
1235 BOOL HandledByKernel
;
1238 } NTUSERSENDMESSAGEINFO
, *PNTUSERSENDMESSAGEINFO
;
1241 NtUserSendMessage(HWND hWnd
,
1245 PNTUSERSENDMESSAGEINFO Info
);
1249 NtUserSendMessageCallback(
1254 SENDASYNCPROC lpCallBack
,
1258 NtUserSendMessageTimeout(HWND hWnd
,
1265 PNTUSERSENDMESSAGEINFO Info
);
1269 NtUserSendNotifyMessage(
1276 NtUserSetActiveWindow(HWND Wnd
);
1278 NtUserGetActiveWindow(VOID
);
1281 NtUserSetCapture(HWND Wnd
);
1283 NtUserGetCapture(VOID
);
1302 NtUserSetClipboardData(
1309 NtUserSetClipboardViewer(
1310 HWND hWndNewViewer
);
1314 NtUserSetConsoleReserveKeys(
1325 NtUserSetCursorIconContents(
1327 PICONINFO IconInfo
);
1331 NtUserSetCursorIconData(
1361 NtUserSetImeOwnerWindow(
1367 NtUserSetInternalWindowPos(
1375 NtUserSetKeyboardState(
1380 NtUserSetLayeredWindowAttributes(
1388 NtUserSetLogonNotifyWindow(
1393 NtUserSetObjectInformation(
1396 PVOID pvInformation
,
1403 HWND hWndNewParent
);
1407 NtUserSetProcessWindowStation(
1408 HWINSTA hWindowStation
);
1411 NtUserSetProp(HWND hWnd
, ATOM Atom
, HANDLE Data
);
1421 NtUserSetScrollInfo(
1429 NtUserSetShellWindowEx(
1431 HWND hwndShellListView
);
1435 NtUserGetShellWindow();
1447 NtUserSetSystemCursor(
1453 NtUserSetThreadDesktop(
1458 NtUserSetThreadState(
1464 NtUserSetSystemTimer
1469 TIMERPROC lpTimerFunc
1479 TIMERPROC lpTimerFunc
1484 NtUserSetWindowFNID(
1490 NtUserSetWindowLong(
1498 NtUserSetWindowPlacement(
1500 WINDOWPLACEMENT
*lpwndpl
);
1503 STDCALL
NtUserSetWindowPos(
1505 HWND hWndInsertAfter
,
1522 NtUserSetWindowsHookAW(
1529 NtUserSetWindowsHookEx(
1531 PUNICODE_STRING ModuleName
,
1539 NtUserSetWindowStationUser(
1546 NtUserSetWindowWord(HWND hWnd
, INT Index
, WORD NewVal
);
1550 NtUserSetWinEventHook(
1567 NtUserShowScrollBar(HWND hWnd
, int wBar
, DWORD bShow
);
1577 NtUserShowWindowAsync(
1583 NtUserSwitchDesktop(
1588 NtUserSystemParametersInfo(
1607 NtUserTrackMouseEvent(
1612 NtUserTranslateAccelerator(
1619 NtUserTranslateMessage(
1625 NtUserUnhookWindowsHookEx(
1630 NtUserUnhookWinEvent(
1635 NtUserUnloadKeyboardLayout(
1640 NtUserUnlockWindowStation(
1641 HWINSTA hWindowStation
);
1645 NtUserUnregisterClass(
1646 LPCWSTR ClassNameOrAtom
,
1647 HINSTANCE hInstance
,
1652 NtUserUnregisterHotKey(HWND hWnd
,
1657 NtUserUpdateInputContext(
1664 NtUserUpdateInstance(
1670 NtUserUpdateWindow( HWND hWnd
);
1674 NtUserUpdateLayeredWindow(
1687 NtUserUpdatePerUserSystemParameters(
1693 NtUserUserHandleGrantAccess(
1700 NtUserValidateHandleSecure(
1704 NtUserValidateRect(HWND Wnd
, const RECT
* Rect
);
1716 NtUserWaitForInputIdle(
1723 NtUserWaitForMsgAndEvent(
1728 NtUserWaitMessage(VOID
);
1732 NtUserWin32PoolAllocationStats(
1742 NtUserWindowFromPoint(
1748 NtUserYieldTask(VOID
);
1751 NtUserGetWindowThreadProcessId(HWND hWnd
, LPDWORD UnsafePid
);
1754 NtUserGetQueueStatus(BOOL ClearChanges
);
1757 NtUserGetParent(HWND hWnd
);
1760 NtUserGetWindow(HWND hWnd
, UINT Relationship
);
1763 NtUserGetLastActivePopup(HWND hWnd
);
1764 typedef struct _WndProcHandle
1772 NtUserDereferenceWndProcHandle(WNDPROC wpHandle
, WndProcHandle
*Data
);
1775 NtUserManualGuiCheck(LONG Check
);
1777 typedef struct _SETSCROLLBARINFO
1781 DWORD rgstate
[CCHILDREN_SCROLLBAR
+1];
1782 } SETSCROLLBARINFO
, *PSETSCROLLBARINFO
;
1786 NtUserSetScrollBarInfo(
1789 SETSCROLLBARINFO
*info
);
1791 /* lParam of DDE messages */
1792 typedef struct tagKMDDEEXECUTEDATA
1796 /* BYTE Data[DataSize] */
1797 } KMDDEEXECUTEDATA
, *PKMDDEEXECUTEDATA
;
1799 typedef struct tagKMDDELPARAM
1811 } KMDDELPARAM
, *PKMDDELPARAM
;
1813 typedef struct _GDI_TABLE_ENTRY
1815 PVOID KernelData
; /* Points to the kernel mode structure */
1816 HANDLE ProcessId
; /* process id that created the object, 0 for stock objects */
1817 LONG Type
; /* the first 16 bit is the object type including the stock obj flag, the last 16 bits is just the object type */
1818 PVOID UserData
; /* Points to the user mode structure, usually NULL though */
1819 } GDI_TABLE_ENTRY
, *PGDI_TABLE_ENTRY
;
1821 #endif /* __WIN32K_NTUSER_H */