2004-01-13 17:18:33 +00:00
|
|
|
/*
|
|
|
|
* ReactOS Generic Framebuffer display driver
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004 Filip Navara
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
2009-10-27 10:34:16 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2004-01-13 17:18:33 +00:00
|
|
|
*/
|
|
|
|
|
2014-02-09 12:38:16 +00:00
|
|
|
#ifndef _FRAMEBUF_PCH_
|
|
|
|
#define _FRAMEBUF_PCH_
|
|
|
|
|
2005-11-29 01:35:32 +00:00
|
|
|
#include <stdarg.h>
|
2004-01-13 17:18:33 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <wingdi.h>
|
2005-12-01 21:37:19 +00:00
|
|
|
#include <winddi.h>
|
2005-11-29 01:35:32 +00:00
|
|
|
#include <winioctl.h>
|
2005-12-01 21:37:19 +00:00
|
|
|
#include <ntddvdeo.h>
|
2004-01-13 17:18:33 +00:00
|
|
|
|
2004-01-24 19:47:05 +00:00
|
|
|
//#define EXPERIMENTAL_MOUSE_CURSOR_SUPPORT
|
2004-01-24 17:42:56 +00:00
|
|
|
|
2004-01-13 17:18:33 +00:00
|
|
|
typedef struct _PDEV
|
|
|
|
{
|
|
|
|
HANDLE hDriver;
|
|
|
|
HDEV hDevEng;
|
|
|
|
HSURF hSurfEng;
|
|
|
|
ULONG ModeIndex;
|
|
|
|
ULONG ScreenWidth;
|
|
|
|
ULONG ScreenHeight;
|
|
|
|
ULONG ScreenDelta;
|
|
|
|
BYTE BitsPerPixel;
|
|
|
|
ULONG RedMask;
|
|
|
|
ULONG GreenMask;
|
|
|
|
ULONG BlueMask;
|
|
|
|
BYTE PaletteShift;
|
|
|
|
PVOID ScreenPtr;
|
|
|
|
HPALETTE DefaultPalette;
|
|
|
|
PALETTEENTRY *PaletteEntries;
|
2007-10-19 23:21:45 +00:00
|
|
|
|
2004-01-24 17:42:56 +00:00
|
|
|
#ifdef EXPERIMENTAL_MOUSE_CURSOR_SUPPORT
|
|
|
|
VIDEO_POINTER_ATTRIBUTES PointerAttributes;
|
2004-01-24 19:47:05 +00:00
|
|
|
XLATEOBJ *PointerXlateObject;
|
2004-01-24 17:42:56 +00:00
|
|
|
HSURF PointerColorSurface;
|
|
|
|
HSURF PointerMaskSurface;
|
|
|
|
HSURF PointerSaveSurface;
|
2004-01-24 19:47:05 +00:00
|
|
|
POINTL PointerHotSpot;
|
2004-01-24 17:42:56 +00:00
|
|
|
#endif
|
2006-07-16 11:46:30 +00:00
|
|
|
|
2007-10-19 23:21:45 +00:00
|
|
|
/* DirectX Support */
|
2006-07-17 22:14:58 +00:00
|
|
|
DWORD iDitherFormat;
|
|
|
|
ULONG MemHeight;
|
2006-07-18 15:57:42 +00:00
|
|
|
ULONG MemWidth;
|
|
|
|
DWORD dwHeap;
|
2007-10-19 23:21:45 +00:00
|
|
|
VIDEOMEMORY* pvmList;
|
|
|
|
BOOL bDDInitialized;
|
|
|
|
DDPIXELFORMAT ddpfDisplay;
|
2004-01-13 17:18:33 +00:00
|
|
|
} PDEV, *PPDEV;
|
|
|
|
|
|
|
|
#define DEVICE_NAME L"framebuf"
|
2009-08-24 17:12:25 +00:00
|
|
|
#define ALLOC_TAG 'FUBF'
|
2004-01-13 17:18:33 +00:00
|
|
|
|
2006-07-16 11:46:30 +00:00
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
DHPDEV APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
DrvEnablePDEV(
|
|
|
|
IN DEVMODEW *pdm,
|
|
|
|
IN LPWSTR pwszLogAddress,
|
|
|
|
IN ULONG cPat,
|
|
|
|
OUT HSURF *phsurfPatterns,
|
|
|
|
IN ULONG cjCaps,
|
|
|
|
OUT ULONG *pdevcaps,
|
|
|
|
IN ULONG cjDevInfo,
|
|
|
|
OUT DEVINFO *pdi,
|
|
|
|
IN HDEV hdev,
|
|
|
|
IN LPWSTR pwszDeviceName,
|
|
|
|
IN HANDLE hDriver);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
VOID APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
DrvCompletePDEV(
|
|
|
|
IN DHPDEV dhpdev,
|
|
|
|
IN HDEV hdev);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
VOID APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
DrvDisablePDEV(
|
|
|
|
IN DHPDEV dhpdev);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
HSURF APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
DrvEnableSurface(
|
|
|
|
IN DHPDEV dhpdev);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
VOID APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
DrvDisableSurface(
|
|
|
|
IN DHPDEV dhpdev);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
BOOL APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
DrvAssertMode(
|
|
|
|
IN DHPDEV dhpdev,
|
|
|
|
IN BOOL bEnable);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
ULONG APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
DrvGetModes(
|
|
|
|
IN HANDLE hDriver,
|
|
|
|
IN ULONG cjSize,
|
|
|
|
OUT DEVMODEW *pdm);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
BOOL APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
DrvSetPalette(
|
|
|
|
IN DHPDEV dhpdev,
|
|
|
|
IN PALOBJ *ppalo,
|
|
|
|
IN FLONG fl,
|
|
|
|
IN ULONG iStart,
|
|
|
|
IN ULONG cColors);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
ULONG APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
DrvSetPointerShape(
|
|
|
|
IN SURFOBJ *pso,
|
|
|
|
IN SURFOBJ *psoMask,
|
|
|
|
IN SURFOBJ *psoColor,
|
|
|
|
IN XLATEOBJ *pxlo,
|
|
|
|
IN LONG xHot,
|
|
|
|
IN LONG yHot,
|
|
|
|
IN LONG x,
|
|
|
|
IN LONG y,
|
|
|
|
IN RECTL *prcl,
|
|
|
|
IN FLONG fl);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
VOID APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
DrvMovePointer(
|
|
|
|
IN SURFOBJ *pso,
|
|
|
|
IN LONG x,
|
|
|
|
IN LONG y,
|
|
|
|
IN RECTL *prcl);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
BOOL
|
2004-01-13 17:18:33 +00:00
|
|
|
IntInitScreenInfo(
|
|
|
|
PPDEV ppdev,
|
|
|
|
LPDEVMODEW pDevMode,
|
|
|
|
PGDIINFO pGdiInfo,
|
|
|
|
PDEVINFO pDevInfo);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
BOOL
|
2004-01-13 17:18:33 +00:00
|
|
|
IntInitDefaultPalette(
|
|
|
|
PPDEV ppdev,
|
|
|
|
PDEVINFO pDevInfo);
|
|
|
|
|
2007-10-21 07:14:55 +00:00
|
|
|
BOOL APIENTRY
|
2004-01-13 17:18:33 +00:00
|
|
|
IntSetPalette(
|
|
|
|
IN DHPDEV dhpdev,
|
|
|
|
IN PPALETTEENTRY ppalent,
|
|
|
|
IN ULONG iStart,
|
|
|
|
IN ULONG cColors);
|
2014-02-09 12:38:16 +00:00
|
|
|
|
|
|
|
#endif /* _FRAMEBUF_PCH_ */
|