Home | History | Annotate | Download | only in include
      1 /*
      2  * ntddvdeo.h
      3  *
      4  * Definitions for video devices
      5  *
      6  * This file is part of the w32api package.
      7  *
      8  * Contributors:
      9  *   Created by Casper S. Hornstrup <chorns (at) users.sourceforge.net>
     10  *
     11  * THIS SOFTWARE IS NOT COPYRIGHTED
     12  *
     13  * This source code is offered for use in the public domain. You may
     14  * use, modify or distribute it freely.
     15  *
     16  * This code is distributed in the hope that it will be useful but
     17  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
     18  * DISCLAIMED. This includes but is not limited to warranties of
     19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     20  *
     21  */
     22 
     23 #ifndef _NTDDVDEO_
     24 #define _NTDDVDEO_
     25 
     26 #ifdef __cplusplus
     27 extern "C" {
     28 #endif
     29 
     30 #define VIDEO_DEVICE_NAME                 "DISPLAY%d"
     31 #define WVIDEO_DEVICE_NAME                L"DISPLAY%d"
     32 
     33 #define DD_FULLSCREEN_VIDEO_DEVICE_NAME   L"\\Device\\FSVideo"
     34 
     35 DEFINE_GUID(GUID_DEVINTERFACE_DISPLAY_ADAPTER, \
     36   0x5b45201d, 0xf2f2, 0x4f3b, 0x85, 0xbb, 0x30, 0xff, 0x1f, 0x95, 0x35, 0x99);
     37 
     38 #define IOCTL_VIDEO_ENABLE_VDM \
     39   CTL_CODE(FILE_DEVICE_VIDEO, 0x00, METHOD_BUFFERED, FILE_ANY_ACCESS)
     40 
     41 #define IOCTL_VIDEO_DISABLE_VDM \
     42   CTL_CODE(FILE_DEVICE_VIDEO, 0x01, METHOD_BUFFERED, FILE_ANY_ACCESS)
     43 
     44 #define IOCTL_VIDEO_REGISTER_VDM \
     45   CTL_CODE(FILE_DEVICE_VIDEO, 0x02, METHOD_BUFFERED, FILE_ANY_ACCESS)
     46 
     47 #define IOCTL_VIDEO_SET_OUTPUT_DEVICE_POWER_STATE \
     48   CTL_CODE(FILE_DEVICE_VIDEO, 0x03, METHOD_BUFFERED, FILE_ANY_ACCESS)
     49 
     50 #define IOCTL_VIDEO_GET_OUTPUT_DEVICE_POWER_STATE \
     51   CTL_CODE(FILE_DEVICE_VIDEO, 0x04, METHOD_BUFFERED, FILE_ANY_ACCESS)
     52 
     53 #define IOCTL_VIDEO_MONITOR_DEVICE \
     54   CTL_CODE(FILE_DEVICE_VIDEO, 0x05, METHOD_BUFFERED, FILE_ANY_ACCESS)
     55 
     56 #define IOCTL_VIDEO_ENUM_MONITOR_PDO \
     57   CTL_CODE(FILE_DEVICE_VIDEO, 0x06, METHOD_BUFFERED, FILE_ANY_ACCESS)
     58 
     59 #define IOCTL_VIDEO_INIT_WIN32K_CALLBACKS \
     60   CTL_CODE(FILE_DEVICE_VIDEO, 0x07, METHOD_BUFFERED, FILE_ANY_ACCESS)
     61 
     62 #define IOCTL_VIDEO_HANDLE_VIDEOPARAMETERS \
     63   CTL_CODE(FILE_DEVICE_VIDEO, 0x08, METHOD_BUFFERED, FILE_ANY_ACCESS)
     64 
     65 #define IOCTL_VIDEO_IS_VGA_DEVICE \
     66   CTL_CODE(FILE_DEVICE_VIDEO, 0x09, METHOD_BUFFERED, FILE_ANY_ACCESS)
     67 
     68 #define IOCTL_VIDEO_USE_DEVICE_IN_SESSION \
     69   CTL_CODE(FILE_DEVICE_VIDEO, 0x0a, METHOD_BUFFERED, FILE_ANY_ACCESS)
     70 
     71 #define IOCTL_VIDEO_PREPARE_FOR_EARECOVERY \
     72   CTL_CODE(FILE_DEVICE_VIDEO, 0x0b, METHOD_BUFFERED, FILE_ANY_ACCESS)
     73 
     74 #define IOCTL_VIDEO_DISABLE_CURSOR \
     75   CTL_CODE (FILE_DEVICE_VIDEO, 0x109, METHOD_BUFFERED, FILE_ANY_ACCESS)
     76 
     77 #define IOCTL_VIDEO_DISABLE_POINTER \
     78   CTL_CODE(FILE_DEVICE_VIDEO, 0x10f, METHOD_BUFFERED, FILE_ANY_ACCESS)
     79 
     80 #define IOCTL_VIDEO_ENABLE_CURSOR \
     81   CTL_CODE(FILE_DEVICE_VIDEO, 0x108, METHOD_BUFFERED, FILE_ANY_ACCESS)
     82 
     83 #define IOCTL_VIDEO_ENABLE_POINTER \
     84   CTL_CODE(FILE_DEVICE_VIDEO, 0x10e, METHOD_BUFFERED, FILE_ANY_ACCESS)
     85 
     86 #define IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES \
     87   CTL_CODE(FILE_DEVICE_VIDEO, 0x119, METHOD_BUFFERED, FILE_ANY_ACCESS)
     88 
     89 #define IOCTL_VIDEO_GET_BANK_SELECT_CODE \
     90   CTL_CODE(FILE_DEVICE_VIDEO, 0x115, METHOD_BUFFERED, FILE_ANY_ACCESS)
     91 
     92 #define IOCTL_VIDEO_GET_CHILD_STATE \
     93   CTL_CODE(FILE_DEVICE_VIDEO, 0x120, METHOD_BUFFERED, FILE_ANY_ACCESS)
     94 
     95 #define IOCTL_VIDEO_GET_POWER_MANAGEMENT \
     96   CTL_CODE(FILE_DEVICE_VIDEO, 0x11c, METHOD_BUFFERED, FILE_ANY_ACCESS)
     97 
     98 #define IOCTL_VIDEO_LOAD_AND_SET_FONT \
     99   CTL_CODE(FILE_DEVICE_VIDEO, 0x105, METHOD_BUFFERED, FILE_ANY_ACCESS)
    100 
    101 #define IOCTL_VIDEO_MAP_VIDEO_MEMORY \
    102   CTL_CODE(FILE_DEVICE_VIDEO, 0x116, METHOD_BUFFERED, FILE_ANY_ACCESS)
    103 
    104 #define IOCTL_VIDEO_QUERY_AVAIL_MODES \
    105   CTL_CODE(FILE_DEVICE_VIDEO, 0x100, METHOD_BUFFERED, FILE_ANY_ACCESS)
    106 
    107 #define IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES \
    108   CTL_CODE(FILE_DEVICE_VIDEO, 0x11a, METHOD_BUFFERED, FILE_ANY_ACCESS)
    109 
    110 #define IOCTL_VIDEO_QUERY_CURRENT_MODE \
    111   CTL_CODE(FILE_DEVICE_VIDEO, 0x102, METHOD_BUFFERED, FILE_ANY_ACCESS)
    112 
    113 #define IOCTL_VIDEO_QUERY_CURSOR_ATTR \
    114   CTL_CODE(FILE_DEVICE_VIDEO, 0x10b, METHOD_BUFFERED, FILE_ANY_ACCESS)
    115 
    116 #define IOCTL_VIDEO_QUERY_CURSOR_POSITION \
    117   CTL_CODE(FILE_DEVICE_VIDEO, 0x10d, METHOD_BUFFERED, FILE_ANY_ACCESS)
    118 
    119 #define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES \
    120   CTL_CODE(FILE_DEVICE_VIDEO, 0x101, METHOD_BUFFERED, FILE_ANY_ACCESS)
    121 
    122 #define IOCTL_VIDEO_QUERY_POINTER_ATTR \
    123   CTL_CODE(FILE_DEVICE_VIDEO, 0x111, METHOD_BUFFERED, FILE_ANY_ACCESS)
    124 
    125 #define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES \
    126   CTL_CODE(FILE_DEVICE_VIDEO, 0x114, METHOD_BUFFERED, FILE_ANY_ACCESS)
    127 
    128 #define IOCTL_VIDEO_QUERY_POINTER_POSITION \
    129   CTL_CODE(FILE_DEVICE_VIDEO, 0x113, METHOD_BUFFERED, FILE_ANY_ACCESS)
    130 
    131 #define IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES \
    132   CTL_CODE(FILE_DEVICE_VIDEO, 0x118, METHOD_BUFFERED, FILE_ANY_ACCESS)
    133 
    134 #define IOCTL_VIDEO_RESET_DEVICE \
    135   CTL_CODE(FILE_DEVICE_VIDEO, 0x104, METHOD_BUFFERED, FILE_ANY_ACCESS)
    136 
    137 #define IOCTL_VIDEO_RESTORE_HARDWARE_STATE \
    138   CTL_CODE(FILE_DEVICE_VIDEO, 0x81, METHOD_BUFFERED, FILE_ANY_ACCESS)
    139 
    140 #define IOCTL_VIDEO_SAVE_HARDWARE_STATE \
    141   CTL_CODE(FILE_DEVICE_VIDEO, 0x80, METHOD_BUFFERED, FILE_ANY_ACCESS)
    142 
    143 #define IOCTL_VIDEO_SET_CHILD_STATE_CONFIGURATION \
    144   CTL_CODE(FILE_DEVICE_VIDEO, 0x122, METHOD_BUFFERED, FILE_ANY_ACCESS)
    145 
    146 #define IOCTL_VIDEO_SET_COLOR_REGISTERS \
    147   CTL_CODE(FILE_DEVICE_VIDEO, 0x107, METHOD_BUFFERED, FILE_ANY_ACCESS)
    148 
    149 #define IOCTL_VIDEO_SET_CURRENT_MODE \
    150   CTL_CODE(FILE_DEVICE_VIDEO, 0x103, METHOD_BUFFERED, FILE_ANY_ACCESS)
    151 
    152 #define IOCTL_VIDEO_SET_CURSOR_ATTR \
    153   CTL_CODE(FILE_DEVICE_VIDEO, 0x10a, METHOD_BUFFERED, FILE_ANY_ACCESS)
    154 
    155 #define IOCTL_VIDEO_SET_CURSOR_POSITION \
    156   CTL_CODE(FILE_DEVICE_VIDEO, 0x10c, METHOD_BUFFERED, FILE_ANY_ACCESS)
    157 
    158 #define IOCTL_VIDEO_SET_PALETTE_REGISTERS \
    159   CTL_CODE(FILE_DEVICE_VIDEO, 0x106, METHOD_BUFFERED, FILE_ANY_ACCESS)
    160 
    161 #define IOCTL_VIDEO_SET_POINTER_ATTR \
    162   CTL_CODE(FILE_DEVICE_VIDEO, 0x110, METHOD_BUFFERED, FILE_ANY_ACCESS)
    163 
    164 #define IOCTL_VIDEO_SET_POINTER_POSITION \
    165   CTL_CODE(FILE_DEVICE_VIDEO, 0x112, METHOD_BUFFERED, FILE_ANY_ACCESS)
    166 
    167 #define IOCTL_VIDEO_SET_POWER_MANAGEMENT \
    168   CTL_CODE(FILE_DEVICE_VIDEO, 0x11b, METHOD_BUFFERED, FILE_ANY_ACCESS)
    169 
    170 #define IOCTL_VIDEO_SHARE_VIDEO_MEMORY \
    171   CTL_CODE(FILE_DEVICE_VIDEO, 0x11d, METHOD_BUFFERED, FILE_ANY_ACCESS)
    172 
    173 #define IOCTL_VIDEO_SWITCH_DUALVIEW \
    174   CTL_CODE(FILE_DEVICE_VIDEO, 0x123, METHOD_BUFFERED, FILE_ANY_ACCESS)
    175 
    176 #define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY \
    177   CTL_CODE(FILE_DEVICE_VIDEO, 0x117, METHOD_BUFFERED, FILE_ANY_ACCESS)
    178 
    179 #define IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY \
    180   CTL_CODE(FILE_DEVICE_VIDEO, 0x11e, METHOD_BUFFERED, FILE_ANY_ACCESS)
    181 
    182 #define IOCTL_VIDEO_VALIDATE_CHILD_STATE_CONFIGURATION \
    183   CTL_CODE(FILE_DEVICE_VIDEO, 0x121, METHOD_BUFFERED, FILE_ANY_ACCESS)
    184 
    185 #define IOCTL_VIDEO_QUERY_SUPPORTED_BRIGHTNESS \
    186     CTL_CODE(FILE_DEVICE_VIDEO, 0x125, METHOD_BUFFERED, FILE_ANY_ACCESS)
    187 
    188 #define IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS \
    189     CTL_CODE(FILE_DEVICE_VIDEO, 0x126, METHOD_BUFFERED, FILE_ANY_ACCESS)
    190 
    191 #define IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS \
    192     CTL_CODE(FILE_DEVICE_VIDEO, 0x127, METHOD_BUFFERED, FILE_ANY_ACCESS)
    193 
    194 typedef struct _VIDEO_MEMORY {
    195   PVOID  RequestedVirtualAddress;
    196 } VIDEO_MEMORY, *PVIDEO_MEMORY;
    197 
    198 typedef struct _VIDEO_MEMORY_INFORMATION {
    199   PVOID  VideoRamBase;
    200   ULONG  VideoRamLength;
    201   PVOID  FrameBufferBase;
    202   ULONG  FrameBufferLength;
    203 } VIDEO_MEMORY_INFORMATION, *PVIDEO_MEMORY_INFORMATION;
    204 
    205 /* VIDEO_MODE.RequestedMode */
    206 #define VIDEO_MODE_MAP_MEM_LINEAR         0x40000000
    207 #define VIDEO_MODE_NO_ZERO_MEMORY         0x80000000
    208 
    209 typedef struct _VIDEO_MODE {
    210   ULONG  RequestedMode;
    211 } VIDEO_MODE, *PVIDEO_MODE;
    212 
    213 /* VIDEO_MODE_INFORMATION.AttributeFlags */
    214 #define VIDEO_MODE_COLOR                  0x0001
    215 #define VIDEO_MODE_GRAPHICS               0x0002
    216 #define VIDEO_MODE_PALETTE_DRIVEN         0x0004
    217 #define VIDEO_MODE_MANAGED_PALETTE        0x0008
    218 #define VIDEO_MODE_INTERLACED             0x0010
    219 #define VIDEO_MODE_NO_OFF_SCREEN          0x0020
    220 #define VIDEO_MODE_NO_64_BIT_ACCESS       0x0040
    221 #define VIDEO_MODE_BANKED                 0x0080
    222 #define VIDEO_MODE_LINEAR                 0x0100
    223 
    224 typedef struct _VIDEO_MODE_INFORMATION {
    225   ULONG  Length;
    226   ULONG  ModeIndex;
    227   ULONG  VisScreenWidth;
    228   ULONG  VisScreenHeight;
    229   ULONG  ScreenStride;
    230   ULONG  NumberOfPlanes;
    231   ULONG  BitsPerPlane;
    232   ULONG  Frequency;
    233   ULONG  XMillimeter;
    234   ULONG  YMillimeter;
    235   ULONG  NumberRedBits;
    236   ULONG  NumberGreenBits;
    237   ULONG  NumberBlueBits;
    238   ULONG  RedMask;
    239   ULONG  GreenMask;
    240   ULONG  BlueMask;
    241   ULONG  AttributeFlags;
    242   ULONG  VideoMemoryBitmapWidth;
    243   ULONG  VideoMemoryBitmapHeight;
    244   ULONG  DriverSpecificAttributeFlags;
    245 } VIDEO_MODE_INFORMATION, *PVIDEO_MODE_INFORMATION;
    246 
    247 typedef struct _VIDEO_NUM_MODES {
    248   ULONG  NumModes;
    249   ULONG  ModeInformationLength;
    250 } VIDEO_NUM_MODES, *PVIDEO_NUM_MODES;
    251 
    252 typedef enum _VIDEO_POWER_STATE {
    253   VideoPowerUnspecified = 0,
    254   VideoPowerOn = 1,
    255   VideoPowerStandBy,
    256   VideoPowerSuspend,
    257   VideoPowerOff,
    258   VideoPowerHibernate,
    259   VideoPowerShutdown,
    260   VideoPowerMaximum
    261 } VIDEO_POWER_STATE, *PVIDEO_POWER_STATE;
    262 
    263 typedef struct _VIDEO_POWER_MANAGEMENT {
    264   ULONG  Length;
    265   ULONG  DPMSVersion;
    266   ULONG  PowerState;
    267 } VIDEO_POWER_MANAGEMENT, *PVIDEO_POWER_MANAGEMENT;
    268 
    269 typedef struct _VIDEO_PUBLIC_ACCESS_RANGES {
    270   ULONG  InIoSpace;
    271   ULONG  MappedInIoSpace;
    272   PVOID  VirtualAddress;
    273 } VIDEO_PUBLIC_ACCESS_RANGES, *PVIDEO_PUBLIC_ACCESS_RANGES;
    274 
    275 typedef struct _VIDEO_SHARE_MEMORY {
    276   HANDLE  ProcessHandle;
    277   ULONG  ViewOffset;
    278   ULONG  ViewSize;
    279   PVOID  RequestedVirtualAddress;
    280 } VIDEO_SHARE_MEMORY, *PVIDEO_SHARE_MEMORY;
    281 
    282 typedef struct _VIDEO_SHARE_MEMORY_INFORMATION {
    283   ULONG  SharedViewOffset;
    284   ULONG  SharedViewSize;
    285   PVOID  VirtualAddress;
    286 } VIDEO_SHARE_MEMORY_INFORMATION, *PVIDEO_SHARE_MEMORY_INFORMATION;
    287 
    288 /* VIDEO_BANK_SELECT.BankingFlags constants */
    289 #define PLANAR_HC                         0x00000001
    290 
    291 /* VIDEO_BANK_SELECT.BankingType and PlanarHCBankingType constants */
    292 typedef enum _VIDEO_BANK_TYPE {
    293   VideoNotBanked = 0,
    294   VideoBanked1RW,
    295   VideoBanked1R1W,
    296   VideoBanked2RW,
    297   NumVideoBankTypes
    298 } VIDEO_BANK_TYPE, *PVIDEO_BANK_TYPE;
    299 
    300 typedef struct _VIDEO_BANK_SELECT {
    301   ULONG  Length;
    302   ULONG  Size;
    303   ULONG  BankingFlags;
    304   ULONG  BankingType;
    305   ULONG  PlanarHCBankingType;
    306   ULONG  BitmapWidthInBytes;
    307   ULONG  BitmapSize;
    308   ULONG  Granularity;
    309   ULONG  PlanarHCGranularity;
    310   ULONG  CodeOffset;
    311   ULONG  PlanarHCBankCodeOffset;
    312   ULONG  PlanarHCEnableCodeOffset;
    313   ULONG  PlanarHCDisableCodeOffset;
    314 } VIDEO_BANK_SELECT, *PVIDEO_BANK_SELECT;
    315 
    316 typedef struct _VIDEO_LOAD_FONT_INFORMATION {
    317   USHORT  WidthInPixels;
    318   USHORT  HeightInPixels;
    319   ULONG  FontSize;
    320   UCHAR  Font[1];
    321 } VIDEO_LOAD_FONT_INFORMATION, *PVIDEO_LOAD_FONT_INFORMATION;
    322 
    323 /* VIDEO_COLOR_CAPABILITIES.AttributeFlags constants */
    324 #define VIDEO_DEVICE_COLOR                0x00000001
    325 #define VIDEO_OPTIONAL_GAMMET_TABLE       0x00000002
    326 
    327 typedef struct _VIDEO_COLOR_CAPABILITIES {
    328   ULONG  Length;
    329   ULONG  AttributeFlags;
    330   LONG  RedPhosphoreDecay;
    331   LONG  GreenPhosphoreDecay;
    332   LONG  BluePhosphoreDecay;
    333   LONG  WhiteChromaticity_x;
    334   LONG  WhiteChromaticity_y;
    335   LONG  WhiteChromaticity_Y;
    336   LONG  RedChromaticity_x;
    337   LONG  RedChromaticity_y;
    338   LONG  GreenChromaticity_x;
    339   LONG  GreenChromaticity_y;
    340   LONG  BlueChromaticity_x;
    341   LONG  BlueChromaticity_y;
    342   LONG  WhiteGamma;
    343   LONG  RedGamma;
    344   LONG  GreenGamma;
    345   LONG  BlueGamma;
    346 } VIDEO_COLOR_CAPABILITIES, *PVIDEO_COLOR_CAPABILITIES;
    347 
    348 typedef struct _VIDEO_CURSOR_ATTRIBUTES {
    349   USHORT  Width;
    350   USHORT  Height;
    351   SHORT  Column;
    352   SHORT  Row;
    353   UCHAR  Rate;
    354   UCHAR  Enable;
    355 } VIDEO_CURSOR_ATTRIBUTES, *PVIDEO_CURSOR_ATTRIBUTES;
    356 
    357 typedef struct _VIDEO_CURSOR_POSITION {
    358   SHORT  Column;
    359   SHORT  Row;
    360 } VIDEO_CURSOR_POSITION, *PVIDEO_CURSOR_POSITION;
    361 
    362 typedef struct _VIDEO_POINTER_ATTRIBUTES {
    363   ULONG  Flags;
    364   ULONG  Width;
    365   ULONG  Height;
    366   ULONG  WidthInBytes;
    367   ULONG  Enable;
    368   SHORT  Column;
    369   SHORT  Row;
    370   UCHAR  Pixels[1];
    371 } VIDEO_POINTER_ATTRIBUTES, *PVIDEO_POINTER_ATTRIBUTES;
    372 
    373 /* VIDEO_POINTER_CAPABILITIES.Flags */
    374 #define VIDEO_MODE_ASYNC_POINTER          0x01
    375 #define VIDEO_MODE_MONO_POINTER           0x02
    376 #define VIDEO_MODE_COLOR_POINTER          0x04
    377 #define VIDEO_MODE_ANIMATE_START          0x08
    378 #define VIDEO_MODE_ANIMATE_UPDATE         0x10
    379 
    380 typedef struct _VIDEO_POINTER_CAPABILITIES {
    381   ULONG  Flags;
    382   ULONG  MaxWidth;
    383   ULONG  MaxHeight;
    384   ULONG  HWPtrBitmapStart;
    385   ULONG  HWPtrBitmapEnd;
    386 } VIDEO_POINTER_CAPABILITIES, *PVIDEO_POINTER_CAPABILITIES;
    387 
    388 typedef struct _VIDEO_POINTER_POSITION {
    389   SHORT  Column;
    390   SHORT  Row;
    391 } VIDEO_POINTER_POSITION, *PVIDEO_POINTER_POSITION;
    392 
    393 
    394 /* VIDEO_HARDWARE_STATE_HEADER.VGAStateFlags constants */
    395 #define VIDEO_STATE_NON_STANDARD_VGA      0x00000001
    396 #define VIDEO_STATE_UNEMULATED_VGA_STATE  0x00000002
    397 #define VIDEO_STATE_PACKED_CHAIN4_MODE    0x00000004
    398 
    399 typedef struct _VIDEO_HARDWARE_STATE_HEADER {
    400   ULONG  Length;
    401   UCHAR  PortValue[0x30];
    402   ULONG  AttribIndexDataState;
    403   ULONG  BasicSequencerOffset;
    404   ULONG  BasicCrtContOffset;
    405   ULONG  BasicGraphContOffset;
    406   ULONG  BasicAttribContOffset;
    407   ULONG  BasicDacOffset;
    408   ULONG  BasicLatchesOffset;
    409   ULONG  ExtendedSequencerOffset;
    410   ULONG  ExtendedCrtContOffset;
    411   ULONG  ExtendedGraphContOffset;
    412   ULONG  ExtendedAttribContOffset;
    413   ULONG  ExtendedDacOffset;
    414   ULONG  ExtendedValidatorStateOffset;
    415   ULONG  ExtendedMiscDataOffset;
    416   ULONG  PlaneLength;
    417   ULONG  Plane1Offset;
    418   ULONG  Plane2Offset;
    419   ULONG  Plane3Offset;
    420   ULONG  Plane4Offset;
    421   ULONG  VGAStateFlags;
    422   ULONG  DIBOffset;
    423   ULONG  DIBBitsPerPixel;
    424   ULONG  DIBXResolution;
    425   ULONG  DIBYResolution;
    426   ULONG  DIBXlatOffset;
    427   ULONG  DIBXlatLength;
    428   ULONG  VesaInfoOffset;
    429   PVOID  FrameBufferData;
    430 } VIDEO_HARDWARE_STATE_HEADER, *PVIDEO_HARDWARE_STATE_HEADER;
    431 
    432 typedef struct _VIDEO_CLUTDATA {
    433   UCHAR  Red;
    434   UCHAR  Green;
    435   UCHAR  Blue;
    436   UCHAR  Unused;
    437 } VIDEO_CLUTDATA, *PVIDEO_CLUTDATA;
    438 
    439 typedef struct {
    440 	USHORT  NumEntries;
    441 	USHORT  FirstEntry;
    442 	union {
    443 		VIDEO_CLUTDATA  RgbArray;
    444 		ULONG  RgbLong;
    445 	} LookupTable[1];
    446 } VIDEO_CLUT, *PVIDEO_CLUT;
    447 
    448 typedef struct _VIDEO_PALETTE_DATA {
    449   USHORT  NumEntries;
    450   USHORT  FirstEntry;
    451   USHORT  Colors[1];
    452 } VIDEO_PALETTE_DATA, *PVIDEO_PALETTE_DATA;
    453 
    454 typedef struct _VIDEO_HARDWARE_STATE {
    455 	PVIDEO_HARDWARE_STATE_HEADER  StateHeader;
    456 	ULONG  StateLength;
    457 } VIDEO_HARDWARE_STATE, *PVIDEO_HARDWARE_STATE;
    458 
    459 #define VIDEO_CHILD_ACTIVE                0x00000001
    460 #define VIDEO_CHILD_DETACHED              0x00000002
    461 #define VIDEO_CHILD_NOPRUNE_FREQ          0x80000000
    462 #define VIDEO_CHILD_NOPRUNE_RESOLUTION    0x40000000
    463 
    464 #define VIDEO_DUALVIEW_REMOVABLE          0x00000001
    465 #define VIDEO_DUALVIEW_PRIMARY            0x80000000
    466 #define VIDEO_DUALVIEW_SECONDARY          0x40000000
    467 
    468 #ifndef _WINDDI_
    469 typedef struct _ENG_EVENT *PEVENT;
    470 #endif
    471 
    472 typedef struct _ENG_EVENT {
    473     PVOID pKEvent;
    474     ULONG fFlags;
    475 } ENG_EVENT, *PENG_EVENT;
    476 
    477 typedef struct _DISPLAY_BRIGHTNESS {
    478   UCHAR ucDisplayPolicy;
    479   UCHAR ucACBrightness;
    480   UCHAR ucDCBrightness;
    481 } DISPLAY_BRIGHTNESS, *PDISPLAY_BRIGHTNESS;
    482 
    483 #define DISPLAYPOLICY_AC                0x00000001
    484 #define DISPLAYPOLICY_DC                0x00000002
    485 #define DISPLAYPOLICY_BOTH              0x00000003
    486 
    487 #ifdef __cplusplus
    488 }
    489 #endif
    490 
    491 #endif /* _NTDDVDEO_ */
    492