Author: greatlrd
Date: Thu Nov 1 23:32:39 2007
New Revision: 30049
URL:
http://svn.reactos.org/svn/reactos?rev=30049&view=rev
Log:
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
Added:
trunk/reactos/drivers/video/displays/framebufacc/
- copied from r30044, trunk/reactos/drivers/video/displays/framebuf_acc/
Removed:
trunk/reactos/drivers/video/displays/framebuf_acc/
Modified:
trunk/reactos/drivers/video/displays/directory.rbuild
trunk/reactos/drivers/video/displays/framebufacc/framebuf_acc.h
trunk/reactos/drivers/video/displays/framebufacc/pointer.c
trunk/reactos/drivers/video/displays/framebufacc/surface.c
Modified: trunk/reactos/drivers/video/displays/directory.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/dir…
==============================================================================
--- trunk/reactos/drivers/video/displays/directory.rbuild (original)
+++ trunk/reactos/drivers/video/displays/directory.rbuild Thu Nov 1 23:32:39 2007
@@ -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>
Modified: trunk/reactos/drivers/video/displays/framebufacc/framebuf_acc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/fra…
==============================================================================
--- trunk/reactos/drivers/video/displays/framebufacc/framebuf_acc.h (original)
+++ trunk/reactos/drivers/video/displays/framebufacc/framebuf_acc.h Thu Nov 1 23:32:39
2007
@@ -51,6 +51,9 @@
ULONG BlueMask;
BYTE PaletteShift;
PVOID ScreenPtr;
+
+ /* Vitual desktop stuff */
+ POINTL ScreenOffsetXY;
/* Palette data */
HPALETTE DefaultPalette;
Modified: trunk/reactos/drivers/video/displays/framebufacc/pointer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/fra…
==============================================================================
--- trunk/reactos/drivers/video/displays/framebufacc/pointer.c (original)
+++ trunk/reactos/drivers/video/displays/framebufacc/pointer.c Thu Nov 1 23:32:39 2007
@@ -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
@@ -20,6 +20,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);
+ }
+ }
+}
/*
@@ -48,24 +95,6 @@
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);
-}
+
Modified: trunk/reactos/drivers/video/displays/framebufacc/surface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/fra…
==============================================================================
--- trunk/reactos/drivers/video/displays/framebufacc/surface.c (original)
+++ trunk/reactos/drivers/video/displays/framebufacc/surface.c Thu Nov 1 23:32:39 2007
@@ -154,6 +154,9 @@
{
return FALSE;
}
+
+ /* Rest the desktop vitual position */
+ ppdev->ScreenOffsetXY = {0,0};
switch (ppdev->BitsPerPixel)