ReactOS  0.4.14-dev-337-gf981a68
framebuf.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 #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 {
36  HDEV hDevEng;
48  HPALETTE DefaultPalette;
50 
51 #ifdef EXPERIMENTAL_MOUSE_CURSOR_SUPPORT
53  XLATEOBJ *PointerXlateObject;
54  HSURF PointerColorSurface;
55  HSURF PointerMaskSurface;
56  HSURF PointerSaveSurface;
58 #endif
59 
60  /* DirectX Support */
68 } PDEV, *PPDEV;
69 
70 #define DEVICE_NAME L"framebuf"
71 #define ALLOC_TAG 'FUBF'
72 
73 
76  IN DEVMODEW *pdm,
78  IN ULONG cPat,
79  OUT HSURF *phsurfPatterns,
80  IN ULONG cjCaps,
81  OUT ULONG *pdevcaps,
83  OUT DEVINFO *pdi,
84  IN HDEV hdev,
86  IN HANDLE hDriver);
87 
90  IN DHPDEV dhpdev,
91  IN HDEV hdev);
92 
95  IN DHPDEV dhpdev);
96 
99  IN DHPDEV dhpdev);
100 
103  IN DHPDEV dhpdev);
104 
107  IN DHPDEV dhpdev,
108  IN BOOL bEnable);
109 
112  IN HANDLE hDriver,
113  IN ULONG cjSize,
114  OUT DEVMODEW *pdm);
115 
118  IN DHPDEV dhpdev,
119  IN PALOBJ *ppalo,
120  IN FLONG fl,
121  IN ULONG iStart,
122  IN ULONG cColors);
123 
126  IN SURFOBJ *pso,
127  IN SURFOBJ *psoMask,
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 
139  IN SURFOBJ *pso,
140  IN LONG x,
141  IN LONG y,
142  IN RECTL *prcl);
143 
144 BOOL
146  PPDEV ppdev,
147  LPDEVMODEW pDevMode,
148  PGDIINFO pGdiInfo,
149  PDEVINFO pDevInfo);
150 
151 BOOL
153  PPDEV ppdev,
154  PDEVINFO pDevInfo);
155 
158  IN DHPDEV dhpdev,
159  IN PPALETTEENTRY ppalent,
160  IN ULONG iStart,
161  IN ULONG cColors);
162 
163 #endif /* _FRAMEBUF_PCH_ */
VOID APIENTRY DrvDisableSurface(IN DHPDEV dhpdev)
Definition: surface.c:133
PALETTEENTRY * PaletteEntries
Definition: framebuf.h:49
#define IN
Definition: typedefs.h:38
BOOL APIENTRY DrvAssertMode(IN DHPDEV dhpdev, IN BOOL bEnable)
Definition: surface.c:168
BOOL IntInitScreenInfo(PPDEV ppdev, LPDEVMODEW pDevMode, PGDIINFO pGdiInfo, PDEVINFO pDevInfo)
Definition: screen.c:115
ULONG ScreenHeight
Definition: framebuf.h:40
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
DWORD PointerAttributes
Definition: vgaddi.h:122
DWORD iDitherFormat
Definition: framebuf.h:61
ULONG GreenMask
Definition: framebuf.h:44
ULONG APIENTRY DrvGetModes(IN HANDLE hDriver, IN ULONG cjSize, OUT DEVMODEW *pdm)
Definition: screen.c:357
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
BOOL APIENTRY IntSetPalette(IN DHPDEV dhpdev, IN PPALETTEENTRY ppalent, IN ULONG iStart, IN ULONG cColors)
Definition: palette.c:110
BOOL IntInitDefaultPalette(PPDEV ppdev, PDEVINFO pDevInfo)
Definition: palette.c:60
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
_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
struct _PDEV PDEV
unsigned long FLONG
Definition: ntbasedef.h:373
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
_In_ HANDLE _In_ SURFOBJ * pso
Definition: winddi.h:3664
POINTL PointerHotSpot
Definition: framebufacc.h:65
VIDEOMEMORY * pvmList
Definition: framebuf.h:65
_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
_In_ LPWSTR pwszLogAddress
Definition: winddi.h:3548
_In_ PALOBJ * ppalo
Definition: winddi.h:4012
ULONG RedMask
Definition: framebuf.h:43
struct _PDEV * PPDEV
Definition: framebuf.h:33
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
_In_opt_ SURFOBJ _In_opt_ SURFOBJ * psoColor
Definition: winddi.h:4049
ULONG MemHeight
Definition: framebuf.h:62
BYTE PaletteShift
Definition: framebuf.h:46
_In_ BOOL bEnable
Definition: winddi.h:3426
HPALETTE DefaultPalette
Definition: framebuf.h:48
BOOL APIENTRY DrvSetPalette(IN DHPDEV dhpdev, IN PALOBJ *ppalo, IN FLONG fl, IN ULONG iStart, IN ULONG cColors)
Definition: palette.c:170
_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
VOID APIENTRY DrvDisablePDEV(IN DHPDEV dhpdev)
Definition: enable.c:150
VOID APIENTRY DrvMovePointer(IN SURFOBJ *pso, IN LONG x, IN LONG y, IN RECTL *prcl)
Definition: pointer.c:62
_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 bDDInitialized
Definition: framebuf.h:66
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HSURF APIENTRY DrvEnableSurface(IN DHPDEV dhpdev)
Definition: surface.c:34
ULONG ScreenDelta
Definition: framebuf.h:41
_In_ HDEV hdev
Definition: winddi.h:3449
DWORD dwHeap
Definition: framebuf.h:64
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
#define APIENTRY
Definition: api.h:79
VOID APIENTRY DrvCompletePDEV(IN DHPDEV dhpdev, IN HDEV hdev)
Definition: enable.c:132
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