- Check that all pins have been closed when the last filter reference is gone
[reactos.git] / reactos / drivers / video / displays / framebufacc / framebufacc.h
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
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.
19 */
20
21 #ifndef FRAMEBUF_H
22 #define FRAMEBUF_H
23
24 #include <stdarg.h>
25 #include <windef.h>
26 #include <guiddef.h>
27 #include <wingdi.h>
28 #include <winddi.h>
29 #include <winioctl.h>
30 #include <ntddvdeo.h>
31
32
33 //#define EXPERIMENTAL_ACC_SUPPORT
34
35 typedef struct _PDEV
36 {
37 /* Driver stuff */
38 HANDLE hDriver;
39 HDEV hDevEng;
40 HSURF hSurfEng;
41 ULONG dwHooks;
42
43 /* Screen Data */
44 ULONG ModeIndex;
45 ULONG ScreenWidth;
46 ULONG ScreenHeight;
47 ULONG ScreenDelta;
48 BYTE BitsPerPixel;
49 ULONG RedMask;
50 ULONG GreenMask;
51 ULONG BlueMask;
52 BYTE PaletteShift;
53 PVOID ScreenPtr;
54
55 /* Vitual desktop stuff */
56 POINTL ScreenOffsetXY;
57
58 /* Palette data */
59 HPALETTE DefaultPalette;
60 PALETTEENTRY *PaletteEntries;
61
62 /* hw mouse acclartions support */
63 VIDEO_POINTER_CAPABILITIES PointerCapabilities;
64 PVIDEO_POINTER_ATTRIBUTES pPointerAttributes;
65 ULONG PointerAttributesSize;
66 POINTL PointerHotSpot;
67 BOOL HwMouseActive;
68
69 #ifdef EXPERIMENTAL_MOUSE_CURSOR_SUPPORT
70 XLATEOBJ *PointerXlateObject;
71 HSURF PointerColorSurface;
72 HSURF PointerMaskSurface;
73 HSURF PointerSaveSurface;
74
75 #endif
76
77 /* DirectX Support */
78 DWORD iDitherFormat;
79 ULONG MemHeight;
80 ULONG MemWidth;
81 DWORD dwHeap;
82 VIDEOMEMORY* pvmList;
83 BOOL bDDInitialized;
84 DDPIXELFORMAT ddpfDisplay;
85
86 /* System Cached data */
87 PVOID pVideoMemCache;
88 PVOID pRealVideoMem;
89
90 /* Avail Video memory from Current Screen and the end range */
91 ULONG VideoMemSize;
92
93 } PDEV, *PPDEV;
94
95
96
97
98 #define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
99
100 #define DEVICE_NAME L"framebuf"
101 #define ALLOC_TAG TAG('F','B','U','F')
102
103
104 DHPDEV APIENTRY
105 DrvEnablePDEV(
106 IN DEVMODEW *pdm,
107 IN LPWSTR pwszLogAddress,
108 IN ULONG cPat,
109 OUT HSURF *phsurfPatterns,
110 IN ULONG cjCaps,
111 OUT ULONG *pdevcaps,
112 IN ULONG cjDevInfo,
113 OUT DEVINFO *pdi,
114 IN HDEV hdev,
115 IN LPWSTR pwszDeviceName,
116 IN HANDLE hDriver);
117
118 VOID APIENTRY
119 DrvCompletePDEV(
120 IN DHPDEV dhpdev,
121 IN HDEV hdev);
122
123 VOID APIENTRY
124 DrvDisablePDEV(
125 IN DHPDEV dhpdev);
126
127 HSURF APIENTRY
128 DrvEnableSurface(
129 IN DHPDEV dhpdev);
130
131 VOID APIENTRY
132 DrvDisableSurface(
133 IN DHPDEV dhpdev);
134
135 BOOL APIENTRY
136 DrvAssertMode(
137 IN DHPDEV dhpdev,
138 IN BOOL bEnable);
139
140 ULONG APIENTRY
141 DrvGetModes(
142 IN HANDLE hDriver,
143 IN ULONG cjSize,
144 OUT DEVMODEW *pdm);
145
146 BOOL APIENTRY
147 DrvSetPalette(
148 IN DHPDEV dhpdev,
149 IN PALOBJ *ppalo,
150 IN FLONG fl,
151 IN ULONG iStart,
152 IN ULONG cColors);
153
154 ULONG APIENTRY
155 DrvSetPointerShape(
156 IN SURFOBJ *pso,
157 IN SURFOBJ *psoMask,
158 IN SURFOBJ *psoColor,
159 IN XLATEOBJ *pxlo,
160 IN LONG xHot,
161 IN LONG yHot,
162 IN LONG x,
163 IN LONG y,
164 IN RECTL *prcl,
165 IN FLONG fl);
166
167 VOID APIENTRY
168 DrvMovePointer(
169 IN SURFOBJ *pso,
170 IN LONG x,
171 IN LONG y,
172 IN RECTL *prcl);
173
174 BOOL
175 IntInitScreenInfo(
176 PPDEV ppdev,
177 LPDEVMODEW pDevMode,
178 PGDIINFO pGdiInfo,
179 PDEVINFO pDevInfo);
180
181 BOOL
182 IntInitDefaultPalette(
183 PPDEV ppdev,
184 PDEVINFO pDevInfo);
185
186 BOOL APIENTRY
187 IntSetPalette(
188 IN DHPDEV dhpdev,
189 IN PPALETTEENTRY ppalent,
190 IN ULONG iStart,
191 IN ULONG cColors);
192
193 BOOL
194 CopyMonoPointer(PPDEV ppdev,
195 SURFOBJ *pso);
196
197 BOOL
198 CopyColorPointer(PPDEV ppdev,
199 SURFOBJ *psoMask,
200 SURFOBJ *psoColor,
201 XLATEOBJ *pxlo);
202
203 #endif /* FRAMEBUF_H */