xref: /reactos/sdk/include/psdk/ntddvdeo.h (revision f26fe3f1)
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@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 #pragma once
24 #define _NTDDVDEO_
25 
26 DEFINE_GUID(GUID_DEVINTERFACE_DISPLAY_ADAPTER, \
27   0x5b45201d, 0xf2f2, 0x4f3b, 0x85, 0xbb, 0x30, 0xff, 0x1f, 0x95, 0x35, 0x99);
28 
29 #ifndef GUID_DEFS_ONLY
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #define VIDEO_DEVICE_NAME                 "DISPLAY%d"
36 #define WVIDEO_DEVICE_NAME                L"DISPLAY%d"
37 
38 #define DD_FULLSCREEN_VIDEO_DEVICE_NAME   L"\\Device\\FSVideo"
39 
40 
41 #define IOCTL_VIDEO_ENABLE_VDM \
42   CTL_CODE(FILE_DEVICE_VIDEO, 0x00, METHOD_BUFFERED, FILE_ANY_ACCESS)
43 
44 #define IOCTL_VIDEO_DISABLE_VDM \
45   CTL_CODE(FILE_DEVICE_VIDEO, 0x01, METHOD_BUFFERED, FILE_ANY_ACCESS)
46 
47 #define IOCTL_VIDEO_REGISTER_VDM \
48   CTL_CODE(FILE_DEVICE_VIDEO, 0x02, METHOD_BUFFERED, FILE_ANY_ACCESS)
49 
50 #define IOCTL_VIDEO_SET_OUTPUT_DEVICE_POWER_STATE \
51   CTL_CODE(FILE_DEVICE_VIDEO, 0x03, METHOD_BUFFERED, FILE_ANY_ACCESS)
52 
53 #define IOCTL_VIDEO_GET_OUTPUT_DEVICE_POWER_STATE \
54   CTL_CODE(FILE_DEVICE_VIDEO, 0x04, METHOD_BUFFERED, FILE_ANY_ACCESS)
55 
56 #define IOCTL_VIDEO_MONITOR_DEVICE \
57   CTL_CODE(FILE_DEVICE_VIDEO, 0x05, METHOD_BUFFERED, FILE_ANY_ACCESS)
58 
59 #define IOCTL_VIDEO_ENUM_MONITOR_PDO \
60   CTL_CODE(FILE_DEVICE_VIDEO, 0x06, METHOD_BUFFERED, FILE_ANY_ACCESS)
61 
62 #define IOCTL_VIDEO_INIT_WIN32K_CALLBACKS \
63   CTL_CODE(FILE_DEVICE_VIDEO, 0x07, METHOD_BUFFERED, FILE_ANY_ACCESS)
64 
65 #define IOCTL_VIDEO_HANDLE_VIDEOPARAMETERS \
66   CTL_CODE(FILE_DEVICE_VIDEO, 0x08, METHOD_BUFFERED, FILE_ANY_ACCESS)
67 
68 #define IOCTL_VIDEO_IS_VGA_DEVICE \
69   CTL_CODE(FILE_DEVICE_VIDEO, 0x09, METHOD_BUFFERED, FILE_ANY_ACCESS)
70 
71 #define IOCTL_VIDEO_USE_DEVICE_IN_SESSION \
72   CTL_CODE(FILE_DEVICE_VIDEO, 0x0a, METHOD_BUFFERED, FILE_ANY_ACCESS)
73 
74 #define IOCTL_VIDEO_PREPARE_FOR_EARECOVERY \
75   CTL_CODE(FILE_DEVICE_VIDEO, 0x0b, METHOD_BUFFERED, FILE_ANY_ACCESS)
76 
77 #define IOCTL_VIDEO_DISABLE_CURSOR \
78   CTL_CODE(FILE_DEVICE_VIDEO, 0x109, METHOD_BUFFERED, FILE_ANY_ACCESS)
79 
80 #define IOCTL_VIDEO_DISABLE_POINTER \
81   CTL_CODE(FILE_DEVICE_VIDEO, 0x10f, METHOD_BUFFERED, FILE_ANY_ACCESS)
82 
83 #define IOCTL_VIDEO_ENABLE_CURSOR \
84   CTL_CODE(FILE_DEVICE_VIDEO, 0x108, METHOD_BUFFERED, FILE_ANY_ACCESS)
85 
86 #define IOCTL_VIDEO_ENABLE_POINTER \
87   CTL_CODE(FILE_DEVICE_VIDEO, 0x10e, METHOD_BUFFERED, FILE_ANY_ACCESS)
88 
89 #define IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES \
90   CTL_CODE(FILE_DEVICE_VIDEO, 0x119, METHOD_BUFFERED, FILE_ANY_ACCESS)
91 
92 #define IOCTL_VIDEO_GET_BANK_SELECT_CODE \
93   CTL_CODE(FILE_DEVICE_VIDEO, 0x115, METHOD_BUFFERED, FILE_ANY_ACCESS)
94 
95 #define IOCTL_VIDEO_GET_CHILD_STATE \
96   CTL_CODE(FILE_DEVICE_VIDEO, 0x120, METHOD_BUFFERED, FILE_ANY_ACCESS)
97 
98 #define IOCTL_VIDEO_GET_POWER_MANAGEMENT \
99   CTL_CODE(FILE_DEVICE_VIDEO, 0x11c, METHOD_BUFFERED, FILE_ANY_ACCESS)
100 
101 #define IOCTL_VIDEO_LOAD_AND_SET_FONT \
102   CTL_CODE(FILE_DEVICE_VIDEO, 0x105, METHOD_BUFFERED, FILE_ANY_ACCESS)
103 
104 #define IOCTL_VIDEO_MAP_VIDEO_MEMORY \
105   CTL_CODE(FILE_DEVICE_VIDEO, 0x116, METHOD_BUFFERED, FILE_ANY_ACCESS)
106 
107 #define IOCTL_VIDEO_QUERY_AVAIL_MODES \
108   CTL_CODE(FILE_DEVICE_VIDEO, 0x100, METHOD_BUFFERED, FILE_ANY_ACCESS)
109 
110 #define IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES \
111   CTL_CODE(FILE_DEVICE_VIDEO, 0x11a, METHOD_BUFFERED, FILE_ANY_ACCESS)
112 
113 #define IOCTL_VIDEO_QUERY_CURRENT_MODE \
114   CTL_CODE(FILE_DEVICE_VIDEO, 0x102, METHOD_BUFFERED, FILE_ANY_ACCESS)
115 
116 #define IOCTL_VIDEO_QUERY_CURSOR_ATTR \
117   CTL_CODE(FILE_DEVICE_VIDEO, 0x10b, METHOD_BUFFERED, FILE_ANY_ACCESS)
118 
119 #define IOCTL_VIDEO_QUERY_CURSOR_POSITION \
120   CTL_CODE(FILE_DEVICE_VIDEO, 0x10d, METHOD_BUFFERED, FILE_ANY_ACCESS)
121 
122 #define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES \
123   CTL_CODE(FILE_DEVICE_VIDEO, 0x101, METHOD_BUFFERED, FILE_ANY_ACCESS)
124 
125 #define IOCTL_VIDEO_QUERY_POINTER_ATTR \
126   CTL_CODE(FILE_DEVICE_VIDEO, 0x111, METHOD_BUFFERED, FILE_ANY_ACCESS)
127 
128 #define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES \
129   CTL_CODE(FILE_DEVICE_VIDEO, 0x114, METHOD_BUFFERED, FILE_ANY_ACCESS)
130 
131 #define IOCTL_VIDEO_QUERY_POINTER_POSITION \
132   CTL_CODE(FILE_DEVICE_VIDEO, 0x113, METHOD_BUFFERED, FILE_ANY_ACCESS)
133 
134 #define IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES \
135   CTL_CODE(FILE_DEVICE_VIDEO, 0x118, METHOD_BUFFERED, FILE_ANY_ACCESS)
136 
137 #define IOCTL_VIDEO_RESET_DEVICE \
138   CTL_CODE(FILE_DEVICE_VIDEO, 0x104, METHOD_BUFFERED, FILE_ANY_ACCESS)
139 
140 #define IOCTL_VIDEO_RESTORE_HARDWARE_STATE \
141   CTL_CODE(FILE_DEVICE_VIDEO, 0x81, METHOD_BUFFERED, FILE_ANY_ACCESS)
142 
143 #define IOCTL_VIDEO_SAVE_HARDWARE_STATE \
144   CTL_CODE(FILE_DEVICE_VIDEO, 0x80, METHOD_BUFFERED, FILE_ANY_ACCESS)
145 
146 #define IOCTL_VIDEO_SET_CHILD_STATE_CONFIGURATION \
147   CTL_CODE(FILE_DEVICE_VIDEO, 0x122, METHOD_BUFFERED, FILE_ANY_ACCESS)
148 
149 #define IOCTL_VIDEO_SET_COLOR_REGISTERS \
150   CTL_CODE(FILE_DEVICE_VIDEO, 0x107, METHOD_BUFFERED, FILE_ANY_ACCESS)
151 
152 #define IOCTL_VIDEO_SET_CURRENT_MODE \
153   CTL_CODE(FILE_DEVICE_VIDEO, 0x103, METHOD_BUFFERED, FILE_ANY_ACCESS)
154 
155 #define IOCTL_VIDEO_SET_CURSOR_ATTR \
156   CTL_CODE(FILE_DEVICE_VIDEO, 0x10a, METHOD_BUFFERED, FILE_ANY_ACCESS)
157 
158 #define IOCTL_VIDEO_SET_CURSOR_POSITION \
159   CTL_CODE(FILE_DEVICE_VIDEO, 0x10c, METHOD_BUFFERED, FILE_ANY_ACCESS)
160 
161 #define IOCTL_VIDEO_SET_PALETTE_REGISTERS \
162   CTL_CODE(FILE_DEVICE_VIDEO, 0x106, METHOD_BUFFERED, FILE_ANY_ACCESS)
163 
164 #define IOCTL_VIDEO_SET_POINTER_ATTR \
165   CTL_CODE(FILE_DEVICE_VIDEO, 0x110, METHOD_BUFFERED, FILE_ANY_ACCESS)
166 
167 #define IOCTL_VIDEO_SET_POINTER_POSITION \
168   CTL_CODE(FILE_DEVICE_VIDEO, 0x112, METHOD_BUFFERED, FILE_ANY_ACCESS)
169 
170 #define IOCTL_VIDEO_SET_POWER_MANAGEMENT \
171   CTL_CODE(FILE_DEVICE_VIDEO, 0x11b, METHOD_BUFFERED, FILE_ANY_ACCESS)
172 
173 #define IOCTL_VIDEO_SHARE_VIDEO_MEMORY \
174   CTL_CODE(FILE_DEVICE_VIDEO, 0x11d, METHOD_BUFFERED, FILE_ANY_ACCESS)
175 
176 #define IOCTL_VIDEO_SWITCH_DUALVIEW \
177   CTL_CODE(FILE_DEVICE_VIDEO, 0x123, METHOD_BUFFERED, FILE_ANY_ACCESS)
178 
179 #define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY \
180   CTL_CODE(FILE_DEVICE_VIDEO, 0x117, METHOD_BUFFERED, FILE_ANY_ACCESS)
181 
182 #define IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY \
183   CTL_CODE(FILE_DEVICE_VIDEO, 0x11e, METHOD_BUFFERED, FILE_ANY_ACCESS)
184 
185 #define IOCTL_VIDEO_SET_COLOR_LUT_DATA \
186   CTL_CODE(FILE_DEVICE_VIDEO, 0x11f, METHOD_BUFFERED, FILE_ANY_ACCESS)
187 
188 #define IOCTL_VIDEO_VALIDATE_CHILD_STATE_CONFIGURATION \
189   CTL_CODE(FILE_DEVICE_VIDEO, 0x121, METHOD_BUFFERED, FILE_ANY_ACCESS)
190 
191 #define IOCTL_VIDEO_SET_BANK_POSITION \
192   CTL_CODE(FILE_DEVICE_VIDEO, 0x124, METHOD_BUFFERED, FILE_ANY_ACCESS)
193 
194 #define IOCTL_VIDEO_QUERY_SUPPORTED_BRIGHTNESS \
195   CTL_CODE(FILE_DEVICE_VIDEO, 0x125, METHOD_BUFFERED, FILE_ANY_ACCESS)
196 
197 #define IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS \
198   CTL_CODE(FILE_DEVICE_VIDEO, 0x126, METHOD_BUFFERED, FILE_ANY_ACCESS)
199 
200 #define IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS \
201   CTL_CODE(FILE_DEVICE_VIDEO, 0x127, METHOD_BUFFERED, FILE_ANY_ACCESS)
202 
203 typedef struct _VIDEO_VDM {
204   HANDLE ProcessHandle;
205 } VIDEO_VDM, *PVIDEO_VDM;
206 
207 typedef struct _VIDEO_REGISTER_VDM {
208   ULONG MinimumStateSize;
209 } VIDEO_REGISTER_VDM, *PVIDEO_REGISTER_VDM;
210 
211 typedef struct tagVIDEO_MONITOR_DEVICE {
212   ULONG flag;
213   HANDLE pdo;
214   ULONG HwID;
215   BOOLEAN Internal;
216 } VIDEO_MONITOR_DEVICE, *PVIDEO_MONITOR_DEVICE;
217 
218 typedef struct tagVIDEO_MONITOR_DESCRIPTOR {
219   ULONG DescriptorSize;
220   UCHAR Descriptor[1];
221 } VIDEO_MONITOR_DESCRIPTOR, *PVIDEO_MONITOR_DESCRIPTOR;
222 
223 typedef enum _VIDEO_WIN32K_CALLBACKS_PARAMS_TYPE {
224   VideoPowerNotifyCallout = 1,
225   VideoDisplaySwitchCallout,
226   VideoEnumChildPdoNotifyCallout,
227   VideoFindAdapterCallout,
228   VideoWakeupCallout,
229   VideoChangeDisplaySettingsCallout,
230   VideoPnpNotifyCallout,
231   VideoDxgkDisplaySwitchCallout,
232   VideoDxgkMonitorEventCallout,
233   VideoDxgkFindAdapterTdrCallout
234 } VIDEO_WIN32K_CALLBACKS_PARAMS_TYPE;
235 
236 #define DXGK_WIN32K_PARAM_FLAG_UPDATEREGISTRY 1
237 #define DXGK_WIN32K_PARAM_FLAG_MODESWITCH 2
238 #define DXGK_WIN32K_PARAM_FLAG_DISABLEVIEW 4
239 
240 typedef struct _DXGK_WIN32K_PARAM_DATA
241 {
242   PVOID PathsArray;
243   PVOID ModesArray;
244   ULONG NumPathArrayElements;
245   ULONG NumModeArrayElements;
246   ULONG SDCFlags;
247 } DXGK_WIN32K_PARAM_DATA, *PDXGK_WIN32K_PARAM_DATA;
248 
249 typedef struct _VIDEO_WIN32K_CALLBACKS_PARAMS {
250   VIDEO_WIN32K_CALLBACKS_PARAMS_TYPE CalloutType;
251   PVOID PhysDisp;
252   ULONG_PTR Param;
253   LONG Status;
254 } VIDEO_WIN32K_CALLBACKS_PARAMS, *PVIDEO_WIN32K_CALLBACKS_PARAMS;
255 
256 typedef
257 VOID
258 (NTAPI *PVIDEO_WIN32K_CALLOUT)(
259   _In_ PVOID Params);
260 
261 typedef struct _VIDEO_WIN32K_CALLBACKS {
262   IN  PVOID PhysDisp;
263   IN  PVIDEO_WIN32K_CALLOUT Callout;
264   OUT ULONG bACPI;
265   OUT HANDLE pPhysDeviceObject;
266   OUT ULONG DualviewFlags;
267 } VIDEO_WIN32K_CALLBACKS, *PVIDEO_WIN32K_CALLBACKS;
268 
269 typedef struct _VIDEO_DEVICE_SESSION_STATUS {
270   ULONG bEnable;
271   ULONG bSuccess;
272 } VIDEO_DEVICE_SESSION_STATUS, *PVIDEO_DEVICE_SESSION_STATUS;
273 
274 typedef struct _VIDEO_MEMORY {
275   PVOID RequestedVirtualAddress;
276 } VIDEO_MEMORY, *PVIDEO_MEMORY;
277 
278 typedef struct _VIDEO_MEMORY_INFORMATION {
279   PVOID  VideoRamBase;
280   ULONG  VideoRamLength;
281   PVOID  FrameBufferBase;
282   ULONG  FrameBufferLength;
283 } VIDEO_MEMORY_INFORMATION, *PVIDEO_MEMORY_INFORMATION;
284 
285 /* VIDEO_MODE.RequestedMode */
286 #define VIDEO_MODE_MAP_MEM_LINEAR         0x40000000
287 #define VIDEO_MODE_NO_ZERO_MEMORY         0x80000000
288 
289 typedef struct _VIDEO_MODE {
290   ULONG  RequestedMode;
291 } VIDEO_MODE, *PVIDEO_MODE;
292 
293 /* VIDEO_MODE_INFORMATION.AttributeFlags */
294 #define VIDEO_MODE_COLOR                  0x0001
295 #define VIDEO_MODE_GRAPHICS               0x0002
296 #define VIDEO_MODE_PALETTE_DRIVEN         0x0004
297 #define VIDEO_MODE_MANAGED_PALETTE        0x0008
298 #define VIDEO_MODE_INTERLACED             0x0010
299 #define VIDEO_MODE_NO_OFF_SCREEN          0x0020
300 #define VIDEO_MODE_NO_64_BIT_ACCESS       0x0040
301 #define VIDEO_MODE_BANKED                 0x0080
302 #define VIDEO_MODE_LINEAR                 0x0100
303 
304 typedef struct _VIDEO_MODE_INFORMATION {
305   ULONG  Length;
306   ULONG  ModeIndex;
307   ULONG  VisScreenWidth;
308   ULONG  VisScreenHeight;
309   ULONG  ScreenStride;
310   ULONG  NumberOfPlanes;
311   ULONG  BitsPerPlane;
312   ULONG  Frequency;
313   ULONG  XMillimeter;
314   ULONG  YMillimeter;
315   ULONG  NumberRedBits;
316   ULONG  NumberGreenBits;
317   ULONG  NumberBlueBits;
318   ULONG  RedMask;
319   ULONG  GreenMask;
320   ULONG  BlueMask;
321   ULONG  AttributeFlags;
322   ULONG  VideoMemoryBitmapWidth;
323   ULONG  VideoMemoryBitmapHeight;
324   ULONG  DriverSpecificAttributeFlags;
325 } VIDEO_MODE_INFORMATION, *PVIDEO_MODE_INFORMATION;
326 
327 typedef struct _VIDEO_NUM_MODES {
328   ULONG  NumModes;
329   ULONG  ModeInformationLength;
330 } VIDEO_NUM_MODES, *PVIDEO_NUM_MODES;
331 
332 typedef enum _VIDEO_POWER_STATE {
333   VideoPowerUnspecified = 0,
334   VideoPowerOn = 1,
335   VideoPowerStandBy,
336   VideoPowerSuspend,
337   VideoPowerOff,
338   VideoPowerHibernate,
339   VideoPowerShutdown,
340   VideoPowerMaximum
341 } VIDEO_POWER_STATE, *PVIDEO_POWER_STATE;
342 
343 typedef struct _VIDEO_POWER_MANAGEMENT {
344   ULONG  Length;
345   ULONG  DPMSVersion;
346   ULONG  PowerState;
347 } VIDEO_POWER_MANAGEMENT, *PVIDEO_POWER_MANAGEMENT;
348 
349 typedef struct _VIDEO_PUBLIC_ACCESS_RANGES {
350   ULONG  InIoSpace;
351   ULONG  MappedInIoSpace;
352   PVOID  VirtualAddress;
353 } VIDEO_PUBLIC_ACCESS_RANGES, *PVIDEO_PUBLIC_ACCESS_RANGES;
354 
355 typedef struct _VIDEO_SHARE_MEMORY {
356   HANDLE  ProcessHandle;
357   ULONG  ViewOffset;
358   ULONG  ViewSize;
359   PVOID  RequestedVirtualAddress;
360 } VIDEO_SHARE_MEMORY, *PVIDEO_SHARE_MEMORY;
361 
362 typedef struct _VIDEO_SHARE_MEMORY_INFORMATION {
363   ULONG  SharedViewOffset;
364   ULONG  SharedViewSize;
365   PVOID  VirtualAddress;
366 } VIDEO_SHARE_MEMORY_INFORMATION, *PVIDEO_SHARE_MEMORY_INFORMATION;
367 
368 /* VIDEO_BANK_SELECT.BankingFlags constants */
369 #define PLANAR_HC                         0x00000001
370 
371 /* VIDEO_BANK_SELECT.BankingType and PlanarHCBankingType constants */
372 typedef enum _VIDEO_BANK_TYPE {
373   VideoNotBanked = 0,
374   VideoBanked1RW,
375   VideoBanked1R1W,
376   VideoBanked2RW,
377   NumVideoBankTypes
378 } VIDEO_BANK_TYPE, *PVIDEO_BANK_TYPE;
379 
380 typedef struct _VIDEO_BANK_SELECT {
381   ULONG  Length;
382   ULONG  Size;
383   ULONG  BankingFlags;
384   ULONG  BankingType;
385   ULONG  PlanarHCBankingType;
386   ULONG  BitmapWidthInBytes;
387   ULONG  BitmapSize;
388   ULONG  Granularity;
389   ULONG  PlanarHCGranularity;
390   ULONG  CodeOffset;
391   ULONG  PlanarHCBankCodeOffset;
392   ULONG  PlanarHCEnableCodeOffset;
393   ULONG  PlanarHCDisableCodeOffset;
394 } VIDEO_BANK_SELECT, *PVIDEO_BANK_SELECT;
395 
396 typedef struct _VIDEO_LOAD_FONT_INFORMATION {
397   USHORT  WidthInPixels;
398   USHORT  HeightInPixels;
399   ULONG  FontSize;
400   UCHAR  Font[1];
401 } VIDEO_LOAD_FONT_INFORMATION, *PVIDEO_LOAD_FONT_INFORMATION;
402 
403 /* VIDEO_COLOR_CAPABILITIES.AttributeFlags constants */
404 #define VIDEO_DEVICE_COLOR                0x00000001
405 #define VIDEO_OPTIONAL_GAMMET_TABLE       0x00000002
406 
407 typedef struct _VIDEO_COLOR_CAPABILITIES {
408   ULONG  Length;
409   ULONG  AttributeFlags;
410   LONG  RedPhosphoreDecay;
411   LONG  GreenPhosphoreDecay;
412   LONG  BluePhosphoreDecay;
413   LONG  WhiteChromaticity_x;
414   LONG  WhiteChromaticity_y;
415   LONG  WhiteChromaticity_Y;
416   LONG  RedChromaticity_x;
417   LONG  RedChromaticity_y;
418   LONG  GreenChromaticity_x;
419   LONG  GreenChromaticity_y;
420   LONG  BlueChromaticity_x;
421   LONG  BlueChromaticity_y;
422   LONG  WhiteGamma;
423   LONG  RedGamma;
424   LONG  GreenGamma;
425   LONG  BlueGamma;
426 } VIDEO_COLOR_CAPABILITIES, *PVIDEO_COLOR_CAPABILITIES;
427 
428 typedef struct _VIDEO_CURSOR_ATTRIBUTES {
429   USHORT  Width;
430   USHORT  Height;
431   SHORT  Column;
432   SHORT  Row;
433   UCHAR  Rate;
434   UCHAR  Enable;
435 } VIDEO_CURSOR_ATTRIBUTES, *PVIDEO_CURSOR_ATTRIBUTES;
436 
437 typedef struct _VIDEO_CURSOR_POSITION {
438   SHORT  Column;
439   SHORT  Row;
440 } VIDEO_CURSOR_POSITION, *PVIDEO_CURSOR_POSITION;
441 
442 typedef struct _VIDEO_POINTER_ATTRIBUTES {
443   ULONG  Flags;
444   ULONG  Width;
445   ULONG  Height;
446   ULONG  WidthInBytes;
447   ULONG  Enable;
448   SHORT  Column;
449   SHORT  Row;
450   UCHAR  Pixels[1];
451 } VIDEO_POINTER_ATTRIBUTES, *PVIDEO_POINTER_ATTRIBUTES;
452 
453 /* VIDEO_POINTER_CAPABILITIES.Flags */
454 #define VIDEO_MODE_ASYNC_POINTER          0x01
455 #define VIDEO_MODE_MONO_POINTER           0x02
456 #define VIDEO_MODE_COLOR_POINTER          0x04
457 #define VIDEO_MODE_ANIMATE_START          0x08
458 #define VIDEO_MODE_ANIMATE_UPDATE         0x10
459 
460 typedef struct _VIDEO_POINTER_CAPABILITIES {
461   ULONG  Flags;
462   ULONG  MaxWidth;
463   ULONG  MaxHeight;
464   ULONG  HWPtrBitmapStart;
465   ULONG  HWPtrBitmapEnd;
466 } VIDEO_POINTER_CAPABILITIES, *PVIDEO_POINTER_CAPABILITIES;
467 
468 typedef struct _VIDEO_POINTER_POSITION {
469   SHORT  Column;
470   SHORT  Row;
471 } VIDEO_POINTER_POSITION, *PVIDEO_POINTER_POSITION;
472 
473 
474 /* VIDEO_HARDWARE_STATE_HEADER.VGAStateFlags constants */
475 #define VIDEO_STATE_NON_STANDARD_VGA      0x00000001
476 #define VIDEO_STATE_UNEMULATED_VGA_STATE  0x00000002
477 #define VIDEO_STATE_PACKED_CHAIN4_MODE    0x00000004
478 
479 typedef struct _VIDEO_HARDWARE_STATE_HEADER {
480   ULONG  Length;
481   UCHAR  PortValue[0x30];
482   ULONG  AttribIndexDataState;
483   ULONG  BasicSequencerOffset;
484   ULONG  BasicCrtContOffset;
485   ULONG  BasicGraphContOffset;
486   ULONG  BasicAttribContOffset;
487   ULONG  BasicDacOffset;
488   ULONG  BasicLatchesOffset;
489   ULONG  ExtendedSequencerOffset;
490   ULONG  ExtendedCrtContOffset;
491   ULONG  ExtendedGraphContOffset;
492   ULONG  ExtendedAttribContOffset;
493   ULONG  ExtendedDacOffset;
494   ULONG  ExtendedValidatorStateOffset;
495   ULONG  ExtendedMiscDataOffset;
496   ULONG  PlaneLength;
497   ULONG  Plane1Offset;
498   ULONG  Plane2Offset;
499   ULONG  Plane3Offset;
500   ULONG  Plane4Offset;
501   ULONG  VGAStateFlags;
502   ULONG  DIBOffset;
503   ULONG  DIBBitsPerPixel;
504   ULONG  DIBXResolution;
505   ULONG  DIBYResolution;
506   ULONG  DIBXlatOffset;
507   ULONG  DIBXlatLength;
508   ULONG  VesaInfoOffset;
509   PVOID  FrameBufferData;
510 } VIDEO_HARDWARE_STATE_HEADER, *PVIDEO_HARDWARE_STATE_HEADER;
511 
512 typedef struct _VIDEO_CLUTDATA {
513   UCHAR  Red;
514   UCHAR  Green;
515   UCHAR  Blue;
516   UCHAR  Unused;
517 } VIDEO_CLUTDATA, *PVIDEO_CLUTDATA;
518 
519 typedef struct {
520 	USHORT  NumEntries;
521 	USHORT  FirstEntry;
522 	union {
523     VIDEO_CLUTDATA  RgbArray;
524     ULONG  RgbLong;
525 	} LookupTable[1];
526 } VIDEO_CLUT, *PVIDEO_CLUT;
527 
528 typedef struct _VIDEO_PALETTE_DATA {
529   USHORT  NumEntries;
530   USHORT  FirstEntry;
531   USHORT  Colors[1];
532 } VIDEO_PALETTE_DATA, *PVIDEO_PALETTE_DATA;
533 
534 typedef struct _VIDEO_HARDWARE_STATE {
535 	PVIDEO_HARDWARE_STATE_HEADER  StateHeader;
536 	ULONG  StateLength;
537 } VIDEO_HARDWARE_STATE, *PVIDEO_HARDWARE_STATE;
538 
539 #define VIDEO_CHILD_ACTIVE                0x00000001
540 #define VIDEO_CHILD_DETACHED              0x00000002
541 #define VIDEO_CHILD_NOPRUNE_FREQ          0x80000000
542 #define VIDEO_CHILD_NOPRUNE_RESOLUTION    0x40000000
543 
544 #define VIDEO_DUALVIEW_REMOVABLE          0x00000001
545 #define VIDEO_DUALVIEW_PRIMARY            0x80000000
546 #define VIDEO_DUALVIEW_SECONDARY          0x40000000
547 
548 #ifndef _WINDDI_
549 typedef struct _ENG_EVENT *PEVENT;
550 #endif
551 
552 typedef struct _ENG_EVENT
553 {
554     PVOID pKEvent;
555     ULONG fFlags;
556 } ENG_EVENT, *PENG_EVENT;
557 
558 typedef struct _DISPLAY_BRIGHTNESS {
559   UCHAR ucDisplayPolicy;
560   UCHAR ucACBrightness;
561   UCHAR ucDCBrightness;
562 } DISPLAY_BRIGHTNESS, *PDISPLAY_BRIGHTNESS;
563 
564 #define DISPLAYPOLICY_AC                0x00000001
565 #define DISPLAYPOLICY_DC                0x00000002
566 #define DISPLAYPOLICY_BOTH              0x00000003
567 
568 
569 #ifdef __cplusplus
570 }
571 #endif
572 
573 #endif /* GUID_DEFS_ONLY */
574