Author: tkreuzer
Date: Mon Jul 30 19:08:14 2007
New Revision: 28045
URL:
http://svn.reactos.org/svn/reactos?rev=28045&view=rev
Log:
- 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
Modified:
trunk/reactos/dll/win32/user32/include/user32p.h
trunk/reactos/dll/win32/user32/user32.def
trunk/reactos/dll/win32/user32/windows/caret.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/ntuser/caret.c
trunk/reactos/tools/nci/w32ksvc.db
Modified: trunk/reactos/dll/win32/user32/include/user32p.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/user32p.h (original)
+++ trunk/reactos/dll/win32/user32/include/user32p.h Mon Jul 30 19:08:14 2007
@@ -119,8 +119,13 @@
#define NtUserShowCursor(bShow) \
NtUserCallOneParam((DWORD)bShow, ONEPARAM_ROUTINE_SHOWCURSOR)
-
-
+
+#define ShowCaret(hwnd) \
+ NtUserShowCaret(hwnd)
+
+#define HideCaret(hwnd) \
+ NtUserHideCaret(hwnd)
+
/* Internal Thread Data */
extern HINSTANCE User32Instance;
Modified: trunk/reactos/dll/win32/user32/user32.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/user32.de…
==============================================================================
--- trunk/reactos/dll/win32/user32/user32.def (original)
+++ trunk/reactos/dll/win32/user32/user32.def Mon Jul 30 19:08:14 2007
@@ -387,7 +387,7 @@
GetWindowWord@8
GrayStringA@36
GrayStringW@36
-HideCaret@4
+HideCaret@4=NtUserHideCaret@4
HiliteMenuItem@16
IMPGetIMEA@8
IMPGetIMEW@8
@@ -662,7 +662,7 @@
SetWindowsHookExA@16
SetWindowsHookExW@16
SetWindowsHookW@8
-ShowCaret@4
+ShowCaret@4=NtUserShowCaret@4
ShowCursor@4
ShowOwnedPopups@8
ShowScrollBar@12
Modified: trunk/reactos/dll/win32/user32/windows/caret.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/caret.c (original)
+++ trunk/reactos/dll/win32/user32/windows/caret.c Mon Jul 30 19:08:14 2007
@@ -107,16 +107,6 @@
* @implemented
*/
BOOL STDCALL
-HideCaret(HWND hWnd)
-{
- return NtUserShowCaret(hWnd, FALSE);
-}
-
-
-/*
- * @implemented
- */
-BOOL STDCALL
SetCaretBlinkTime(UINT uMSeconds)
{
return NtUserSetCaretBlinkTime(uMSeconds);
@@ -134,13 +124,4 @@
}
-/*
- * @implemented
- */
-BOOL STDCALL
-ShowCaret(HWND hWnd)
-{
- return NtUserShowCaret(hWnd, TRUE);
-}
-
/* EOF */
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h Mon Jul 30 19:08:14 2007
@@ -1867,8 +1867,12 @@
BOOL
NTAPI
NtUserShowCaret(
- HWND hWnd,
- BOOL bShow);
+ HWND hWnd);
+
+BOOL
+NTAPI
+NtUserHideCaret(
+ HWND hWnd);
DWORD
NTAPI
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/caret.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/caret.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/caret.c Mon Jul 30 19:08:14 2007
@@ -398,11 +398,9 @@
END_CLEANUP;
}
-
-
BOOL
STDCALL
-NtUserShowCaret(HWND hWnd OPTIONAL, BOOL bShow)
+NtUserShowCaret(HWND hWnd OPTIONAL)
{
PWINDOW_OBJECT Window = NULL;
USER_REFERENCE_ENTRY Ref;
@@ -418,12 +416,9 @@
}
if (Window) UserRefObjectCo(Window, &Ref);
-
- if (bShow)
- ret = co_UserShowCaret(Window);
- else
- ret = co_UserHideCaret(Window);
-
+
+ ret = co_UserShowCaret(Window);
+
if (Window) UserDerefObjectCo(Window);
RETURN(ret);
@@ -433,3 +428,34 @@
UserLeave();
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;
+}
Modified: trunk/reactos/tools/nci/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/nci/w32ksvc.db?rev=2…
==============================================================================
--- trunk/reactos/tools/nci/w32ksvc.db (original)
+++ trunk/reactos/tools/nci/w32ksvc.db Mon Jul 30 19:08:14 2007
@@ -411,6 +411,7 @@
NtUserGetWindowLong 3
NtUserGetWindowRect 2
NtUserGetWOWClass 2
+NtUserHideCaret 1
NtUserHiliteMenuItem 4
NtUserImpersonateDdeClientWindow 2
NtUserInitializeClientPfnArrays 4
@@ -517,7 +518,7 @@
NtUserSetWindowStationUser 4
NtUserSetWindowWord 3
NtUserSetWinEventHook 8
-NtUserShowCaret 2
+NtUserShowCaret 1
NtUserShowScrollBar 3
NtUserShowWindow 2
NtUserShowWindowAsync 2