mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 15:36:04 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pgp->ShowPointer == 1)
|
if (pgp->ShowPointer < 0)
|
||||||
{
|
{
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,7 @@ typedef struct _GDIPOINTER /* should stay private to ENG */
|
||||||
HSURF ColorSurface;
|
HSURF ColorSurface;
|
||||||
HSURF MaskSurface;
|
HSURF MaskSurface;
|
||||||
HSURF SaveSurface;
|
HSURF SaveSurface;
|
||||||
BOOL ShowPointer;
|
int ShowPointer; /* counter negtive do not show the mouse postive show the mouse */
|
||||||
|
|
||||||
/* public pointer information */
|
/* public pointer information */
|
||||||
RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
|
RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
|
||||||
|
|
|
@ -191,17 +191,18 @@ NtUserCallOneParam(
|
||||||
BITMAPOBJ *BitmapObj;
|
BITMAPOBJ *BitmapObj;
|
||||||
GDIDEVICE *ppdev;
|
GDIDEVICE *ppdev;
|
||||||
GDIPOINTER *pgp;
|
GDIPOINTER *pgp;
|
||||||
|
int showpointer=0;
|
||||||
|
|
||||||
if(!(Screen = IntGetScreenDC()))
|
if(!(Screen = IntGetScreenDC()))
|
||||||
{
|
{
|
||||||
return 1; /* No mouse */
|
return showpointer; /* No mouse */
|
||||||
}
|
}
|
||||||
|
|
||||||
PDC dc = DC_LockDc(Screen);
|
PDC dc = DC_LockDc(Screen);
|
||||||
|
|
||||||
if (!dc)
|
if (!dc)
|
||||||
{
|
{
|
||||||
return 1; /* No mouse */
|
return showpointer; /* No mouse */
|
||||||
}
|
}
|
||||||
|
|
||||||
dcbmp = dc->w.hBitmap;
|
dcbmp = dc->w.hBitmap;
|
||||||
|
@ -211,14 +212,14 @@ NtUserCallOneParam(
|
||||||
if ( !BitmapObj )
|
if ( !BitmapObj )
|
||||||
{
|
{
|
||||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||||
return 1; /* No Mouse */
|
return showpointer; /* No Mouse */
|
||||||
}
|
}
|
||||||
|
|
||||||
SurfObj = &BitmapObj->SurfObj;
|
SurfObj = &BitmapObj->SurfObj;
|
||||||
if (SurfObj == NULL)
|
if (SurfObj == NULL)
|
||||||
{
|
{
|
||||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||||
return 1; /* No mouse */
|
return showpointer; /* No mouse */
|
||||||
}
|
}
|
||||||
|
|
||||||
ppdev = GDIDEV(SurfObj);
|
ppdev = GDIDEV(SurfObj);
|
||||||
|
@ -226,7 +227,7 @@ NtUserCallOneParam(
|
||||||
if(ppdev == NULL)
|
if(ppdev == NULL)
|
||||||
{
|
{
|
||||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||||
return 1; /* No mouse */
|
return showpointer; /* No mouse */
|
||||||
}
|
}
|
||||||
|
|
||||||
pgp = &ppdev->Pointer;
|
pgp = &ppdev->Pointer;
|
||||||
|
@ -235,9 +236,11 @@ NtUserCallOneParam(
|
||||||
|
|
||||||
if (Param == FALSE)
|
if (Param == FALSE)
|
||||||
{
|
{
|
||||||
if (CurInfo->ShowingCursor != 0)
|
pgp->ShowPointer--;
|
||||||
{
|
showpointer = pgp->ShowPointer;
|
||||||
pgp->ShowPointer = 1;
|
|
||||||
|
if (showpointer >= 0)
|
||||||
|
{
|
||||||
//ppdev->SafetyRemoveCount = 1;
|
//ppdev->SafetyRemoveCount = 1;
|
||||||
//ppdev->SafetyRemoveLevel = 1;
|
//ppdev->SafetyRemoveLevel = 1;
|
||||||
EngMovePointer(SurfObj,-1,-1,NULL);
|
EngMovePointer(SurfObj,-1,-1,NULL);
|
||||||
|
@ -247,16 +250,21 @@ NtUserCallOneParam(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
pgp->ShowPointer++;
|
||||||
|
showpointer = pgp->ShowPointer;
|
||||||
|
|
||||||
/* Show Cursor */
|
/* Show Cursor */
|
||||||
pgp->ShowPointer = 0;
|
if (showpointer < 0)
|
||||||
//ppdev->SafetyRemoveCount = 0;
|
{
|
||||||
//ppdev->SafetyRemoveLevel = 0;
|
//ppdev->SafetyRemoveCount = 0;
|
||||||
EngMovePointer(SurfObj,-1,-1,NULL);
|
//ppdev->SafetyRemoveLevel = 0;
|
||||||
CurInfo->ShowingCursor = CURSOR_SHOWING;
|
EngMovePointer(SurfObj,-1,-1,NULL);
|
||||||
|
CurInfo->ShowingCursor = CURSOR_SHOWING;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||||
return 0;
|
return showpointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -365,6 +365,35 @@ NtUserGetMouseMovePointsEx(
|
||||||
int nBufPoints,
|
int nBufPoints,
|
||||||
DWORD resolution)
|
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
|
UNIMPLEMENTED
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue