mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
More work on software mouse pointer implementation.
svn path=/trunk/; revision=7876
This commit is contained in:
parent
4fc67741b8
commit
6e361ec59f
2 changed files with 53 additions and 7 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: mouse.c,v 1.57 2004/01/24 19:47:05 navaraf Exp $
|
||||
/* $Id: mouse.c,v 1.58 2004/01/25 16:47:09 navaraf Exp $
|
||||
*
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: Mouse
|
||||
|
@ -40,6 +40,9 @@
|
|||
#include "include/window.h"
|
||||
#include "include/cursoricon.h"
|
||||
#include "include/callback.h"
|
||||
#include "include/palette.h"
|
||||
#include "include/inteng.h"
|
||||
#include "include/eng.h"
|
||||
#include <include/mouse.h>
|
||||
|
||||
#define NDEBUG
|
||||
|
@ -706,6 +709,12 @@ EngSetPointerShape(
|
|||
ppdev->PointerSaveSurface = NULL;
|
||||
}
|
||||
|
||||
if (ppdev->PointerXlateObject != NULL)
|
||||
{
|
||||
EngDeleteXlate(ppdev->PointerXlateObject);
|
||||
ppdev->PointerXlateObject = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* See if we are being asked to hide the pointer.
|
||||
*/
|
||||
|
@ -723,8 +732,6 @@ EngSetPointerShape(
|
|||
ppdev->PointerAttributes.Width = psoMask->lDelta << 3;
|
||||
ppdev->PointerAttributes.Height = (psoMask->cjBits / psoMask->lDelta) >> 1;
|
||||
|
||||
ppdev->PointerXlateObject = pxlo;
|
||||
|
||||
if (psoColor != NULL)
|
||||
{
|
||||
SIZEL Size;
|
||||
|
@ -756,6 +763,35 @@ EngSetPointerShape(
|
|||
psoMask->lDelta, psoMask->iBitmapFormat, 0, Bits);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create and XLATEOBJ that will be used for drawing masks.
|
||||
* FIXME: We should get this in pxlo parameter!
|
||||
*/
|
||||
|
||||
/*
|
||||
ppdev->PointerXlateObject = pxlo;
|
||||
*/
|
||||
|
||||
{
|
||||
HPALETTE BWPalette, DestPalette;
|
||||
ULONG BWColors[] = {0, 0xFFFFFF};
|
||||
PDC Dc;
|
||||
PPALGDI PalObj;
|
||||
LONG DestMode;
|
||||
|
||||
BWPalette = EngCreatePalette(PAL_INDEXED, sizeof(BWColors) / sizeof(ULONG),
|
||||
BWColors, 0, 0, 0);
|
||||
Dc = DC_LockDc(IntGetScreenDC());
|
||||
DestPalette = Dc->w.hPalette;
|
||||
PalObj = PALETTE_LockPalette(DestPalette);
|
||||
DestMode = PalObj->Mode;
|
||||
PALETTE_UnlockPalette(DestPalette);
|
||||
DC_UnlockDc(IntGetScreenDC());
|
||||
ppdev->PointerXlateObject = IntEngCreateXlate(DestMode, PAL_INDEXED,
|
||||
DestPalette, BWPalette);
|
||||
EngDeletePalette(BWPalette);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create surface for saving the pixels under the cursor.
|
||||
*/
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: dc.c,v 1.118 2004/01/16 23:29:10 gvg Exp $
|
||||
/* $Id: dc.c,v 1.119 2004/01/25 16:47:10 navaraf Exp $
|
||||
*
|
||||
* DC.C - Device context functions
|
||||
*
|
||||
|
@ -474,6 +474,8 @@ IntCreatePrimarySurface()
|
|||
BOOL GotDriver;
|
||||
BOOL DoDefault;
|
||||
|
||||
RtlZeroMemory(&PrimarySurface, sizeof(PrimarySurface));
|
||||
|
||||
ExInitializeFastMutex(&PrimarySurface.DriverLock);
|
||||
|
||||
/* Open the miniport driver */
|
||||
|
@ -544,9 +546,6 @@ IntCreatePrimarySurface()
|
|||
|
||||
DPRINT("Building DDI Functions\n");
|
||||
|
||||
/* Make sure the non existant functions are NULL */
|
||||
RtlZeroMemory(&PrimarySurface.DriverFunctions, sizeof(PrimarySurface.DriverFunctions));
|
||||
|
||||
/* Construct DDI driver function dispatch table */
|
||||
if (! DRIVER_BuildDDIFunctions(&DED, &PrimarySurface.DriverFunctions))
|
||||
{
|
||||
|
@ -652,8 +651,19 @@ IntCreatePrimarySurface()
|
|||
VOID FASTCALL
|
||||
IntDestroyPrimarySurface()
|
||||
{
|
||||
#if 0
|
||||
PSURFOBJ SurfObj;
|
||||
PSURFGDI SurfGDI;
|
||||
#endif
|
||||
|
||||
DRIVER_UnreferenceDriver(L"DISPLAY");
|
||||
|
||||
#if 0
|
||||
DPRINT("Hiding mouse pointer\n" );
|
||||
SurfObj = (PSURFOBJ)AccessUserObject((ULONG) PrimarySurface.Handle);
|
||||
SurfGDI = (PSURFGDI)AccessInternalObject((ULONG) PrimarySurface.Handle);
|
||||
SurfGDI->SetPointerShape(SurfObj, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0);
|
||||
#endif
|
||||
DPRINT("Reseting display\n" );
|
||||
PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.PDev, FALSE);
|
||||
PrimarySurface.DriverFunctions.DisableSurface(PrimarySurface.PDev);
|
||||
|
|
Loading…
Reference in a new issue