Source code of Windows XP (NT5)
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.

103 lines
3.9 KiB

  1. /*++
  2. Copyright (c) 1994 - 1995 Microsoft Corporation. All Rights Reserved.
  3. Module Name:
  4. vpfilter.h
  5. Abstract:
  6. This is the include file for kernel mode drivers intend to link to
  7. the video filter driver.
  8. Author:
  9. Paul Shih (paulsh) 01-Apr-1994
  10. Revision History:
  11. --*/
  12. #ifndef _VPFILTER_H
  13. #define _VPFILTER_H
  14. typedef struct _MODE_DATA {
  15. ULONG ScreenWidth; // Number of visible horizontal pixels on a scan line
  16. ULONG ScreenHeight; // Number, in pixels, of visible scan lines.
  17. ULONG ScreenStride; // Bytes per line
  18. ULONG NumberOfPlanes; // Number of separate planes combined by the video hardware
  19. ULONG BitsPerPlane; // Number of bits per pixel on a plane
  20. ULONG Frequency; // Frequency of the screen, in hertz.
  21. ULONG NumberRedBits; // Number of bits in the red DAC
  22. ULONG NumberGreenBits; // Number of bits in the Green DAC.
  23. ULONG NumberBlueBits; // Number of bits in the blue DAC.
  24. ULONG RedMask; // Red color mask. Bits turned on indicated the color red
  25. ULONG GreenMask; // Green color mask. Bits turned on indicated the color green
  26. ULONG BlueMask; // Blue color mask. Bits turned on indicated the color blue
  27. ULONG AttributeFlags; // Flags indicating certain device behavior.
  28. // It's an logical-OR summation of MODE_xxx flags.
  29. } MODE_DATA, *PMODE_DATA;
  30. #define MODE_COLOR 0x01 // 0 = monochrome; 1 = color
  31. #define MODE_GRAPHICS 0x02 // 0 = text mode; 1 = graphics mode
  32. #define MODE_INTERLACED 0x04 // 0 = non-interlaced; 1 = interlaced
  33. #define MODE_PALETTE_DRIVEN 0x08 // 0 = colors direct; 1 = colors indexed to a palette
  34. typedef struct _RGBCOLOR {
  35. UCHAR Red; // Bits to be put in the red portion of the clor register
  36. UCHAR Green; // Bits to be put in the green portion of the color register
  37. UCHAR Blue; // Bits to be put in the blue portion of the color register
  38. UCHAR Unused;
  39. } RGBCOLOR, *PRGBCOLOR;
  40. typedef union {
  41. RGBCOLOR RgbColor;
  42. ULONG RgbLong;
  43. } CLUT, *PCLUT;
  44. typedef struct _CLUT_DATA {
  45. USHORT NumEntries; // Number of entries in the CLUT pointed by RGBArray
  46. USHORT FirstEntry; // Location in the device palette to which the
  47. // first entry in the CLUT is copied. The other
  48. // entries in the CLUT are copied sequentially
  49. // into the device palette from the starting
  50. // point.
  51. PCLUT RgbArray; // The CLUT to copy into the device color registers
  52. // (palette).
  53. } CLUT_DATA, *PCLUT_DATA;
  54. typedef struct _PALETTE_DATA {
  55. USHORT NumEntries; // Number of entries in the CLUT pointed by Colors.
  56. USHORT FirstEntry; // Location in the device palette to which the
  57. // first entry in the CLUT is copied. The other
  58. // entries in the CLUT are copied sequentially
  59. // into the device palette from the starting
  60. // point.
  61. PUSHORT Colors; // points to the CLUT to copy into the color palette.
  62. } PALETTE_DATA, *PPALETTE_DATA;
  63. typedef enum {
  64. VideoReset = 0,
  65. VideoModeChange,
  66. VideoClutChange,
  67. VideoPaletteChange
  68. } NOTIFICATION_CODE;
  69. typedef VOID (*PVPFILTER_CALLBACK)(
  70. IN NOTIFICATION_CODE NotificationCode,
  71. IN PVOID UserContext,
  72. IN PVOID NotificationContext
  73. );
  74. NTSTATUS HookVideoFilter(
  75. IN PVPFILTER_CALLBACK VPFilterCallBack,
  76. IN PVOID Context
  77. );
  78. NTSTATUS UnhookVideoFilter(
  79. IN PVPFILTER_CALLBACK VPFilterCallBack
  80. );
  81. #endif // #ifndef _VPFILTER_H