mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:52:57 +00:00
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:
parent
80b9ed9c09
commit
48dbc73039
12 changed files with 58 additions and 20 deletions
|
@ -4,6 +4,9 @@
|
||||||
<directory name="framebuf">
|
<directory name="framebuf">
|
||||||
<xi:include href="framebuf/framebuf.rbuild" />
|
<xi:include href="framebuf/framebuf.rbuild" />
|
||||||
</directory>
|
</directory>
|
||||||
|
<directory name="framebufacc">
|
||||||
|
<xi:include href="framebufacc/framebuf_acc.rbuild" />
|
||||||
|
</directory>
|
||||||
<directory name="vga">
|
<directory name="vga">
|
||||||
<xi:include href="vga/vgaddi.rbuild" />
|
<xi:include href="vga/vgaddi.rbuild" />
|
||||||
</directory>
|
</directory>
|
||||||
|
|
|
@ -52,6 +52,9 @@ typedef struct _PDEV
|
||||||
BYTE PaletteShift;
|
BYTE PaletteShift;
|
||||||
PVOID ScreenPtr;
|
PVOID ScreenPtr;
|
||||||
|
|
||||||
|
/* Vitual desktop stuff */
|
||||||
|
POINTL ScreenOffsetXY;
|
||||||
|
|
||||||
/* Palette data */
|
/* Palette data */
|
||||||
HPALETTE DefaultPalette;
|
HPALETTE DefaultPalette;
|
||||||
PALETTEENTRY *PaletteEntries;
|
PALETTEENTRY *PaletteEntries;
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* ReactOS Generic Framebuffer display driver
|
* 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
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -21,6 +21,53 @@
|
||||||
#include "framebuf_acc.h"
|
#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
|
* DrvSetPointerShape
|
||||||
|
@ -48,24 +95,6 @@ DrvSetPointerShape(
|
||||||
return EngSetPointerShape(pso, psoMask, psoColor, pxlo, xHot, yHot, x, y, prcl, fl);
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -155,6 +155,9 @@ DrvEnableSurface(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Rest the desktop vitual position */
|
||||||
|
ppdev->ScreenOffsetXY = {0,0};
|
||||||
|
|
||||||
|
|
||||||
switch (ppdev->BitsPerPixel)
|
switch (ppdev->BitsPerPixel)
|
||||||
{
|
{
|
Loading…
Add table
Add a link
Reference in a new issue