Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
3.7 KiB

  1. /******************************Module*Header*******************************\
  2. *
  3. * *******************
  4. * * GDI SAMPLE CODE *
  5. * *******************
  6. *
  7. * Module Name: driver.h
  8. *
  9. * contains prototypes for the frame buffer driver.
  10. *
  11. * Copyright (c) 1992-1998 Microsoft Corporation
  12. \**************************************************************************/
  13. #include "stddef.h"
  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. 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. POINTL ptlOrg; // Where this display is anchored in
  31. // the virtual desktop.
  32. ULONG ulMode; // Mode the mini-port driver is in.
  33. LONG lDeltaScreen; // Distance from one scan to the next.
  34. ULONG cScreenSize; // size of video memory, including
  35. // offscreen memory.
  36. PVOID pOffscreenList; // linked list of DCI offscreen surfaces.
  37. FLONG flRed; // For bitfields device, Red Mask
  38. FLONG flGreen; // For bitfields device, Green Mask
  39. FLONG flBlue; // For bitfields device, Blue Mask
  40. ULONG cPaletteShift; // number of bits the 8-8-8 palette must
  41. // be shifted by to fit in the hardware
  42. // palette.
  43. ULONG ulBitCount; // # of bits per pel 8,16,24,32 are only supported.
  44. POINTL ptlHotSpot; // adjustment for pointer hot spot
  45. VIDEO_POINTER_CAPABILITIES PointerCapabilities; // HW pointer abilities
  46. PVIDEO_POINTER_ATTRIBUTES pPointerAttributes; // hardware pointer attributes
  47. DWORD cjPointerAttributes; // Size of buffer allocated
  48. BOOL fHwCursorActive; // Are we currently using the hw cursor
  49. PALETTEENTRY *pPal; // If this is pal managed, this is the pal
  50. BOOL bSupportDCI; // Does the miniport support DCI?
  51. FLONG flHooks;
  52. } PDEV, *PPDEV;
  53. DWORD getAvailableModes(HANDLE, PVIDEO_MODE_INFORMATION *, DWORD *);
  54. BOOL bInitPDEV(PPDEV, PDEVMODEW, GDIINFO *, DEVINFO *);
  55. BOOL bInitSURF(PPDEV, BOOL);
  56. BOOL bInitPaletteInfo(PPDEV, DEVINFO *);
  57. BOOL bInitPointer(PPDEV, DEVINFO *);
  58. BOOL bInit256ColorPalette(PPDEV);
  59. VOID vDisablePalette(PPDEV);
  60. VOID vDisableSURF(PPDEV);
  61. #define MAX_CLUT_SIZE (sizeof(VIDEO_CLUT) + (sizeof(ULONG) * 256))
  62. //
  63. // Determines the size of the DriverExtra information in the DEVMODE
  64. // structure passed to and from the display driver.
  65. //
  66. #define DRIVER_EXTRA_SIZE 0
  67. #define DLL_NAME L"framebuf" // Name of the DLL in UNICODE
  68. #define STANDARD_DEBUG_PREFIX "FRAMEBUF: " // All debug output is prefixed
  69. #define ALLOC_TAG 'bfDD' // Four byte tag (characters in
  70. // reverse order) used for memory
  71. // allocations