- implement NtUserHideCaret, make NtUserShowCaret prototype match XP ones.

- update w32ksvc.db
- update ntuser.h
- remove implementations of ShowCaret and HideCaret from user32, redirectexports to nt functions
- add macros for ShowCaret / HideCaret to user32p.h to resolve user32 internal references

svn path=/trunk/; revision=28045
This commit is contained in:
Timo Kreuzer 2007-07-30 15:08:14 +00:00
parent 7855dd896f
commit a2171e8ec6
6 changed files with 52 additions and 35 deletions

View file

@ -120,6 +120,11 @@
#define NtUserShowCursor(bShow) \ #define NtUserShowCursor(bShow) \
NtUserCallOneParam((DWORD)bShow, ONEPARAM_ROUTINE_SHOWCURSOR) NtUserCallOneParam((DWORD)bShow, ONEPARAM_ROUTINE_SHOWCURSOR)
#define ShowCaret(hwnd) \
NtUserShowCaret(hwnd)
#define HideCaret(hwnd) \
NtUserHideCaret(hwnd)
/* Internal Thread Data */ /* Internal Thread Data */

View file

@ -387,7 +387,7 @@ GetWindowThreadProcessId@8
GetWindowWord@8 GetWindowWord@8
GrayStringA@36 GrayStringA@36
GrayStringW@36 GrayStringW@36
HideCaret@4 HideCaret@4=NtUserHideCaret@4
HiliteMenuItem@16 HiliteMenuItem@16
IMPGetIMEA@8 IMPGetIMEA@8
IMPGetIMEW@8 IMPGetIMEW@8
@ -662,7 +662,7 @@ SetWindowsHookA@8
SetWindowsHookExA@16 SetWindowsHookExA@16
SetWindowsHookExW@16 SetWindowsHookExW@16
SetWindowsHookW@8 SetWindowsHookW@8
ShowCaret@4 ShowCaret@4=NtUserShowCaret@4
ShowCursor@4 ShowCursor@4
ShowOwnedPopups@8 ShowOwnedPopups@8
ShowScrollBar@12 ShowScrollBar@12

View file

@ -103,16 +103,6 @@ GetCaretPos(LPPOINT lpPoint)
} }
/*
* @implemented
*/
BOOL STDCALL
HideCaret(HWND hWnd)
{
return NtUserShowCaret(hWnd, FALSE);
}
/* /*
* @implemented * @implemented
*/ */
@ -134,13 +124,4 @@ SetCaretPos(int X,
} }
/*
* @implemented
*/
BOOL STDCALL
ShowCaret(HWND hWnd)
{
return NtUserShowCaret(hWnd, TRUE);
}
/* EOF */ /* EOF */

View file

@ -1867,8 +1867,12 @@ NtUserSetWinEventHook(
BOOL BOOL
NTAPI NTAPI
NtUserShowCaret( NtUserShowCaret(
HWND hWnd, HWND hWnd);
BOOL bShow);
BOOL
NTAPI
NtUserHideCaret(
HWND hWnd);
DWORD DWORD
NTAPI NTAPI

View file

@ -398,11 +398,9 @@ CLEANUP:
END_CLEANUP; END_CLEANUP;
} }
BOOL BOOL
STDCALL STDCALL
NtUserShowCaret(HWND hWnd OPTIONAL, BOOL bShow) NtUserShowCaret(HWND hWnd OPTIONAL)
{ {
PWINDOW_OBJECT Window = NULL; PWINDOW_OBJECT Window = NULL;
USER_REFERENCE_ENTRY Ref; USER_REFERENCE_ENTRY Ref;
@ -419,10 +417,7 @@ NtUserShowCaret(HWND hWnd OPTIONAL, BOOL bShow)
if (Window) UserRefObjectCo(Window, &Ref); if (Window) UserRefObjectCo(Window, &Ref);
if (bShow) ret = co_UserShowCaret(Window);
ret = co_UserShowCaret(Window);
else
ret = co_UserHideCaret(Window);
if (Window) UserDerefObjectCo(Window); if (Window) UserDerefObjectCo(Window);
@ -433,3 +428,34 @@ CLEANUP:
UserLeave(); UserLeave();
END_CLEANUP; END_CLEANUP;
} }
BOOL
STDCALL
NtUserHideCaret(HWND hWnd OPTIONAL)
{
PWINDOW_OBJECT Window = NULL;
USER_REFERENCE_ENTRY Ref;
DECLARE_RETURN(BOOL);
BOOL ret;
DPRINT("Enter NtUserHideCaret\n");
UserEnterExclusive();
if(hWnd && !(Window = UserGetWindowObject(hWnd)))
{
RETURN(FALSE);
}
if (Window) UserRefObjectCo(Window, &Ref);
ret = co_UserHideCaret(Window);
if (Window) UserDerefObjectCo(Window);
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserHideCaret, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}

View file

@ -411,6 +411,7 @@ NtUserGetWindowPlacement 2
NtUserGetWindowLong 3 NtUserGetWindowLong 3
NtUserGetWindowRect 2 NtUserGetWindowRect 2
NtUserGetWOWClass 2 NtUserGetWOWClass 2
NtUserHideCaret 1
NtUserHiliteMenuItem 4 NtUserHiliteMenuItem 4
NtUserImpersonateDdeClientWindow 2 NtUserImpersonateDdeClientWindow 2
NtUserInitializeClientPfnArrays 4 NtUserInitializeClientPfnArrays 4
@ -517,7 +518,7 @@ NtUserSetWindowsHookEx 6
NtUserSetWindowStationUser 4 NtUserSetWindowStationUser 4
NtUserSetWindowWord 3 NtUserSetWindowWord 3
NtUserSetWinEventHook 8 NtUserSetWinEventHook 8
NtUserShowCaret 2 NtUserShowCaret 1
NtUserShowScrollBar 3 NtUserShowScrollBar 3
NtUserShowWindow 2 NtUserShowWindow 2
NtUserShowWindowAsync 2 NtUserShowWindowAsync 2