mirror of
https://github.com/reactos/reactos.git
synced 2025-05-30 14:39:46 +00:00
ShowCursor, gott a internal count to show the mouse or not, and return that value. as msdn descripe.
svn path=/trunk/; revision=20498
This commit is contained in:
parent
25e7c9121c
commit
d600323cad
4 changed files with 53 additions and 16 deletions
|
@ -211,7 +211,7 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface)
|
|||
return;
|
||||
}
|
||||
|
||||
if (pgp->ShowPointer == 1)
|
||||
if (pgp->ShowPointer < 0)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ typedef struct _GDIPOINTER /* should stay private to ENG */
|
|||
HSURF ColorSurface;
|
||||
HSURF MaskSurface;
|
||||
HSURF SaveSurface;
|
||||
BOOL ShowPointer;
|
||||
int ShowPointer; /* counter negtive do not show the mouse postive show the mouse */
|
||||
|
||||
/* public pointer information */
|
||||
RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
|
||||
|
|
|
@ -191,17 +191,18 @@ NtUserCallOneParam(
|
|||
BITMAPOBJ *BitmapObj;
|
||||
GDIDEVICE *ppdev;
|
||||
GDIPOINTER *pgp;
|
||||
int showpointer=0;
|
||||
|
||||
if(!(Screen = IntGetScreenDC()))
|
||||
{
|
||||
return 1; /* No mouse */
|
||||
return showpointer; /* No mouse */
|
||||
}
|
||||
|
||||
PDC dc = DC_LockDc(Screen);
|
||||
|
||||
if (!dc)
|
||||
{
|
||||
return 1; /* No mouse */
|
||||
return showpointer; /* No mouse */
|
||||
}
|
||||
|
||||
dcbmp = dc->w.hBitmap;
|
||||
|
@ -211,14 +212,14 @@ NtUserCallOneParam(
|
|||
if ( !BitmapObj )
|
||||
{
|
||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||
return 1; /* No Mouse */
|
||||
return showpointer; /* No Mouse */
|
||||
}
|
||||
|
||||
SurfObj = &BitmapObj->SurfObj;
|
||||
if (SurfObj == NULL)
|
||||
{
|
||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||
return 1; /* No mouse */
|
||||
return showpointer; /* No mouse */
|
||||
}
|
||||
|
||||
ppdev = GDIDEV(SurfObj);
|
||||
|
@ -226,7 +227,7 @@ NtUserCallOneParam(
|
|||
if(ppdev == NULL)
|
||||
{
|
||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||
return 1; /* No mouse */
|
||||
return showpointer; /* No mouse */
|
||||
}
|
||||
|
||||
pgp = &ppdev->Pointer;
|
||||
|
@ -235,9 +236,11 @@ NtUserCallOneParam(
|
|||
|
||||
if (Param == FALSE)
|
||||
{
|
||||
if (CurInfo->ShowingCursor != 0)
|
||||
{
|
||||
pgp->ShowPointer = 1;
|
||||
pgp->ShowPointer--;
|
||||
showpointer = pgp->ShowPointer;
|
||||
|
||||
if (showpointer >= 0)
|
||||
{
|
||||
//ppdev->SafetyRemoveCount = 1;
|
||||
//ppdev->SafetyRemoveLevel = 1;
|
||||
EngMovePointer(SurfObj,-1,-1,NULL);
|
||||
|
@ -247,16 +250,21 @@ NtUserCallOneParam(
|
|||
}
|
||||
else
|
||||
{
|
||||
pgp->ShowPointer++;
|
||||
showpointer = pgp->ShowPointer;
|
||||
|
||||
/* Show Cursor */
|
||||
pgp->ShowPointer = 0;
|
||||
//ppdev->SafetyRemoveCount = 0;
|
||||
//ppdev->SafetyRemoveLevel = 0;
|
||||
EngMovePointer(SurfObj,-1,-1,NULL);
|
||||
CurInfo->ShowingCursor = CURSOR_SHOWING;
|
||||
if (showpointer < 0)
|
||||
{
|
||||
//ppdev->SafetyRemoveCount = 0;
|
||||
//ppdev->SafetyRemoveLevel = 0;
|
||||
EngMovePointer(SurfObj,-1,-1,NULL);
|
||||
CurInfo->ShowingCursor = CURSOR_SHOWING;
|
||||
}
|
||||
}
|
||||
|
||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||
return 0;
|
||||
return showpointer;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -365,6 +365,35 @@ NtUserGetMouseMovePointsEx(
|
|||
int nBufPoints,
|
||||
DWORD resolution)
|
||||
{
|
||||
/*
|
||||
if (cbSize != sizeof (MOUSEMOVEPOINT)
|
||||
{
|
||||
SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND);
|
||||
return GMMP_ERR_POINT_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (!lppt)
|
||||
{
|
||||
SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND);
|
||||
return GMMP_ERR_POINT_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (!lpptBuf)
|
||||
{
|
||||
SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND);
|
||||
return GMMP_ERR_POINT_NOT_FOUND;
|
||||
}
|
||||
|
||||
switch(resolution)
|
||||
{
|
||||
case GMMP_USE_DISPLAY_POINTS:
|
||||
case GMMP_USE_HIGH_RESOLUTION_POINTS:
|
||||
break;
|
||||
default:
|
||||
SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND);
|
||||
return GMMP_ERR_POINT_NOT_FOUND;
|
||||
}
|
||||
*/
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue