|
|
1.1 ! root 1: /******************************Module*Header*******************************\ ! 2: * Module Name: driver.h ! 3: * ! 4: * contains prototypes for the frame buffer driver. ! 5: * ! 6: * Copyright (c) 1992 Microsoft Corporation ! 7: \**************************************************************************/ ! 8: ! 9: #include "stddef.h" ! 10: #include "windows.h" ! 11: #include "winddi.h" ! 12: #include "devioctl.h" ! 13: #include "ntddvdeo.h" ! 14: #include "debug.h" ! 15: ! 16: typedef struct _PDEV ! 17: { ! 18: HANDLE hDriver; // Handle to \Device\Screen ! 19: HDEV hdevEng; // Engine's handle to PDEV ! 20: HSURF hsurfEng; // Engine's handle to surface ! 21: HPALETTE hpalDefault; // Handle to the default palette for device. ! 22: PBYTE pjScreen; // This is pointer to base screen address ! 23: ULONG cxScreen; // Visible screen width ! 24: ULONG cyScreen; // Visible screen height ! 25: ULONG ulMode; // Mode the mini-port driver is in. ! 26: LONG lDeltaScreen; // Distance from one scan to the next. ! 27: FLONG flRed; // For bitfields device, Red Mask ! 28: FLONG flGreen; // For bitfields device, Green Mask ! 29: FLONG flBlue; // For bitfields device, Blue Mask ! 30: ULONG ulBitCount; // # of bits per pel 8,16,24,32 are only supported. ! 31: POINTL ptlHotSpot; // adjustment for pointer hot spot ! 32: ULONG cPatterns; // Count of bitmap patterns created ! 33: HBITMAP ahbmPat[HS_DDI_MAX]; // Engine handles to standard patterns ! 34: VIDEO_POINTER_CAPABILITIES PointerCapabilities; // HW pointer abilities ! 35: PVIDEO_POINTER_ATTRIBUTES pPointerAttributes; // hardware pointer attributes ! 36: DWORD cjPointerAttributes; // Size of buffer allocated ! 37: BOOL fHwCursorActive; // Are we currently using the hw cursor ! 38: PALETTEENTRY *pPal; // If this is pal managed, this is the pal ! 39: } PDEV, *PPDEV; ! 40: ! 41: DWORD getAvailableModes(HANDLE, PVIDEO_MODE_INFORMATION *, DWORD *); ! 42: BOOL bInitPDEV(PPDEV, PDEVMODEW, GDIINFO *, DEVINFO *); ! 43: BOOL bInitSURF(PPDEV, BOOL); ! 44: BOOL bInitPaletteInfo(PPDEV, DEVINFO *); ! 45: BOOL bInitPointer(PPDEV, DEVINFO *); ! 46: BOOL bInit256ColorPalette(PPDEV); ! 47: BOOL bInitPatterns(PPDEV, ULONG); ! 48: VOID vDisablePalette(PPDEV); ! 49: VOID vDisablePatterns(PPDEV); ! 50: VOID vDisableSURF(PPDEV); ! 51: ! 52: #define MAX_CLUT_SIZE (sizeof(VIDEO_CLUT) + (sizeof(ULONG) * 256)) ! 53: ! 54: ! 55: // ! 56: // Function prototypes ! 57: // ! 58: ! 59: VOID ! 60: DevpSolidColorFill( ! 61: IN PRECTL DstRect, ! 62: IN ULONG Color ! 63: ); ! 64: ! 65: VOID ! 66: DrvpSolidFill( ! 67: IN PRECTL DstRect, ! 68: IN CLIPOBJ *pco, ! 69: IN ULONG Color ! 70: ); ! 71: ! 72: VOID ! 73: DrvpBitBlt( ! 74: IN PRECTL DstRect, ! 75: IN PPOINTL SrcPoint, ! 76: IN BOOL BltDir ! 77: ); ! 78: ! 79: ! 80: BOOL ! 81: DrvpIntersectRect( ! 82: IN PRECTL Rectl1, ! 83: IN PRECTL Rectl2, ! 84: OUT PRECTL DestRectl ! 85: ); ! 86: ! 87: LONG ! 88: DrvCacheFont( ! 89: IN FONTOBJ *FontObject ! 90: ); ! 91: ! 92: ! 93: BOOL ! 94: DrvInitText(); ! 95: ! 96: ! 97: VOID DevSetFgColor(ULONG TextForegroundColor); ! 98: VOID DevSetBgColor(ULONG TextBackgroundColor); ! 99: ! 100: VOID ! 101: WaitForJaguarIdle(); ! 102: ! 103: VOID ! 104: FifoWrite( ! 105: IN ULONG DstAdr, ! 106: IN ULONG SrcAdr, ! 107: IN ULONG XYCmd ! 108: ); ! 109: ! 110: ! 111: BOOL ! 112: DrvpSetGammaColorPalette( ! 113: IN PPDEV ppdev, ! 114: IN WORD NumberOfEntries, ! 115: IN LDECI4 GammaRed, ! 116: IN LDECI4 GammaGreen, ! 117: IN LDECI4 GammaBlue ! 118: ); ! 119: ! 120: ! 121: // ! 122: // GDI Structure ! 123: // ! 124: ! 125: #define BB_RECT_LIMIT 20 ! 126: ! 127: typedef struct _ENUMRECTLIST ! 128: { ! 129: ULONG c; ! 130: RECTL arcl[BB_RECT_LIMIT]; ! 131: } ENUMRECTLIST; ! 132: ! 133: ! 134: // ! 135: // Font cache definitions. ! 136: // ! 137: ! 138: typedef struct _FONTCACHEINFO { ! 139: ULONG FontId; ! 140: ULONG GlyphHandle; ! 141: } FONTCACHEINFO,*PFONTCACHEINFO; ! 142: ! 143: ! 144: #define GlyphExtended 0xFFFFFFFE ! 145: #define FreeTag 0xFFFFFFFF ! 146: ! 147: // ! 148: // Define size of a glyph entry ! 149: // ! 150: #define LinesPerEntry 32 ! 151: #define GlyphEntrySize LinesPerEntry*4 ! 152: ! 153: // ! 154: // Define maximum number of entries for the Font cache = 4096 glyphs. ! 155: // Must be a power of two. ! 156: // If given the resolution mode there isn't enough video memory to ! 157: // allocate a cache this big, the size is reduced by halves until ! 158: // it fits. ! 159: // ! 160: #define MAX_FONT_CACHE_SIZE 0x1000 ! 161: ! 162: typedef struct _VXL_DIMENSIONS { ! 163: ULONG ScreenX; ! 164: ULONG JaguarScreenX; ! 165: ULONG ScreenY; ! 166: ULONG ScreenBase; ! 167: ULONG MemorySize; ! 168: PULONG FontCacheBase; ! 169: ULONG FontCacheOffset; ! 170: ULONG CacheIndexMask; ! 171: ULONG CacheSize; ! 172: PFONTCACHEINFO CacheTag; ! 173: UCHAR ColorModeShift; ! 174: } VXL_DIMENSIONS, *PVXL_DIMENSIONS; ! 175: ! 176: ! 177: extern VXL_DIMENSIONS Vxl; ! 178: ! 179: ! 180: // ! 181: // Determines the size of the DriverExtra information in the DEVMODE ! 182: // structure passed to and from the display driver. ! 183: // ! 184: ! 185: #define DRIVER_EXTRA_SIZE 0
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.