rename framebuf_acc to framebufacc to make rbuild happy

implement hw support for DrvMovePointer, it mean if a driver have this function implement our framebufacc will use it 

svn path=/trunk/; revision=30049
This commit is contained in:
Magnus Olsen 2007-11-01 20:32:39 +00:00
parent 80b9ed9c09
commit 48dbc73039
12 changed files with 58 additions and 20 deletions

View file

@ -4,6 +4,9 @@
<directory name="framebuf">
<xi:include href="framebuf/framebuf.rbuild" />
</directory>
<directory name="framebufacc">
<xi:include href="framebufacc/framebuf_acc.rbuild" />
</directory>
<directory name="vga">
<xi:include href="vga/vgaddi.rbuild" />
</directory>

View file

@ -52,6 +52,9 @@ typedef struct _PDEV
BYTE PaletteShift;
PVOID ScreenPtr;
/* Vitual desktop stuff */
POINTL ScreenOffsetXY;
/* Palette data */
HPALETTE DefaultPalette;
PALETTEENTRY *PaletteEntries;

View file

@ -1,7 +1,7 @@
/*
* ReactOS Generic Framebuffer display driver
*
* Copyright (C) 2004 Filip Navara
* Copyright (C) 2007 Magnus Olsen
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -21,6 +21,53 @@
#include "framebuf_acc.h"
/*
* DrvMovePointer
*
* Moves the pointer to a new position and ensures that GDI does not interfere
* with the display of the pointer.
*
* Status
* @implemented
*/
VOID APIENTRY
DrvMovePointer(IN SURFOBJ *pso,
IN LONG x,
IN LONG y,
IN RECTL *prcl)
{
PPDEV ppdev = (PPDEV) pso->dhpdev;
DWORD returnedDataLength;
VIDEO_POINTER_POSITION NewPointerPosition;
x -= ppdev->ScreenOffsetXY.x;
y -= ppdev->ScreenOffsetXY.y;
/* position of (-1,-1) hide the pointer */
if ((x == -1) || (y == -1))
{
if (EngDeviceIoControl(ppdev->hDriver, IOCTL_VIDEO_DISABLE_POINTER, NULL, 0, NULL, 0, &returnedDataLength))
{
/* hw did not disable the mouse, we try then with software */
EngMovePointer(pso, x, y, prcl);
}
}
else
{
/* Calc the mouse positions and set it to the new positions */
NewPointerPosition.Column = (SHORT) x - (SHORT) (ppdev->PointerHotSpot.x);
NewPointerPosition.Row = (SHORT) y - (SHORT) (ppdev->PointerHotSpot.y);
if (EngDeviceIoControl(ppdev->hDriver, IOCTL_VIDEO_SET_POINTER_POSITION, &NewPointerPosition,
sizeof(VIDEO_POINTER_POSITION), NULL, 0, &returnedDataLength))
{
/* hw did not disable the mouse, we try then with software */
EngMovePointer(pso, x, y, prcl);
}
}
}
/*
* DrvSetPointerShape
@ -48,24 +95,6 @@ DrvSetPointerShape(
return EngSetPointerShape(pso, psoMask, psoColor, pxlo, xHot, yHot, x, y, prcl, fl);
}
/*
* DrvMovePointer
*
* Moves the pointer to a new position and ensures that GDI does not interfere
* with the display of the pointer.
*
* Status
* @unimplemented
*/
VOID APIENTRY
DrvMovePointer(
IN SURFOBJ *pso,
IN LONG x,
IN LONG y,
IN RECTL *prcl)
{
return EngMovePointer(pso, x, y, prcl);
}

View file

@ -155,6 +155,9 @@ DrvEnableSurface(
return FALSE;
}
/* Rest the desktop vitual position */
ppdev->ScreenOffsetXY = {0,0};
switch (ppdev->BitsPerPixel)
{