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