another hack to get reactos to build again
[reactos.git] / reactos / drivers / video / displays / framebuf / framebuf.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 <ddk/winddi.h>
29 #include <winioctl.h>
30 #include <ddk/ntddvdeo.h>
31
32 #define DDKAPI __stdcall
33 #define DDKFASTAPI __fastcall
34 #define FASTCALL __fastcall
35 #define DDKCDECLAPI __cdecl
36 //#define EXPERIMENTAL_MOUSE_CURSOR_SUPPORT
37
38 typedef struct _PDEV
39 {
40 HANDLE hDriver;
41 HDEV hDevEng;
42 HSURF hSurfEng;
43 ULONG ModeIndex;
44 ULONG ScreenWidth;
45 ULONG ScreenHeight;
46 ULONG ScreenDelta;
47 BYTE BitsPerPixel;
48 ULONG RedMask;
49 ULONG GreenMask;
50 ULONG BlueMask;
51 BYTE PaletteShift;
52 PVOID ScreenPtr;
53 HPALETTE DefaultPalette;
54 PALETTEENTRY *PaletteEntries;
55
56 #ifdef EXPERIMENTAL_MOUSE_CURSOR_SUPPORT
57 VIDEO_POINTER_ATTRIBUTES PointerAttributes;
58 XLATEOBJ *PointerXlateObject;
59 HSURF PointerColorSurface;
60 HSURF PointerMaskSurface;
61 HSURF PointerSaveSurface;
62 POINTL PointerHotSpot;
63 #endif
64 } PDEV, *PPDEV;
65
66 #define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
67
68 #define DEVICE_NAME L"framebuf"
69 #define ALLOC_TAG TAG('F','B','U','F')
70
71 DHPDEV STDCALL
72 DrvEnablePDEV(
73 IN DEVMODEW *pdm,
74 IN LPWSTR pwszLogAddress,
75 IN ULONG cPat,
76 OUT HSURF *phsurfPatterns,
77 IN ULONG cjCaps,
78 OUT ULONG *pdevcaps,
79 IN ULONG cjDevInfo,
80 OUT DEVINFO *pdi,
81 IN HDEV hdev,
82 IN LPWSTR pwszDeviceName,
83 IN HANDLE hDriver);
84
85 VOID STDCALL
86 DrvCompletePDEV(
87 IN DHPDEV dhpdev,
88 IN HDEV hdev);
89
90 VOID STDCALL
91 DrvDisablePDEV(
92 IN DHPDEV dhpdev);
93
94 HSURF STDCALL
95 DrvEnableSurface(
96 IN DHPDEV dhpdev);
97
98 VOID STDCALL
99 DrvDisableSurface(
100 IN DHPDEV dhpdev);
101
102 BOOL STDCALL
103 DrvAssertMode(
104 IN DHPDEV dhpdev,
105 IN BOOL bEnable);
106
107 ULONG STDCALL
108 DrvGetModes(
109 IN HANDLE hDriver,
110 IN ULONG cjSize,
111 OUT DEVMODEW *pdm);
112
113 BOOL STDCALL
114 DrvSetPalette(
115 IN DHPDEV dhpdev,
116 IN PALOBJ *ppalo,
117 IN FLONG fl,
118 IN ULONG iStart,
119 IN ULONG cColors);
120
121 ULONG STDCALL
122 DrvSetPointerShape(
123 IN SURFOBJ *pso,
124 IN SURFOBJ *psoMask,
125 IN SURFOBJ *psoColor,
126 IN XLATEOBJ *pxlo,
127 IN LONG xHot,
128 IN LONG yHot,
129 IN LONG x,
130 IN LONG y,
131 IN RECTL *prcl,
132 IN FLONG fl);
133
134 VOID STDCALL
135 DrvMovePointer(
136 IN SURFOBJ *pso,
137 IN LONG x,
138 IN LONG y,
139 IN RECTL *prcl);
140
141 BOOL FASTCALL
142 IntInitScreenInfo(
143 PPDEV ppdev,
144 LPDEVMODEW pDevMode,
145 PGDIINFO pGdiInfo,
146 PDEVINFO pDevInfo);
147
148 BOOL FASTCALL
149 IntInitDefaultPalette(
150 PPDEV ppdev,
151 PDEVINFO pDevInfo);
152
153 BOOL DDKAPI
154 IntSetPalette(
155 IN DHPDEV dhpdev,
156 IN PPALETTEENTRY ppalent,
157 IN ULONG iStart,
158 IN ULONG cColors);
159
160 #endif /* FRAMEBUF_H */