1 /* 2 * ReactOS Generic Framebuffer display driver 3 * 4 * Copyright (C) 2004 Filip Navara 5 * 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. 10 * 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. 15 * 16 * You should have received a copy of the GNU General Public License along 17 * with this program; if not, write to the Free Software Foundation, Inc., 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 */ 20 21 #ifndef _FRAMEBUF_PCH_ 22 #define _FRAMEBUF_PCH_ 23 24 #include <stdarg.h> 25 #include <windef.h> 26 #include <wingdi.h> 27 #include <winddi.h> 28 #include <winioctl.h> 29 #include <ntddvdeo.h> 30 31 //#define EXPERIMENTAL_MOUSE_CURSOR_SUPPORT 32 33 typedef struct _PDEV 34 { 35 HANDLE hDriver; 36 HDEV hDevEng; 37 HSURF hSurfEng; 38 ULONG ModeIndex; 39 ULONG ScreenWidth; 40 ULONG ScreenHeight; 41 ULONG ScreenDelta; 42 BYTE BitsPerPixel; 43 ULONG RedMask; 44 ULONG GreenMask; 45 ULONG BlueMask; 46 BYTE PaletteShift; 47 PVOID ScreenPtr; 48 HPALETTE DefaultPalette; 49 PALETTEENTRY *PaletteEntries; 50 51 #ifdef EXPERIMENTAL_MOUSE_CURSOR_SUPPORT 52 VIDEO_POINTER_ATTRIBUTES PointerAttributes; 53 XLATEOBJ *PointerXlateObject; 54 HSURF PointerColorSurface; 55 HSURF PointerMaskSurface; 56 HSURF PointerSaveSurface; 57 POINTL PointerHotSpot; 58 #endif 59 60 /* DirectX Support */ 61 DWORD iDitherFormat; 62 ULONG MemHeight; 63 ULONG MemWidth; 64 DWORD dwHeap; 65 VIDEOMEMORY* pvmList; 66 BOOL bDDInitialized; 67 DDPIXELFORMAT ddpfDisplay; 68 } PDEV, *PPDEV; 69 70 #define DEVICE_NAME L"framebuf" 71 #define ALLOC_TAG 'FUBF' 72 73 74 DHPDEV APIENTRY 75 DrvEnablePDEV( 76 IN DEVMODEW *pdm, 77 IN LPWSTR pwszLogAddress, 78 IN ULONG cPat, 79 OUT HSURF *phsurfPatterns, 80 IN ULONG cjCaps, 81 OUT ULONG *pdevcaps, 82 IN ULONG cjDevInfo, 83 OUT DEVINFO *pdi, 84 IN HDEV hdev, 85 IN LPWSTR pwszDeviceName, 86 IN HANDLE hDriver); 87 88 VOID APIENTRY 89 DrvCompletePDEV( 90 IN DHPDEV dhpdev, 91 IN HDEV hdev); 92 93 VOID APIENTRY 94 DrvDisablePDEV( 95 IN DHPDEV dhpdev); 96 97 HSURF APIENTRY 98 DrvEnableSurface( 99 IN DHPDEV dhpdev); 100 101 VOID APIENTRY 102 DrvDisableSurface( 103 IN DHPDEV dhpdev); 104 105 BOOL APIENTRY 106 DrvAssertMode( 107 IN DHPDEV dhpdev, 108 IN BOOL bEnable); 109 110 ULONG APIENTRY 111 DrvGetModes( 112 IN HANDLE hDriver, 113 IN ULONG cjSize, 114 OUT DEVMODEW *pdm); 115 116 BOOL APIENTRY 117 DrvSetPalette( 118 IN DHPDEV dhpdev, 119 IN PALOBJ *ppalo, 120 IN FLONG fl, 121 IN ULONG iStart, 122 IN ULONG cColors); 123 124 ULONG APIENTRY 125 DrvSetPointerShape( 126 IN SURFOBJ *pso, 127 IN SURFOBJ *psoMask, 128 IN SURFOBJ *psoColor, 129 IN XLATEOBJ *pxlo, 130 IN LONG xHot, 131 IN LONG yHot, 132 IN LONG x, 133 IN LONG y, 134 IN RECTL *prcl, 135 IN FLONG fl); 136 137 VOID APIENTRY 138 DrvMovePointer( 139 IN SURFOBJ *pso, 140 IN LONG x, 141 IN LONG y, 142 IN RECTL *prcl); 143 144 BOOL 145 IntInitScreenInfo( 146 PPDEV ppdev, 147 LPDEVMODEW pDevMode, 148 PGDIINFO pGdiInfo, 149 PDEVINFO pDevInfo); 150 151 BOOL 152 IntInitDefaultPalette( 153 PPDEV ppdev, 154 PDEVINFO pDevInfo); 155 156 BOOL APIENTRY 157 IntSetPalette( 158 IN DHPDEV dhpdev, 159 IN PPALETTEENTRY ppalent, 160 IN ULONG iStart, 161 IN ULONG cColors); 162 163 #endif /* _FRAMEBUF_PCH_ */ 164