|
|
1.1 ! root 1: /******************************Module*Header*******************************\ ! 2: * Module Name: driver.h ! 3: * ! 4: * contains prototypes for the xga display driver. ! 5: * ! 6: * Copyright (c) 1992 Microsoft Corporation ! 7: \**************************************************************************/ ! 8: ! 9: #ifndef DRIVER_H ! 10: #define DRIVER_H 1 ! 11: ! 12: #include "stddef.h" ! 13: #include "windows.h" ! 14: #include "winddi.h" ! 15: #include "devioctl.h" ! 16: #include "ntddvdeo.h" ! 17: #include "debug.h" ! 18: ! 19: #include "xgaregs.h" ! 20: ! 21: // ! 22: // XGA Memory management stuff. ! 23: // ! 24: ! 25: typedef struct cp_alloc_node { ! 26: struct cp_alloc_node *pcpanNext; ! 27: ULONG ulFlags; ! 28: HANDLE hCpAllocNode; ! 29: ULONG ulLength; ! 30: PVOID pCpLinearMemory; ! 31: ULONG ulCpPhysicalMemory; ! 32: } CPALLOCNODE, *PCPALLOCNODE; ! 33: ! 34: // ! 35: // Font Stuff ! 36: // ! 37: ! 38: typedef struct _cachedGlyph { ! 39: HGLYPH hg; ! 40: struct _cachedGlyph *pcgCollisionLink; ! 41: ULONG fl; ! 42: POINTL ptlOrigin; ! 43: SIZEL sizlBitmap; ! 44: ULONG BmPitchInPels; ! 45: ULONG BmPitchInBytes; ! 46: PCPALLOCNODE pcpan; ! 47: PVOID pCpLinearMemory; ! 48: ULONG ulCpPhysicalMemory; ! 49: } CACHEDGLYPH, *PCACHEDGLYPH; ! 50: ! 51: #define VALID_GLYPH 0x01 ! 52: ! 53: #define END_COLLISIONS 0 ! 54: ! 55: ! 56: typedef struct _cachedFont { ! 57: struct _cachedFont *pcfNext; ! 58: ULONG iUniq; ! 59: ULONG cGlyphs; ! 60: ULONG cjMaxGlyph1; ! 61: PCACHEDGLYPH pCachedGlyphs; ! 62: } CACHEDFONT, *PCACHEDFONT; ! 63: ! 64: ! 65: typedef struct _PDEV ! 66: { ! 67: HANDLE hDriver; // Handle to \Device\Screen ! 68: HDEV hdevEng; // Engine's handle to PDEV ! 69: HSURF hSurfEng; // Engine's handle to surface ! 70: HSURF hSurfBm; // Handle to the engine bitmap ! 71: SURFOBJ *pSurfObj; // Pointer to the locked surface object. ! 72: HPALETTE hpalDefault; // Handle to the default palette for device. ! 73: PBYTE pjScreen; // This is pointer to base screen address ! 74: ULONG cxScreen; // Visible screen width ! 75: ULONG cyScreen; // Visible screen height ! 76: ULONG ulMode; // Mode the mini-port driver is in. ! 77: LONG lDeltaScreen; // Distance from one scan to the next. ! 78: FLONG flRed; // For bitfields device, Red Mask ! 79: FLONG flGreen; // For bitfields device, Green Mask ! 80: FLONG flBlue; // For bitfields device, Blue Mask ! 81: ULONG ulBitCount; // # of bits per pel 8,16,32 are only supported. ! 82: ULONG cPatterns; // Count of bitmap patterns created ! 83: HBITMAP ahbmPat[HS_DDI_MAX]; // Engine handles to standard patterns ! 84: PALETTEENTRY *pPal; // If this is pal managed, this is the pal ! 85: ! 86: PXGACPREGS pXgaCpRegs; ! 87: ULONG ulPhysFrameBuffer; // 32 bit physical address of the frame buffer. ! 88: ULONG ulXgaIoRegsBase; // IO address of XGA registers. ! 89: ULONG ulScreenSize; // Size of the framebuffer. ! 90: ULONG ulVideoMemorySize; // Size of the video memory. ! 91: ! 92: ULONG ulfAccelerations_debug; // debugging flag ! 93: ULONG ulfBlitAccelerations_debug; // debugging flag ! 94: ! 95: PCPALLOCNODE pAllocatedListRoot; ! 96: PCPALLOCNODE pFreeListRoot; ! 97: ! 98: PCACHEDFONT pCachedFontsRoot; ! 99: ! 100: } PDEV, *PPDEV; ! 101: ! 102: BOOL bInitPDEV(PPDEV,PDEVMODEW, GDIINFO *, DEVINFO *); ! 103: BOOL bInitSURF(PPDEV,BOOL); ! 104: BOOL bInitPaletteInfo(PPDEV, DEVINFO *); ! 105: BOOL bInit256ColorPalette(PPDEV); ! 106: BOOL bInitPatterns(PPDEV, ULONG); ! 107: VOID vDisablePalette(PPDEV); ! 108: VOID vDisablePatterns(PPDEV); ! 109: VOID vDisableSURF(PPDEV); ! 110: DWORD getAvailableModes(HANDLE, PVIDEO_MODE_INFORMATION *, DWORD *); ! 111: ! 112: // ! 113: // Pointer function prototypes ! 114: // ! 115: ! 116: VOID vMoveHardwarePointer(SURFOBJ *,LONG,LONG); ! 117: BOOL bSetHardwarePointerShape(SURFOBJ *,SURFOBJ *,SURFOBJ *, XLATEOBJ *, ! 118: LONG, LONG, LONG, LONG, FLONG); ! 119: #define MAX_CLUT_SIZE (sizeof(VIDEO_CLUT) + (sizeof(ULONG) * 256)) ! 120: ! 121: // ! 122: // Determines the size of the DriverExtra information in the DEVMODE ! 123: // structure passed to and from the display driver. ! 124: // ! 125: ! 126: #define DRIVER_EXTRA_SIZE 0 ! 127: ! 128: ! 129: #include "xgaioctl.h" ! 130: ! 131: #include "xga.h" ! 132: ! 133: ! 134: #endif // DRIVER_H
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.