Synchronize with trunk's revision r57659.
[reactos.git] / win32ss / user / user32 / include / ntwrapper.h
1 #if defined(__GNUC__)
2 #define EXTINLINE extern inline __attribute__((always_inline))
3 #elif defined(_MSC_VER)
4 #define EXTINLINE extern __forceinline
5 #else
6 #error
7 #endif
8
9 BOOL FASTCALL TestState(PWND, UINT);
10
11 EXTINLINE BOOL WINAPI
12 GetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi)
13 {
14 return NtUserGetScrollBarInfo(hWnd, idObject, psbi);
15 }
16
17 EXTINLINE BOOL WINAPI
18 ShowScrollBar(HWND hWnd, INT wBar, BOOL bShow)
19 {
20 return NtUserShowScrollBar(hWnd, wBar, bShow);
21 }
22
23 EXTINLINE BOOL WINAPI
24 CloseDesktop(HDESK hDesktop)
25 {
26 return NtUserCloseDesktop(hDesktop);
27 }
28
29 EXTINLINE HDESK WINAPI
30 OpenInputDesktop(DWORD dwFlags, BOOL fInherit, ACCESS_MASK dwDesiredAccess)
31 {
32 return NtUserOpenInputDesktop(dwFlags, fInherit, dwDesiredAccess);
33 }
34
35 EXTINLINE BOOL WINAPI
36 PaintDesktop(HDC hdc)
37 {
38 return NtUserPaintDesktop(hdc);
39 }
40
41 EXTINLINE BOOL WINAPI
42 SetThreadDesktop(HDESK hDesktop)
43 {
44 return NtUserSetThreadDesktop(hDesktop);
45 }
46
47 EXTINLINE BOOL WINAPI
48 SwitchDesktop(HDESK hDesktop)
49 {
50 return NtUserSwitchDesktop(hDesktop);
51 }
52
53 EXTINLINE BOOL WINAPI
54 SetShellWindowEx(HWND hwndShell, HWND hwndShellListView)
55 {
56 return NtUserSetShellWindowEx(hwndShell, hwndShellListView);
57 }
58
59 EXTINLINE DWORD WINAPI
60 GetGuiResources(HANDLE hProcess, DWORD uiFlags)
61 {
62 return NtUserGetGuiResources(hProcess, uiFlags);
63 }
64
65 EXTINLINE BOOL WINAPI
66 GetUserObjectInformationW(HANDLE hObj, int nIndex, PVOID pvInfo, DWORD nLength, LPDWORD lpnLengthNeeded)
67 {
68 return NtUserGetObjectInformation(hObj, nIndex, pvInfo, nLength, lpnLengthNeeded);
69 }
70
71 EXTINLINE BOOL WINAPI
72 LockWindowUpdate(HWND hWndLock)
73 {
74 return NtUserLockWindowUpdate(hWndLock);
75 }
76
77 EXTINLINE BOOL WINAPI
78 LockWorkStation(VOID)
79 {
80 return NtUserLockWorkStation();
81 }
82
83 EXTINLINE DWORD WINAPI
84 RegisterTasklist(DWORD x)
85 {
86 return NtUserRegisterTasklist(x);
87 }
88
89 EXTINLINE DWORD WINAPI
90 DragObject(HWND hwnd1, HWND hwnd2, UINT u1, ULONG_PTR dw1, HCURSOR hc1)
91 {
92 return NtUserDragObject(hwnd1, hwnd2, u1, dw1, hc1);
93 }
94
95 EXTINLINE BOOL WINAPI
96 KillTimer(HWND hWnd, UINT_PTR IDEvent)
97 {
98 return NtUserKillTimer(hWnd, IDEvent);
99 }
100
101 EXTINLINE UINT_PTR WINAPI
102 SetSystemTimer(HWND hWnd, UINT_PTR IDEvent, UINT Period, TIMERPROC TimerFunc)
103 {
104 return NtUserSetSystemTimer(hWnd, IDEvent, Period, TimerFunc);
105 }
106
107 EXTINLINE UINT_PTR WINAPI
108 SetTimer(HWND hWnd, UINT_PTR IDEvent, UINT Period, TIMERPROC TimerFunc)
109 {
110 return NtUserSetTimer(hWnd, IDEvent, Period, TimerFunc);
111 }
112
113 EXTINLINE BOOL WINAPI
114 CloseWindowStation(HWINSTA hWinSta)
115 {
116 return NtUserCloseWindowStation(hWinSta);
117 }
118
119 EXTINLINE HWINSTA WINAPI
120 GetProcessWindowStation(VOID)
121 {
122 return NtUserGetProcessWindowStation();
123 }
124
125 EXTINLINE BOOL WINAPI
126 SetProcessWindowStation(HWINSTA hWinSta)
127 {
128 return NtUserSetProcessWindowStation(hWinSta);
129 }
130
131 EXTINLINE BOOL WINAPI
132 LockWindowStation(HWINSTA hWinSta)
133 {
134 return NtUserLockWindowStation(hWinSta);
135 }
136
137 EXTINLINE BOOL WINAPI
138 UnlockWindowStation(HWINSTA hWinSta)
139 {
140 return NtUserUnlockWindowStation(hWinSta);
141 }
142
143 EXTINLINE int WINAPI
144 CopyAcceleratorTableW(HACCEL hAccelSrc, LPACCEL lpAccelDst, int cAccelEntries)
145 {
146 return NtUserCopyAcceleratorTable(hAccelSrc, lpAccelDst, cAccelEntries);
147 }
148
149 EXTINLINE HACCEL WINAPI
150 CreateAcceleratorTableW(LPACCEL lpaccl, int cEntries)
151 {
152 return NtUserCreateAcceleratorTable(lpaccl, cEntries);
153 }
154
155 EXTINLINE BOOL WINAPI
156 CreateCaret(HWND hWnd, HBITMAP hBitmap, int nWidth, int nHeight)
157 {
158 return NtUserCreateCaret(hWnd, hBitmap, nWidth, nHeight);
159 }
160
161 EXTINLINE UINT WINAPI
162 GetCaretBlinkTime(VOID)
163 {
164 return NtUserGetCaretBlinkTime();
165 }
166
167 EXTINLINE BOOL WINAPI
168 GetCaretPos(LPPOINT lpPoint)
169 {
170 return NtUserGetCaretPos(lpPoint);
171 }
172
173 EXTINLINE BOOL WINAPI
174 CloseClipboard(VOID)
175 {
176 return NtUserCloseClipboard();
177 }
178
179 EXTINLINE INT WINAPI
180 CountClipboardFormats(VOID)
181 {
182 return NtUserCountClipboardFormats();
183 }
184
185 EXTINLINE BOOL WINAPI
186 EmptyClipboard(VOID)
187 {
188 return NtUserEmptyClipboard();
189 }
190
191 EXTINLINE HWND WINAPI
192 GetClipboardOwner(VOID)
193 {
194 return NtUserGetClipboardOwner();
195 }
196
197 EXTINLINE DWORD WINAPI
198 GetClipboardSequenceNumber(VOID)
199 {
200 return NtUserGetClipboardSequenceNumber();
201 }
202
203 EXTINLINE HWND WINAPI
204 GetClipboardViewer(VOID)
205 {
206 return NtUserGetClipboardViewer();
207 }
208
209 EXTINLINE HWND WINAPI
210 GetOpenClipboardWindow(VOID)
211 {
212 return NtUserGetOpenClipboardWindow();
213 }
214
215 EXTINLINE INT WINAPI
216 GetPriorityClipboardFormat(UINT *paFormatPriorityList, INT cFormats)
217 {
218 return NtUserGetPriorityClipboardFormat(paFormatPriorityList, cFormats);
219 }
220
221 EXTINLINE BOOL WINAPI
222 IsClipboardFormatAvailable(UINT format)
223 {
224 return NtUserIsClipboardFormatAvailable(format);
225 }
226
227 EXTINLINE HWND WINAPI
228 SetClipboardViewer(HWND hWndNewViewer)
229 {
230 return NtUserSetClipboardViewer(hWndNewViewer);
231 }
232
233 EXTINLINE BOOL WINAPI
234 ChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
235 {
236 return NtUserChangeClipboardChain(hWndRemove, hWndNewNext);
237 }
238
239 EXTINLINE BOOL WINAPI
240 GetClipCursor(LPRECT lpRect)
241 {
242 return NtUserGetClipCursor(lpRect);
243 }
244
245 EXTINLINE HBRUSH WINAPI GetControlBrush(HWND hwnd, HDC hdc, UINT ctlType)
246 {
247 return NtUserGetControlBrush(hwnd, hdc, ctlType);
248 }
249
250 EXTINLINE HBRUSH WINAPI GetControlColor(HWND hwndParent, HWND hwnd, HDC hdc, UINT CtlMsg)
251 {
252 return NtUserGetControlColor(hwndParent, hwnd, hdc, CtlMsg);
253 }
254
255 EXTINLINE BOOL WINAPI
256 GetCursorInfo(PCURSORINFO pci)
257 {
258 return NtUserGetCursorInfo(pci);
259 }
260
261 EXTINLINE BOOL WINAPI
262 ClipCursor(CONST RECT *lpRect)
263 {
264 return NtUserClipCursor((RECT *)lpRect);
265 }
266
267 EXTINLINE HCURSOR WINAPI
268 SetCursor(HCURSOR hCursor)
269 {
270 return NtUserSetCursor(hCursor);
271 }
272
273 EXTINLINE HDC WINAPI
274 GetDC(HWND hWnd)
275 {
276 return NtUserGetDC(hWnd);
277 }
278
279 EXTINLINE HDC WINAPI
280 GetDCEx(HWND hWnd, HRGN hrgnClip, DWORD flags)
281 {
282 return NtUserGetDCEx(hWnd, hrgnClip, flags);
283 }
284
285 EXTINLINE HDC WINAPI
286 GetWindowDC(HWND hWnd)
287 {
288 return NtUserGetWindowDC(hWnd);
289 }
290
291 EXTINLINE BOOL WINAPI
292 FlashWindowEx(PFLASHWINFO pfwi)
293 {
294 return NtUserFlashWindowEx(pfwi);
295 }
296
297 EXTINLINE BOOL WINAPI
298 DrawAnimatedRects(HWND hWnd, int idAni, CONST RECT *lprcFrom, CONST RECT *lprcTo)
299 {
300 return NtUserDrawAnimatedRects(hWnd, idAni, (RECT*)lprcFrom, (RECT*)lprcTo);
301 }
302
303 EXTINLINE BOOL WINAPI
304 BlockInput(BOOL fBlockIt)
305 {
306 return NtUserBlockInput(fBlockIt);
307 }
308
309 EXTINLINE UINT WINAPI
310 GetDoubleClickTime(VOID)
311 {
312 return NtUserGetDoubleClickTime();
313 }
314
315 EXTINLINE BOOL WINAPI
316 GetKeyboardState(PBYTE lpKeyState)
317 {
318 return NtUserGetKeyboardState((LPBYTE) lpKeyState);
319 }
320
321 EXTINLINE BOOL WINAPI
322 RegisterHotKey(HWND hWnd, int id, UINT fsModifiers, UINT vk)
323 {
324 return NtUserRegisterHotKey(hWnd, id, fsModifiers, vk);
325 }
326
327 EXTINLINE HWND WINAPI
328 SetFocus(HWND hWnd)
329 {
330 return NtUserSetFocus(hWnd);
331 }
332
333 EXTINLINE BOOL WINAPI
334 SetKeyboardState(LPBYTE lpKeyState)
335 {
336 return NtUserSetKeyboardState((LPBYTE)lpKeyState);
337 }
338
339 EXTINLINE UINT WINAPI
340 SendInput(UINT nInputs, LPINPUT pInputs, int cbSize)
341 {
342 return NtUserSendInput(nInputs, pInputs, cbSize);
343 }
344
345 EXTINLINE BOOL WINAPI
346 WaitMessage(VOID)
347 {
348 return NtUserWaitMessage();
349 }
350
351 EXTINLINE HDC WINAPI
352 BeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint)
353 {
354 return NtUserBeginPaint(hwnd, lpPaint);
355 }
356
357 EXTINLINE BOOL WINAPI
358 EndPaint(HWND hWnd, CONST PAINTSTRUCT *lpPaint)
359 {
360 return NtUserEndPaint(hWnd, lpPaint);
361 }
362
363 EXTINLINE int WINAPI
364 ExcludeUpdateRgn(HDC hDC, HWND hWnd)
365 {
366 return NtUserExcludeUpdateRgn(hDC, hWnd);
367 }
368
369 EXTINLINE BOOL WINAPI
370 InvalidateRgn(HWND hWnd, HRGN hRgn, BOOL bErase)
371 {
372 return NtUserInvalidateRgn(hWnd, hRgn, bErase);
373 }
374
375 EXTINLINE BOOL WINAPI
376 RedrawWindow(HWND hWnd, CONST RECT *lprcUpdate, HRGN hrgnUpdate, UINT flags)
377 {
378 return NtUserRedrawWindow(hWnd, lprcUpdate, hrgnUpdate, flags);
379 }
380
381 EXTINLINE BOOL WINAPI
382 DestroyWindow(HWND hWnd)
383 {
384 return NtUserDestroyWindow(hWnd);
385 }
386
387 EXTINLINE HWND WINAPI
388 GetForegroundWindow(VOID)
389 {
390 return NtUserGetForegroundWindow();
391 }
392
393 EXTINLINE BOOL WINAPI
394 GetGUIThreadInfo(DWORD idThread, LPGUITHREADINFO lpgui)
395 {
396 return NtUserGetGUIThreadInfo(idThread, lpgui);
397 }
398
399 EXTINLINE BOOL WINAPI
400 GetTitleBarInfo(HWND hwnd, PTITLEBARINFO pti)
401 {
402 return NtUserGetTitleBarInfo(hwnd, pti);
403 }
404
405 EXTINLINE BOOL WINAPI
406 GetWindowPlacement(HWND hWnd, WINDOWPLACEMENT *lpwndpl)
407 {
408 return NtUserGetWindowPlacement(hWnd, lpwndpl);
409 }
410
411 EXTINLINE BOOL WINAPI
412 MoveWindow(HWND hWnd, int X, int Y, int nWidth, int nHeight, BOOL bRepaint)
413 {
414 return NtUserMoveWindow(hWnd, X, Y, nWidth, nHeight, bRepaint);
415 }
416
417 EXTINLINE HWND WINAPI
418 SetParent(HWND hWndChild, HWND hWndNewParent)
419 {
420 return NtUserSetParent(hWndChild, hWndNewParent);
421 }
422
423 EXTINLINE BOOL WINAPI
424 SetWindowPlacement(HWND hWnd, CONST WINDOWPLACEMENT *lpwndpl)
425 {
426 return NtUserSetWindowPlacement(hWnd, (WINDOWPLACEMENT *)lpwndpl);
427 }
428
429 EXTINLINE BOOL WINAPI
430 SetWindowPos(HWND hWnd, HWND hWndAfter, int X, int Y, int cx, int cy, UINT uFlags)
431 {
432 return NtUserSetWindowPos(hWnd,hWndAfter, X, Y, cx, cy, uFlags);
433 }
434
435 EXTINLINE BOOL WINAPI
436 ShowWindow(HWND hWnd, int nCmdShow)
437 {
438 return NtUserShowWindow(hWnd, nCmdShow);
439 }
440
441 EXTINLINE BOOL WINAPI
442 ShowWindowAsync(HWND hWnd, int nCmdShow)
443 {
444 return NtUserShowWindowAsync(hWnd, nCmdShow);
445 }
446
447 EXTINLINE HWND WINAPI
448 SetActiveWindow(HWND hWnd)
449 {
450 return NtUserSetActiveWindow(hWnd);
451 }
452
453 EXTINLINE DWORD WINAPI
454 GetListBoxInfo(HWND hwnd)
455 {
456 return NtUserGetListBoxInfo(hwnd); // Do it right! Have the message org from kmode!
457 }
458
459 EXTINLINE BOOL WINAPI
460 DeleteMenu(HMENU hMenu, UINT uPosition, UINT uFlags)
461 {
462 return NtUserDeleteMenu(hMenu, uPosition, uFlags);
463 }
464
465 EXTINLINE BOOL WINAPI
466 DestroyMenu(HMENU hMenu)
467 {
468 return NtUserDestroyMenu(hMenu);
469 }
470
471 /*EXTINLINE BOOL WINAPI
472 GetMenuBarInfo(HWND hwnd, LONG idObject, LONG idItem, PMENUBARINFO pmbi)
473 {
474 return NtUserGetMenuBarInfo(hwnd, idObject, idItem, pmbi);
475 }
476 */
477 EXTINLINE BOOL WINAPI
478 GetMenuItemRect(HWND hWnd, HMENU hMenu, UINT uItem, LPRECT lprcItem)
479 {
480 return NtUserGetMenuItemRect(hWnd, hMenu, uItem, lprcItem);
481 }
482
483 EXTINLINE BOOL WINAPI
484 RemoveMenu(HMENU hMenu, UINT uPosition, UINT uFlags)
485 {
486 return NtUserRemoveMenu(hMenu, uPosition, uFlags);
487 }
488
489 EXTINLINE BOOL WINAPI
490 SetMenuDefaultItem(HMENU hMenu, UINT uItem, UINT fByPos)
491 {
492 return NtUserSetMenuDefaultItem(hMenu, uItem, fByPos);
493 }
494
495 EXTINLINE BOOL WINAPI
496 SetMenuContextHelpId(HMENU hmenu, DWORD dwContextHelpId)
497 {
498 return NtUserSetMenuContextHelpId(hmenu, dwContextHelpId);
499 }
500
501 EXTINLINE HWND WINAPI
502 SetCapture(HWND hWnd)
503 {
504 return(NtUserSetCapture(hWnd));
505 }
506
507 EXTINLINE BOOL WINAPI
508 InvalidateRect(HWND hWnd, CONST RECT* lpRect, BOOL bErase)
509 {
510 return NtUserInvalidateRect(hWnd, lpRect, bErase);
511 }
512
513 EXTINLINE BOOL WINAPI ValidateRect( HWND hWnd, CONST RECT *lpRect)
514 {
515 return NtUserValidateRect(hWnd, lpRect);
516 }
517
518 EXTINLINE BOOL WINAPI ShowCaret( HWND hWnd )
519 {
520 return NtUserShowCaret(hWnd);
521 }
522
523 EXTINLINE BOOL WINAPI HideCaret( HWND hWnd )
524 {
525 return NtUserHideCaret(hWnd);
526 }
527
528
529
530
531 /*
532 Inline functions that make calling NtUserCall*** functions readable
533 These functions are prepended with NtUserx because they are not
534 real syscalls and they are inlined
535 */
536
537 EXTINLINE BOOL NtUserxDestroyCaret(VOID)
538 {
539 return (BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_DESTROY_CARET);
540 }
541
542 EXTINLINE VOID NtUserxMsqClearWakeMask()
543 {
544 NtUserCallNoParam(NOPARAM_ROUTINE_MSQCLEARWAKEMASK);
545 }
546
547 EXTINLINE HMENU NtUserxCreateMenu()
548 {
549 return (HMENU)NtUserCallNoParam(NOPARAM_ROUTINE_CREATEMENU);
550 }
551
552 EXTINLINE HMENU NtUserxCreatePopupMenu()
553 {
554 return (HMENU)NtUserCallNoParam(NOPARAM_ROUTINE_CREATEMENUPOPUP);
555 }
556
557 EXTINLINE DWORD NtUserxGetMessagePos(VOID)
558 {
559 return (DWORD)NtUserCallNoParam(NOPARAM_ROUTINE_GETMSESSAGEPOS);
560 }
561
562 EXTINLINE BOOL NtUserxReleaseCapture(VOID)
563 {
564 return (BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_RELEASECAPTURE);
565 }
566
567 EXTINLINE BOOL NtUserxInitMessagePump()
568 {
569 return NtUserCallNoParam(NOPARAM_ROUTINE_INIT_MESSAGE_PUMP);
570 }
571
572 EXTINLINE BOOL NtUserxUnInitMessagePump()
573 {
574 return NtUserCallNoParam(NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP);
575 }
576
577 EXTINLINE HANDLE NtUserxMsqSetWakeMask(DWORD_PTR dwWaitMask)
578 {
579 return (HANDLE)NtUserCallOneParam(dwWaitMask, ONEPARAM_ROUTINE_GETINPUTEVENT);
580 }
581
582 EXTINLINE BOOL NtUserxSetCaretBlinkTime(UINT uMSeconds)
583 {
584 return (BOOL)NtUserCallOneParam(uMSeconds, ONEPARAM_ROUTINE_SETCARETBLINKTIME);
585 }
586
587 EXTINLINE HWND NtUserxWindowFromDC(HDC hDC)
588 {
589 return (HWND)NtUserCallOneParam((DWORD_PTR)hDC, ONEPARAM_ROUTINE_WINDOWFROMDC);
590 }
591
592 EXTINLINE BOOL NtUserxSwapMouseButton(BOOL fSwap)
593 {
594 return (BOOL)NtUserCallOneParam((DWORD_PTR)fSwap, ONEPARAM_ROUTINE_SWAPMOUSEBUTTON);
595 }
596
597 EXTINLINE LPARAM NtUserxSetMessageExtraInfo(LPARAM lParam)
598 {
599 return (LPARAM)NtUserCallOneParam((DWORD_PTR)lParam, ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO);
600 }
601
602 EXTINLINE INT NtUserxShowCursor(BOOL bShow)
603 {
604 return (INT)NtUserCallOneParam((DWORD_PTR)bShow, ONEPARAM_ROUTINE_SHOWCURSOR);
605 }
606
607 EXTINLINE UINT NtUserxEnumClipboardFormats(UINT format)
608 {
609 return (UINT)NtUserCallOneParam((DWORD_PTR)format, ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS);
610 }
611
612 EXTINLINE HICON NtUserxCreateEmptyCurObject(DWORD_PTR Param)
613 {
614 return (HICON)NtUserCallOneParam(Param, ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT);
615 }
616
617 EXTINLINE BOOL NtUserxMessageBeep(UINT uType)
618 {
619 return (BOOL)NtUserCallOneParam(uType, ONEPARAM_ROUTINE_MESSAGEBEEP);
620 }
621
622 EXTINLINE HKL NtUserxGetKeyboardLayout(DWORD idThread)
623 {
624 return (HKL)NtUserCallOneParam((DWORD_PTR) idThread, ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT);
625 }
626
627 EXTINLINE INT NtUserxGetKeyboardType(INT nTypeFlag)
628 {
629 return (INT)NtUserCallOneParam((DWORD_PTR) nTypeFlag, ONEPARAM_ROUTINE_GETKEYBOARDTYPE);
630 }
631
632 EXTINLINE INT NtUserxReleaseDC(HDC hDC)
633 {
634 return (INT)NtUserCallOneParam((DWORD_PTR) hDC, ONEPARAM_ROUTINE_RELEASEDC);
635 }
636
637 EXTINLINE UINT NtUserxRealizePalette ( HDC hDC )
638 {
639 return (UINT)NtUserCallOneParam((DWORD_PTR) hDC, ONEPARAM_ROUTINE_REALIZEPALETTE);
640 }
641
642 EXTINLINE VOID NtUserxCreateSystemThreads(DWORD param)
643 {
644 NtUserCallOneParam(param, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS);
645 }
646
647 EXTINLINE HDWP NtUserxBeginDeferWindowPos(INT nNumWindows)
648 {
649 return (HDWP)NtUserCallOneParam((DWORD_PTR)nNumWindows, ONEPARAM_ROUTINE_BEGINDEFERWNDPOS);
650 }
651
652 EXTINLINE BOOL NtUserxReplyMessage(LRESULT lResult)
653 {
654 return NtUserCallOneParam(lResult, ONEPARAM_ROUTINE_REPLYMESSAGE);
655 }
656
657 EXTINLINE VOID NtUserxPostQuitMessage(int nExitCode)
658 {
659 NtUserCallOneParam(nExitCode, ONEPARAM_ROUTINE_POSTQUITMESSAGE);
660 }
661
662 EXTINLINE DWORD NtUserxGetQueueStatus(UINT flags)
663 {
664 return (DWORD)NtUserCallOneParam(flags, ONEPARAM_ROUTINE_GETQUEUESTATUS);
665 }
666
667 EXTINLINE BOOL NtUserxValidateRgn(HWND hWnd, HRGN hRgn)
668 {
669 return (BOOL)NtUserCallHwndParamLock(hWnd, (DWORD_PTR)hRgn, TWOPARAM_ROUTINE_VALIDATERGN);
670 }
671
672 EXTINLINE BOOL NtUserxSetCursorPos(INT x, INT y)
673 {
674 return (BOOL)NtUserCallTwoParam((DWORD)x, (DWORD)y, TWOPARAM_ROUTINE_SETCURSORPOS);
675 }
676
677 EXTINLINE BOOL NtUserxEnableWindow(HWND hWnd, BOOL bEnable)
678 {
679 return (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)bEnable, TWOPARAM_ROUTINE_ENABLEWINDOW);
680 }
681
682 EXTINLINE BOOL NtUserxUpdateUiState(HWND hWnd, DWORD Param)
683 {
684 return (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)Param, TWOPARAM_ROUTINE_ROS_UPDATEUISTATE);
685 }
686
687 EXTINLINE BOOL NtUserxShowOwnedPopups(HWND hWnd, BOOL fShow)
688 {
689 return (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, fShow, TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS);
690 }
691
692 EXTINLINE BOOL NtUserxUnhookWindowsHook ( int nCode, HOOKPROC pfnFilterProc )
693 {
694 return (BOOL)NtUserCallTwoParam(nCode, (DWORD_PTR)pfnFilterProc, TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK);
695 }
696
697 EXTINLINE BOOL NtUserxSetWindowContextHelpId(HWND hWnd, DWORD_PTR dwContextHelpId)
698 {
699 return (BOOL)NtUserCallHwndParam(hWnd, dwContextHelpId, HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID);
700 }
701
702 EXTINLINE BOOL NtUserxKillSystemTimer(HWND hWnd, UINT_PTR IDEvent)
703 {
704 return (BOOL)NtUserCallHwndParam(hWnd, IDEvent, HWNDPARAM_ROUTINE_KILLSYSTEMTIMER);
705 }
706
707 EXTINLINE VOID NtUserxSetDialogPointer(HWND hWnd, PVOID dlgInfo)
708 {
709 NtUserCallHwndParam( hWnd, (DWORD_PTR)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER );
710 }
711
712 EXTINLINE VOID NtUserxNotifyWinEvent(HWND hWnd, PVOID ne)
713 {
714 NtUserCallHwndParam(hWnd, (DWORD_PTR)ne, HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT);
715 }
716
717 EXTINLINE DWORD NtUserxGetWindowContextHelpId(HWND hwnd)
718 {
719 return NtUserCallHwnd(hwnd, HWND_ROUTINE_GETWNDCONTEXTHLPID);
720 }
721
722 EXTINLINE BOOL NtUserxDeregisterShellHookWindow(HWND hWnd)
723 {
724 return NtUserCallHwnd(hWnd, HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW);
725 }
726
727 EXTINLINE BOOL NtUserxRegisterShellHookWindow(HWND hWnd)
728 {
729 return NtUserCallHwnd(hWnd, HWND_ROUTINE_REGISTERSHELLHOOKWINDOW);
730 }
731
732 EXTINLINE BOOL NtUserxSetMessageBox(HWND hWnd)
733 {
734 return NtUserCallHwnd(hWnd, HWND_ROUTINE_SETMSGBOX);
735 }
736
737 EXTINLINE VOID NtUserxClearWindowState(PWND pWnd, UINT Flag)
738 {
739 if (!TestState(pWnd, Flag)) return;
740 NtUserCallHwndParam(UserHMGetHandle(pWnd), (DWORD_PTR)Flag, HWNDPARAM_ROUTINE_CLEARWINDOWSTATE);
741 }
742
743 EXTINLINE VOID NtUserxSetWindowState(PWND pWnd, UINT Flag)
744 {
745 if (TestState(pWnd, Flag)) return;
746 NtUserCallHwndParam(UserHMGetHandle(pWnd), (DWORD_PTR)Flag, HWNDPARAM_ROUTINE_SETWINDOWSTATE);
747 }
748
749 EXTINLINE HWND NtUserxSetTaskmanWindow(HWND hWnd)
750 {
751 return NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETTASKMANWINDOW);
752 }
753
754 EXTINLINE HWND NtUserxSetProgmanWindow(HWND hWnd)
755 {
756 return NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETPROGMANWINDOW);
757 }
758
759 EXTINLINE UINT NtUserxArrangeIconicWindows(HWND hWnd)
760 {
761 return (UINT)NtUserCallHwndLock( hWnd, HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS);
762 }
763
764 EXTINLINE BOOL NtUserxUpdateWindow(HWND hWnd)
765 {
766 return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_UPDATEWINDOW);
767 }
768
769 EXTINLINE BOOL NtUserxDrawMenuBar(HWND hWnd)
770 {
771 return (BOOL)NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_DRAWMENUBAR);
772 }
773
774 EXTINLINE BOOL NtUserxMDIRedrawFrame(HWND hWnd)
775 {
776 return (BOOL)NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_REDRAWFRAME);
777 }
778
779 EXTINLINE BOOL NtUserxSetForegroundWindow(HWND hWnd)
780 {
781 return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW);
782 }
783
784
785 /* Reactos specific definitions */
786
787 EXTINLINE LPARAM NtUserxGetMessageExtraInfo(VOID)
788 {
789 return (LPARAM)NtUserCallNoParam(NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO);
790 }
791
792 EXTINLINE BOOL NtUserxSwitchCaretShowing(THRDCARETINFO* CaretInfo)
793 {
794 return (BOOL)NtUserCallOneParam((DWORD_PTR)CaretInfo, ONEPARAM_ROUTINE_SWITCHCARETSHOWING);
795 }
796
797 EXTINLINE VOID NtUserxEnableProcessWindowGhosting(BOOL bEnable)
798 {
799 NtUserCallOneParam((DWORD_PTR)bEnable, ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING);
800 }
801
802 EXTINLINE PVOID NtUserxGetDesktopMapping(PVOID ptr)
803 {
804 return (PVOID)NtUserCallOneParam((DWORD_PTR)ptr, ONEPARAM_ROUTINE_GETDESKTOPMAPPING);
805 }
806
807 EXTINLINE BOOL NtUserxGetCursorPos(POINT* lpPoint)
808 {
809 return (BOOL)NtUserCallOneParam((DWORD_PTR)lpPoint, ONEPARAM_ROUTINE_GETCURSORPOS);
810 }
811
812 EXTINLINE BOOL NtUserxSetMenuBarHeight(HMENU menu, INT height)
813 {
814 return (BOOL)NtUserCallTwoParam((DWORD_PTR)menu, (DWORD_PTR)height, TWOPARAM_ROUTINE_SETMENUBARHEIGHT);
815 }
816
817 EXTINLINE BOOL NtUserxSetGUIThreadHandle(DWORD_PTR field, HWND hwnd)
818 {
819 return (BOOL)NtUserCallTwoParam((DWORD_PTR)field, (DWORD_PTR)hwnd, TWOPARAM_ROUTINE_SETGUITHRDHANDLE);
820 }
821
822 EXTINLINE BOOL NtUserxSetCaretPos(INT x, INT y)
823 {
824 return (BOOL)NtUserCallTwoParam((DWORD_PTR)x, (DWORD_PTR)y, TWOPARAM_ROUTINE_SETCARETPOS);
825 }
826
827 EXTINLINE BOOL NtUserxRegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
828 {
829 return (BOOL)NtUserCallTwoParam((DWORD_PTR)dwProcessId, (DWORD_PTR)bRegister, TWOPARAM_ROUTINE_REGISTERLOGONPROCESS);
830 }
831
832 EXTINLINE BOOL NtUserxAllowSetForegroundWindow(DWORD dwProcessId)
833 {
834 return (BOOL)NtUserCallOneParam((DWORD_PTR)dwProcessId, ONEPARAM_ROUTINE_ALLOWSETFOREGND);
835 }
836
837 EXTINLINE BOOL NtUserxLockSetForegroundWindow(UINT uLockCode)
838 {
839 return (BOOL)NtUserCallOneParam((DWORD_PTR)uLockCode, ONEPARAM_ROUTINE_LOCKFOREGNDWINDOW);
840 }