mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:16:04 +00:00
1. implemented GetDoubleClickTime() and SetDoubleClickTime()
2. implemented SM_CXDOUBLECLK, SM_CYDOUBLECLK and SM_SWAPBUTTON for GetSystemMetrics() 3. implemented NtUserSystemParametersInfo() partially 4. implemented SPI_SETDOUBLECLKWIDTH, SPI_SETDOUBLECLKHEIGHT and SPI_SETDOUBLECLICKTIME for SystemParametersInfo() svn path=/trunk/; revision=5899
This commit is contained in:
parent
303749022b
commit
7a0c1b40d1
6 changed files with 139 additions and 44 deletions
|
@ -156,6 +156,7 @@ NtUserCallNextHookEx(
|
||||||
DWORD Unknown2,
|
DWORD Unknown2,
|
||||||
DWORD Unknown3);
|
DWORD Unknown3);
|
||||||
|
|
||||||
|
#define NOPARAM_ROUTINE_GETDOUBLECLICKTIME 0x01
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserCallNoParam(
|
NtUserCallNoParam(
|
||||||
|
@ -1611,10 +1612,10 @@ NtUserSwitchDesktop(
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserSystemParametersInfo(
|
NtUserSystemParametersInfo(
|
||||||
DWORD Unknown0,
|
UINT uiAction,
|
||||||
DWORD Unknown1,
|
UINT uiParam,
|
||||||
DWORD Unknown2,
|
PVOID pvParam,
|
||||||
DWORD Unknown3);
|
UINT fWinIni);
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: desktop.c,v 1.25 2003/08/19 15:18:26 royce Exp $
|
/* $Id: desktop.c,v 1.26 2003/08/28 18:04:59 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
|
@ -92,6 +92,8 @@ SystemParametersInfoW(UINT uiAction,
|
||||||
{
|
{
|
||||||
case SPI_GETWORKAREA:
|
case SPI_GETWORKAREA:
|
||||||
{
|
{
|
||||||
|
/* FIXME we should obtain the information using GetMonitorInfo(),
|
||||||
|
besides it is not the whole screen size! */
|
||||||
((PRECT)pvParam)->left = 0;
|
((PRECT)pvParam)->left = 0;
|
||||||
((PRECT)pvParam)->top = 0;
|
((PRECT)pvParam)->top = 0;
|
||||||
((PRECT)pvParam)->right = 640;
|
((PRECT)pvParam)->right = 640;
|
||||||
|
@ -105,6 +107,13 @@ SystemParametersInfoW(UINT uiAction,
|
||||||
memcpy(&nclm->lfSmCaptionFont, &CaptionFont, sizeof(CaptionFont));
|
memcpy(&nclm->lfSmCaptionFont, &CaptionFont, sizeof(CaptionFont));
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
return NtUserSystemParametersInfo(uiAction,
|
||||||
|
uiParam,
|
||||||
|
pvParam,
|
||||||
|
fWinIni);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: input.c,v 1.16 2003/08/28 16:33:22 weiden Exp $
|
/* $Id: input.c,v 1.17 2003/08/28 18:04:59 weiden Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/input.c
|
* FILE: lib/user32/windows/input.c
|
||||||
|
@ -101,14 +101,13 @@ GetAsyncKeyState(int vKey)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
UINT
|
UINT
|
||||||
STDCALL
|
STDCALL
|
||||||
GetDoubleClickTime(VOID)
|
GetDoubleClickTime(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return (UINT)NtUserCallNoParam(NOPARAM_ROUTINE_GETDOUBLECLICKTIME);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -323,15 +322,17 @@ OemKeyScan(WORD wOemChar)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
WINBOOL
|
WINBOOL
|
||||||
STDCALL
|
STDCALL
|
||||||
SetDoubleClickTime(
|
SetDoubleClickTime(
|
||||||
UINT uInterval)
|
UINT uInterval)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return (WINBOOL)NtUserSystemParametersInfo(SPI_SETDOUBLECLICKTIME,
|
||||||
return FALSE;
|
uInterval,
|
||||||
|
NULL,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: metric.c,v 1.10 2003/08/20 00:41:04 silverblade Exp $
|
/* $Id: metric.c,v 1.11 2003/08/28 18:04:59 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -47,9 +47,12 @@
|
||||||
ULONG STDCALL
|
ULONG STDCALL
|
||||||
NtUserGetSystemMetrics(ULONG Index)
|
NtUserGetSystemMetrics(ULONG Index)
|
||||||
{
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
PWINSTATION_OBJECT WinStaObject;
|
||||||
PWINDOW_OBJECT DesktopWindow;
|
PWINDOW_OBJECT DesktopWindow;
|
||||||
ULONG Width, Height;
|
ULONG Width, Height, Result;
|
||||||
|
|
||||||
|
Result = 0;
|
||||||
switch (Index)
|
switch (Index)
|
||||||
{
|
{
|
||||||
case SM_ARRANGE:
|
case SM_ARRANGE:
|
||||||
|
@ -69,7 +72,30 @@ NtUserGetSystemMetrics(ULONG Index)
|
||||||
return(3);
|
return(3);
|
||||||
case SM_CXDOUBLECLK:
|
case SM_CXDOUBLECLK:
|
||||||
case SM_CYDOUBLECLK:
|
case SM_CYDOUBLECLK:
|
||||||
return(4);
|
case SM_SWAPBUTTON:
|
||||||
|
Status = ValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
|
||||||
|
KernelMode,
|
||||||
|
0,
|
||||||
|
&WinStaObject);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
return 0xFFFFFFFF;
|
||||||
|
|
||||||
|
switch(Index)
|
||||||
|
{
|
||||||
|
case SM_CXDOUBLECLK:
|
||||||
|
Result = WinStaObject->SystemCursor.DblClickWidth;
|
||||||
|
break;
|
||||||
|
case SM_CYDOUBLECLK:
|
||||||
|
Result = WinStaObject->SystemCursor.DblClickWidth;
|
||||||
|
break;
|
||||||
|
case SM_SWAPBUTTON:
|
||||||
|
Result = (UINT)WinStaObject->SystemCursor.SwapButtons;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ObDereferenceObject(WinStaObject);
|
||||||
|
return Result;
|
||||||
|
|
||||||
case SM_CXDRAG:
|
case SM_CXDRAG:
|
||||||
case SM_CYDRAG:
|
case SM_CYDRAG:
|
||||||
return(2);
|
return(2);
|
||||||
|
@ -134,15 +160,15 @@ NtUserGetSystemMetrics(ULONG Index)
|
||||||
case SM_CYSCREEN:
|
case SM_CYSCREEN:
|
||||||
DesktopWindow = IntGetWindowObject(IntGetDesktopWindow());
|
DesktopWindow = IntGetWindowObject(IntGetDesktopWindow());
|
||||||
if (NULL != DesktopWindow)
|
if (NULL != DesktopWindow)
|
||||||
{
|
{
|
||||||
Width = DesktopWindow->WindowRect.right;
|
Width = DesktopWindow->WindowRect.right;
|
||||||
Height = DesktopWindow->WindowRect.bottom;
|
Height = DesktopWindow->WindowRect.bottom;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Width = 640;
|
Width = 640;
|
||||||
Height = 480;
|
Height = 480;
|
||||||
}
|
}
|
||||||
IntReleaseWindowObject(DesktopWindow);
|
IntReleaseWindowObject(DesktopWindow);
|
||||||
return SM_CXSCREEN == Index ? Width : Height;
|
return SM_CXSCREEN == Index ? Width : Height;
|
||||||
case SM_CXSIZE:
|
case SM_CXSIZE:
|
||||||
|
@ -180,7 +206,6 @@ NtUserGetSystemMetrics(ULONG Index)
|
||||||
case SM_SECURE:
|
case SM_SECURE:
|
||||||
case SM_SHOWSOUNDS:
|
case SM_SHOWSOUNDS:
|
||||||
case SM_SLOWMACHINE:
|
case SM_SLOWMACHINE:
|
||||||
case SM_SWAPBUTTON:
|
|
||||||
return(0);
|
return(0);
|
||||||
default:
|
default:
|
||||||
return(0xFFFFFFFF);
|
return(0xFFFFFFFF);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: misc.c,v 1.13 2003/08/28 14:22:05 weiden Exp $
|
/* $Id: misc.c,v 1.14 2003/08/28 18:04:59 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -23,25 +23,42 @@
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserCallNoParam(
|
NtUserCallNoParam(
|
||||||
DWORD Routine)
|
DWORD Routine)
|
||||||
{
|
{
|
||||||
/*
|
NTSTATUS Status;
|
||||||
|
DWORD Result = 0;
|
||||||
|
PWINSTATION_OBJECT WinStaObject;
|
||||||
|
|
||||||
switch(Routine)
|
switch(Routine)
|
||||||
{
|
{
|
||||||
case 1:
|
case NOPARAM_ROUTINE_GETDOUBLECLICKTIME:
|
||||||
return 0;
|
Status = ValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
|
||||||
|
KernelMode,
|
||||||
|
0,
|
||||||
|
&WinStaObject);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
return (DWORD)FALSE;
|
||||||
|
|
||||||
|
Result = WinStaObject->SystemCursor.DblClickSpeed;
|
||||||
|
|
||||||
|
ObDereferenceObject(WinStaObject);
|
||||||
|
return Result;
|
||||||
}
|
}
|
||||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallNoParam()\n", Routine);
|
DPRINT1("Calling invalid routine number 0x%x in NtUserCallNoParam()\n", Routine);
|
||||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||||
*/
|
|
||||||
UNIMPLEMENTED
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserCallOneParam(
|
NtUserCallOneParam(
|
||||||
|
@ -115,6 +132,9 @@ NtUserCallOneParam(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserCallTwoParam(
|
NtUserCallTwoParam(
|
||||||
|
@ -206,3 +226,55 @@ NtUserCallTwoParam(
|
||||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
DWORD
|
||||||
|
STDCALL
|
||||||
|
NtUserSystemParametersInfo(
|
||||||
|
UINT uiAction,
|
||||||
|
UINT uiParam,
|
||||||
|
PVOID pvParam,
|
||||||
|
UINT fWinIni)
|
||||||
|
{
|
||||||
|
NTSTATUS Status;
|
||||||
|
PWINSTATION_OBJECT WinStaObject;
|
||||||
|
|
||||||
|
switch(uiAction)
|
||||||
|
{
|
||||||
|
case SPI_SETDOUBLECLKWIDTH:
|
||||||
|
case SPI_SETDOUBLECLKHEIGHT:
|
||||||
|
case SPI_SETDOUBLECLICKTIME:
|
||||||
|
Status = ValidateWindowStationHandle(PROCESS_WINDOW_STATION(),
|
||||||
|
KernelMode,
|
||||||
|
0,
|
||||||
|
&WinStaObject);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
return (DWORD)FALSE;
|
||||||
|
|
||||||
|
switch(uiAction)
|
||||||
|
{
|
||||||
|
case SPI_SETDOUBLECLKWIDTH:
|
||||||
|
/* FIXME limit the maximum value? */
|
||||||
|
WinStaObject->SystemCursor.DblClickWidth = uiParam;
|
||||||
|
break;
|
||||||
|
case SPI_SETDOUBLECLKHEIGHT:
|
||||||
|
/* FIXME limit the maximum value? */
|
||||||
|
WinStaObject->SystemCursor.DblClickHeight = uiParam;
|
||||||
|
break;
|
||||||
|
case SPI_SETDOUBLECLICKTIME:
|
||||||
|
/* FIXME limit the maximum time to 1000 ms? */
|
||||||
|
WinStaObject->SystemCursor.DblClickSpeed = uiParam;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME save the value to the registry */
|
||||||
|
|
||||||
|
ObDereferenceObject(WinStaObject);
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: stubs.c,v 1.26 2003/08/25 23:24:02 rcampbell Exp $
|
/* $Id: stubs.c,v 1.27 2003/08/28 18:04:59 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -1079,19 +1079,6 @@ NtUserShowCaret(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
|
||||||
STDCALL
|
|
||||||
NtUserSystemParametersInfo(
|
|
||||||
DWORD Unknown0,
|
|
||||||
DWORD Unknown1,
|
|
||||||
DWORD Unknown2,
|
|
||||||
DWORD Unknown3)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserToUnicodeEx(
|
NtUserToUnicodeEx(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue