3034914d86bf025cf368a37e1acdc7d220adee52
[reactos.git] / reactos / win32ss / drivers / displays / framebuf_new / driver.h
1 /*
2 * PROJECT: ReactOS Framebuffer Display Driver
3 * LICENSE: Microsoft NT4 DDK Sample Code License
4 * FILE: boot/drivers/video/displays/framebuf/driver.h
5 * PURPOSE: Main Driver Header File
6 * PROGRAMMERS: Copyright (c) 1992-1995 Microsoft Corporation
7 * ReactOS Portable Systems Group
8 */
9
10 #ifndef _FRAMEBUF_NEW_PCH_
11 #define _FRAMEBUF_NEW_PCH_
12
13 //#define DBG 1
14 #include <stdarg.h>
15 #include <windef.h>
16 #include <wingdi.h>
17 #include <winddi.h>
18 #include <devioctl.h>
19 #include <ntddvdeo.h>
20 #include "debug.h"
21
22 typedef struct _PDEV
23 {
24 HANDLE hDriver; // Handle to \Device\Screen
25 HDEV hdevEng; // Engine's handle to PDEV
26 HSURF hsurfEng; // Engine's handle to surface
27 HPALETTE hpalDefault; // Handle to the default palette for device.
28 PBYTE pjScreen; // This is pointer to base screen address
29 ULONG cxScreen; // Visible screen width
30 ULONG cyScreen; // Visible screen height
31 ULONG ulMode; // Mode the mini-port driver is in.
32 LONG lDeltaScreen; // Distance from one scan to the next.
33 ULONG cScreenSize; // size of video memory, including
34 // offscreen memory.
35 PVOID pOffscreenList; // linked list of DCI offscreen surfaces.
36 FLONG flRed; // For bitfields device, Red Mask
37 FLONG flGreen; // For bitfields device, Green Mask
38 FLONG flBlue; // For bitfields device, Blue Mask
39 ULONG cPaletteShift; // number of bits the 8-8-8 palette must
40 // be shifted by to fit in the hardware
41 // palette.
42 ULONG ulBitCount; // # of bits per pel 8,16,24,32 are only supported.
43 POINTL ptlHotSpot; // adjustment for pointer hot spot
44 VIDEO_POINTER_CAPABILITIES PointerCapabilities; // HW pointer abilities
45 PVIDEO_POINTER_ATTRIBUTES pPointerAttributes; // hardware pointer attributes
46 DWORD cjPointerAttributes; // Size of buffer allocated
47 BOOL fHwCursorActive; // Are we currently using the hw cursor
48 PALETTEENTRY *pPal; // If this is pal managed, this is the pal
49 BOOL bSupportDCI; // Does the miniport support DCI?
50 // eVb: 3.1 [DDK Change] - Support new VGA Miniport behavior w.r.t updated framebuffer remapping
51 LONG flHooks;
52 // eVb: 3.1 [END]
53 } PDEV, *PPDEV;
54
55 DWORD NTAPI getAvailableModes(HANDLE, PVIDEO_MODE_INFORMATION *, DWORD *);
56 BOOL NTAPI bInitPDEV(PPDEV, PDEVMODEW, GDIINFO *, DEVINFO *);
57 BOOL NTAPI bInitSURF(PPDEV, BOOL);
58 BOOL NTAPI bInitPaletteInfo(PPDEV, DEVINFO *);
59 BOOL NTAPI bInitPointer(PPDEV, DEVINFO *);
60 BOOL NTAPI bInit256ColorPalette(PPDEV);
61 VOID NTAPI vDisablePalette(PPDEV);
62 VOID NTAPI vDisableSURF(PPDEV);
63
64 #define MAX_CLUT_SIZE (sizeof(VIDEO_CLUT) + (sizeof(ULONG) * 256))
65
66 //
67 // Determines the size of the DriverExtra information in the DEVMODE
68 // structure passed to and from the display driver.
69 //
70
71 #define DRIVER_EXTRA_SIZE 0
72
73 #define DLL_NAME L"framebuf" // Name of the DLL in UNICODE
74 #define STANDARD_DEBUG_PREFIX "FRAMEBUF: " // All debug output is prefixed
75 #define ALLOC_TAG 'bfDD' // Four byte tag (characters in
76 // reverse order) used for memory
77 // allocations
78
79 #endif /* _FRAMEBUF_NEW_PCH_ */