2 * ReactOS Generic Framebuffer display driver
4 * Copyright (C) 2007 Magnus Olsen
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #include "framebuf_acc.h"
27 * Moves the pointer to a new position and ensures that GDI does not interfere
28 * with the display of the pointer.
35 DrvMovePointer(IN SURFOBJ
*pso
,
40 PPDEV ppdev
= (PPDEV
) pso
->dhpdev
;
41 DWORD returnedDataLength
;
42 VIDEO_POINTER_POSITION NewPointerPosition
;
44 x
-= ppdev
->ScreenOffsetXY
.x
;
45 y
-= ppdev
->ScreenOffsetXY
.y
;
47 /* position of (-1,-1) hide the pointer */
48 if ((x
== -1) || (y
== -1))
50 if (EngDeviceIoControl(ppdev
->hDriver
, IOCTL_VIDEO_DISABLE_POINTER
, NULL
, 0, NULL
, 0, &returnedDataLength
))
52 /* hw did not disable the mouse, we try then with software */
53 EngMovePointer(pso
, x
, y
, prcl
);
58 /* Calc the mouse positions and set it to the new positions */
59 NewPointerPosition
.Column
= (SHORT
) x
- (SHORT
) (ppdev
->PointerHotSpot
.x
);
60 NewPointerPosition
.Row
= (SHORT
) y
- (SHORT
) (ppdev
->PointerHotSpot
.y
);
62 if (EngDeviceIoControl(ppdev
->hDriver
, IOCTL_VIDEO_SET_POINTER_POSITION
, &NewPointerPosition
,
63 sizeof(VIDEO_POINTER_POSITION
), NULL
, 0, &returnedDataLength
))
65 /* hw did not disable the mouse, we try then with software */
66 EngMovePointer(pso
, x
, y
, prcl
);
75 * Sets the new pointer shape.
94 /* return SPS_DECLINE;*/
95 return EngSetPointerShape(pso
, psoMask
, psoColor
, pxlo
, xHot
, yHot
, x
, y
, prcl
, fl
);