ReactOS  0.4.14-dev-390-g34947ad
framebufacc.h
Go to the documentation of this file.
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 #pragma once
22 
23 #include <stdarg.h>
24 #include <windef.h>
25 #include <guiddef.h>
26 #include <wingdi.h>
27 #include <winddi.h>
28 #include <winioctl.h>
29 #include <ntddvdeo.h>
30 
31 
32 //#define EXPERIMENTAL_ACC_SUPPORT
33 
34 typedef struct _PDEV
35 {
36  /* Driver stuff */
38  HDEV hDevEng;
41 
42  /* Screen Data */
48  ULONG RedMask;
53 
54  /* Vitual desktop stuff */
56 
57  /* Palette data */
58  HPALETTE DefaultPalette;
60 
61  /* hw mouse acclartions support */
67 
68 #ifdef EXPERIMENTAL_MOUSE_CURSOR_SUPPORT
69  XLATEOBJ *PointerXlateObject;
70  HSURF PointerColorSurface;
71  HSURF PointerMaskSurface;
72  HSURF PointerSaveSurface;
73 
74 #endif
75 
76  /* DirectX Support */
80  DWORD dwHeap;
84 
85  /* System Cached data */
88 
89  /* Avail Video memory from Current Screen and the end range */
91 
92 } PDEV, *PPDEV;
93 
94 
95 
96 
97 #define DEVICE_NAME L"framebuf"
98 #define ALLOC_TAG 'FUBF'
99 
100 
103  IN DEVMODEW *pdm,
105  IN ULONG cPat,
106  OUT HSURF *phsurfPatterns,
107  IN ULONG cjCaps,
108  OUT ULONG *pdevcaps,
110  OUT DEVINFO *pdi,
111  IN HDEV hdev,
113  IN HANDLE hDriver);
114 
117  IN DHPDEV dhpdev,
118  IN HDEV hdev);
119 
122  IN DHPDEV dhpdev);
123 
126  IN DHPDEV dhpdev);
127 
130  IN DHPDEV dhpdev);
131 
134  IN DHPDEV dhpdev,
135  IN BOOL bEnable);
136 
139  IN HANDLE hDriver,
140  IN ULONG cjSize,
141  OUT DEVMODEW *pdm);
142 
145  IN DHPDEV dhpdev,
146  IN PALOBJ *ppalo,
147  IN FLONG fl,
148  IN ULONG iStart,
149  IN ULONG cColors);
150 
153  IN SURFOBJ *pso,
154  IN SURFOBJ *psoMask,
156  IN XLATEOBJ *pxlo,
157  IN LONG xHot,
158  IN LONG yHot,
159  IN LONG x,
160  IN LONG y,
161  IN RECTL *prcl,
162  IN FLONG fl);
163 
166  IN SURFOBJ *pso,
167  IN LONG x,
168  IN LONG y,
169  IN RECTL *prcl);
170 
171 BOOL
173  PPDEV ppdev,
174  LPDEVMODEW pDevMode,
175  PGDIINFO pGdiInfo,
176  PDEVINFO pDevInfo);
177 
178 BOOL
180  PPDEV ppdev,
181  PDEVINFO pDevInfo);
182 
185  IN DHPDEV dhpdev,
186  IN PPALETTEENTRY ppalent,
187  IN ULONG iStart,
188  IN ULONG cColors);
189 
190 BOOL
191 CopyMonoPointer(PPDEV ppdev,
192  SURFOBJ *pso);
193 
194 BOOL
195 CopyColorPointer(PPDEV ppdev,
196  SURFOBJ *psoMask,
197  SURFOBJ *psoColor,
198  XLATEOBJ *pxlo);
VOID APIENTRY DrvDisablePDEV(IN DHPDEV dhpdev)
Definition: enable.c:150
PALETTEENTRY * PaletteEntries
Definition: framebuf.h:49
#define IN
Definition: typedefs.h:38
BOOL IntInitDefaultPalette(PPDEV ppdev, PDEVINFO pDevInfo)
Definition: palette.c:60
VIDEO_POINTER_CAPABILITIES PointerCapabilities
Definition: driver.h:44
BOOL HwMouseActive
Definition: framebufacc.h:66
ULONG ScreenHeight
Definition: framebuf.h:40
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
struct _PDEV * PPDEV
DWORD iDitherFormat
Definition: framebuf.h:61
ULONG GreenMask
Definition: framebuf.h:44
DDPIXELFORMAT ddpfDisplay
Definition: framebuf.h:67
HDEV hDevEng
Definition: framebuf.h:36
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver
Definition: winddi.h:3553
_In_ UINT iStart
Definition: wingdi.h:3615
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
POINTL ScreenOffsetXY
Definition: framebufacc.h:55
ULONG APIENTRY DrvGetModes(IN HANDLE hDriver, IN ULONG cjSize, OUT DEVMODEW *pdm)
Definition: screen.c:357
struct _PDEV PDEV
_In_ FLONG fl
Definition: winddi.h:1279
ULONG BlueMask
Definition: framebuf.h:45
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ XLATEOBJ _In_ LONG _In_ LONG yHot
Definition: winddi.h:4049
HANDLE hDriver
Definition: framebuf.h:35
BYTE BitsPerPixel
Definition: framebuf.h:42
VOID APIENTRY DrvCompletePDEV(IN DHPDEV dhpdev, IN HDEV hdev)
Definition: enable.c:132
PVOID pVideoMemCache
Definition: framebufacc.h:86
DHPDEV APIENTRY 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)
Definition: enable.c:78
VOID APIENTRY DrvMovePointer(IN SURFOBJ *pso, IN LONG x, IN LONG y, IN RECTL *prcl)
Definition: pointer.c:62
unsigned long FLONG
Definition: ntbasedef.h:373
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
ULONG VideoMemSize
Definition: framebufacc.h:90
_In_ HANDLE _In_ SURFOBJ * pso
Definition: winddi.h:3664
POINTL PointerHotSpot
Definition: framebufacc.h:65
PVOID pRealVideoMem
Definition: framebufacc.h:87
ULONG PointerAttributesSize
Definition: framebufacc.h:64
BOOL CopyColorPointer(PPDEV ppdev, SURFOBJ *psoMask, SURFOBJ *psoColor, XLATEOBJ *pxlo)
Definition: pointer.c:209
VIDEOMEMORY * pvmList
Definition: framebuf.h:65
BOOL CopyMonoPointer(PPDEV ppdev, SURFOBJ *pso)
Definition: pointer.c:219
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ XLATEOBJ _In_ LONG xHot
Definition: winddi.h:4049
unsigned long DWORD
Definition: ntddk_ex.h:95
ULONG MemWidth
Definition: framebuf.h:63
ULONG ModeIndex
Definition: framebuf.h:38
VOID APIENTRY DrvDisableSurface(IN DHPDEV dhpdev)
Definition: surface.c:133
_In_ LPWSTR pwszLogAddress
Definition: winddi.h:3548
_In_ PALOBJ * ppalo
Definition: winddi.h:4012
ULONG RedMask
Definition: framebuf.h:43
Definition: framebuf.h:33
ULONG dwHooks
Definition: framebufacc.h:40
PVOID ScreenPtr
Definition: framebuf.h:47
HSURF hSurfEng
Definition: framebuf.h:37
unsigned char BYTE
Definition: mem.h:68
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR pwszDeviceName
Definition: winddi.h:3553
BOOL APIENTRY DrvSetPalette(IN DHPDEV dhpdev, IN PALOBJ *ppalo, IN FLONG fl, IN ULONG iStart, IN ULONG cColors)
Definition: palette.c:170
_In_opt_ SURFOBJ _In_opt_ SURFOBJ * psoColor
Definition: winddi.h:4049
HSURF APIENTRY DrvEnableSurface(IN DHPDEV dhpdev)
Definition: surface.c:34
ULONG MemHeight
Definition: framebuf.h:62
BYTE PaletteShift
Definition: framebuf.h:46
_In_ BOOL bEnable
Definition: winddi.h:3426
PVIDEO_POINTER_ATTRIBUTES pPointerAttributes
Definition: driver.h:45
HPALETTE DefaultPalette
Definition: framebuf.h:48
_In_ LPWSTR _In_ ULONG cPat
Definition: winddi.h:3548
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG cjDevInfo
Definition: winddi.h:3553
_In_opt_ SURFOBJ _In_opt_ SURFOBJ * psoMask
Definition: winddi.h:3433
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3529
_In_ LPWSTR _In_ ULONG _In_ ULONG cjCaps
Definition: winddi.h:3551
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
_In_ ULONG cjSize
Definition: winddi.h:3634
BOOL IntInitScreenInfo(PPDEV ppdev, LPDEVMODEW pDevMode, PGDIINFO pGdiInfo, PDEVINFO pDevInfo)
Definition: screen.c:115
BOOL bDDInitialized
Definition: framebuf.h:66
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL APIENTRY IntSetPalette(IN DHPDEV dhpdev, IN PPALETTEENTRY ppalent, IN ULONG iStart, IN ULONG cColors)
Definition: palette.c:110
ULONG APIENTRY 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)
Definition: pointer.c:35
ULONG ScreenDelta
Definition: framebuf.h:41
BOOL APIENTRY DrvAssertMode(IN DHPDEV dhpdev, IN BOOL bEnable)
Definition: surface.c:168
_In_ HDEV hdev
Definition: winddi.h:3449
DWORD dwHeap
Definition: framebuf.h:64
#define APIENTRY
Definition: api.h:79
ULONG ScreenWidth
Definition: framebuf.h:39
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO * pdi
Definition: winddi.h:3553
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ * pxlo
Definition: winddi.h:3414