source: Daodan/MinGW/include/ddk/ntddvdeo.h@ 1131

Last change on this file since 1131 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 12.8 KB
Line 
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#ifndef __NTDDVDEO_H
24#define __NTDDVDEO_H
25
26#if __GNUC__ >=3
27#pragma GCC system_header
28#endif
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#include "ntddk.h"
35
36
37#define VIDEO_DEVICE_NAME "DISPLAY%d"
38#define WVIDEO_DEVICE_NAME L"DISPLAY%d"
39
40#define DD_FULLSCREEN_VIDEO_DEVICE_NAME L"\\Device\\FSVideo"
41
42DEFINE_GUID(GUID_DEVINTERFACE_DISPLAY_ADAPTER, \
43 0x5b45201d, 0xf2f2, 0x4f3b, 0x85, 0xbb, 0x30, 0xff, 0x1f, 0x95, 0x35, 0x99);
44
45
46#define IOCTL_VIDEO_DISABLE_CURSOR \
47 CTL_CODE (FILE_DEVICE_VIDEO, 0x109, METHOD_BUFFERED, FILE_ANY_ACCESS)
48
49#define IOCTL_VIDEO_DISABLE_POINTER \
50 CTL_CODE(FILE_DEVICE_VIDEO, 0x10f, METHOD_BUFFERED, FILE_ANY_ACCESS)
51
52#define IOCTL_VIDEO_ENABLE_CURSOR \
53 CTL_CODE(FILE_DEVICE_VIDEO, 0x108, METHOD_BUFFERED, FILE_ANY_ACCESS)
54
55#define IOCTL_VIDEO_ENABLE_POINTER \
56 CTL_CODE(FILE_DEVICE_VIDEO, 0x10e, METHOD_BUFFERED, FILE_ANY_ACCESS)
57
58#define IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES \
59 CTL_CODE(FILE_DEVICE_VIDEO, 0x119, METHOD_BUFFERED, FILE_ANY_ACCESS)
60
61#define IOCTL_VIDEO_GET_BANK_SELECT_CODE \
62 CTL_CODE(FILE_DEVICE_VIDEO, 0x115, METHOD_BUFFERED, FILE_ANY_ACCESS)
63
64#define IOCTL_VIDEO_GET_CHILD_STATE \
65 CTL_CODE(FILE_DEVICE_VIDEO, 0x120, METHOD_BUFFERED, FILE_ANY_ACCESS)
66
67#define IOCTL_VIDEO_GET_POWER_MANAGEMENT \
68 CTL_CODE(FILE_DEVICE_VIDEO, 0x11c, METHOD_BUFFERED, FILE_ANY_ACCESS)
69
70#define IOCTL_VIDEO_HANDLE_VIDEOPARAMETERS \
71 CTL_CODE(FILE_DEVICE_VIDEO, 0x08, METHOD_BUFFERED, FILE_ANY_ACCESS)
72
73#define IOCTL_VIDEO_LOAD_AND_SET_FONT \
74 CTL_CODE(FILE_DEVICE_VIDEO, 0x105, METHOD_BUFFERED, FILE_ANY_ACCESS)
75
76#define IOCTL_VIDEO_MAP_VIDEO_MEMORY \
77 CTL_CODE(FILE_DEVICE_VIDEO, 0x116, METHOD_BUFFERED, FILE_ANY_ACCESS)
78
79#define IOCTL_VIDEO_QUERY_AVAIL_MODES \
80 CTL_CODE(FILE_DEVICE_VIDEO, 0x100, METHOD_BUFFERED, FILE_ANY_ACCESS)
81
82#define IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES \
83 CTL_CODE(FILE_DEVICE_VIDEO, 0x11a, METHOD_BUFFERED, FILE_ANY_ACCESS)
84
85#define IOCTL_VIDEO_QUERY_CURRENT_MODE \
86 CTL_CODE(FILE_DEVICE_VIDEO, 0x102, METHOD_BUFFERED, FILE_ANY_ACCESS)
87
88#define IOCTL_VIDEO_QUERY_CURSOR_ATTR \
89 CTL_CODE(FILE_DEVICE_VIDEO, 0x10b, METHOD_BUFFERED, FILE_ANY_ACCESS)
90
91#define IOCTL_VIDEO_QUERY_CURSOR_POSITION \
92 CTL_CODE(FILE_DEVICE_VIDEO, 0x10d, METHOD_BUFFERED, FILE_ANY_ACCESS)
93
94#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES \
95 CTL_CODE(FILE_DEVICE_VIDEO, 0x101, METHOD_BUFFERED, FILE_ANY_ACCESS)
96
97#define IOCTL_VIDEO_QUERY_POINTER_ATTR \
98 CTL_CODE(FILE_DEVICE_VIDEO, 0x111, METHOD_BUFFERED, FILE_ANY_ACCESS)
99
100#define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES \
101 CTL_CODE(FILE_DEVICE_VIDEO, 0x114, METHOD_BUFFERED, FILE_ANY_ACCESS)
102
103#define IOCTL_VIDEO_QUERY_POINTER_POSITION \
104 CTL_CODE(FILE_DEVICE_VIDEO, 0x113, METHOD_BUFFERED, FILE_ANY_ACCESS)
105
106#define IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES \
107 CTL_CODE(FILE_DEVICE_VIDEO, 0x118, METHOD_BUFFERED, FILE_ANY_ACCESS)
108
109#define IOCTL_VIDEO_RESET_DEVICE \
110 CTL_CODE(FILE_DEVICE_VIDEO, 0x104, METHOD_BUFFERED, FILE_ANY_ACCESS)
111
112#define IOCTL_VIDEO_RESTORE_HARDWARE_STATE \
113 CTL_CODE(FILE_DEVICE_VIDEO, 0x81, METHOD_BUFFERED, FILE_ANY_ACCESS)
114
115#define IOCTL_VIDEO_SAVE_HARDWARE_STATE \
116 CTL_CODE(FILE_DEVICE_VIDEO, 0x80, METHOD_BUFFERED, FILE_ANY_ACCESS)
117
118#define IOCTL_VIDEO_SET_CHILD_STATE_CONFIGURATION \
119 CTL_CODE(FILE_DEVICE_VIDEO, 0x122, METHOD_BUFFERED, FILE_ANY_ACCESS)
120
121#define IOCTL_VIDEO_SET_COLOR_REGISTERS \
122 CTL_CODE(FILE_DEVICE_VIDEO, 0x107, METHOD_BUFFERED, FILE_ANY_ACCESS)
123
124#define IOCTL_VIDEO_SET_CURRENT_MODE \
125 CTL_CODE(FILE_DEVICE_VIDEO, 0x103, METHOD_BUFFERED, FILE_ANY_ACCESS)
126
127#define IOCTL_VIDEO_SET_CURSOR_ATTR \
128 CTL_CODE(FILE_DEVICE_VIDEO, 0x10a, METHOD_BUFFERED, FILE_ANY_ACCESS)
129
130#define IOCTL_VIDEO_SET_CURSOR_POSITION \
131 CTL_CODE(FILE_DEVICE_VIDEO, 0x10c, METHOD_BUFFERED, FILE_ANY_ACCESS)
132
133#define IOCTL_VIDEO_SET_PALETTE_REGISTERS \
134 CTL_CODE(FILE_DEVICE_VIDEO, 0x106, METHOD_BUFFERED, FILE_ANY_ACCESS)
135
136#define IOCTL_VIDEO_SET_POINTER_ATTR \
137 CTL_CODE(FILE_DEVICE_VIDEO, 0x110, METHOD_BUFFERED, FILE_ANY_ACCESS)
138
139#define IOCTL_VIDEO_SET_POINTER_POSITION \
140 CTL_CODE(FILE_DEVICE_VIDEO, 0x112, METHOD_BUFFERED, FILE_ANY_ACCESS)
141
142#define IOCTL_VIDEO_SET_POWER_MANAGEMENT \
143 CTL_CODE(FILE_DEVICE_VIDEO, 0x11b, METHOD_BUFFERED, FILE_ANY_ACCESS)
144
145#define IOCTL_VIDEO_SHARE_VIDEO_MEMORY \
146 CTL_CODE(FILE_DEVICE_VIDEO, 0x11d, METHOD_BUFFERED, FILE_ANY_ACCESS)
147
148#define IOCTL_VIDEO_SWITCH_DUALVIEW \
149 CTL_CODE(FILE_DEVICE_VIDEO, 0x123, METHOD_BUFFERED, FILE_ANY_ACCESS)
150
151#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY \
152 CTL_CODE(FILE_DEVICE_VIDEO, 0x117, METHOD_BUFFERED, FILE_ANY_ACCESS)
153
154#define IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY \
155 CTL_CODE(FILE_DEVICE_VIDEO, 0x11e, METHOD_BUFFERED, FILE_ANY_ACCESS)
156
157#define IOCTL_VIDEO_VALIDATE_CHILD_STATE_CONFIGURATION \
158 CTL_CODE(FILE_DEVICE_VIDEO, 0x121, METHOD_BUFFERED, FILE_ANY_ACCESS)
159
160
161
162typedef struct _VIDEO_MEMORY {
163 PVOID RequestedVirtualAddress;
164} VIDEO_MEMORY, *PVIDEO_MEMORY;
165
166typedef struct _VIDEO_MEMORY_INFORMATION {
167 PVOID VideoRamBase;
168 ULONG VideoRamLength;
169 PVOID FrameBufferBase;
170 ULONG FrameBufferLength;
171} VIDEO_MEMORY_INFORMATION, *PVIDEO_MEMORY_INFORMATION;
172
173/* VIDEO_MODE.RequestedMode */
174#define VIDEO_MODE_MAP_MEM_LINEAR 0x40000000
175#define VIDEO_MODE_NO_ZERO_MEMORY 0x80000000
176
177typedef struct _VIDEO_MODE {
178 ULONG RequestedMode;
179} VIDEO_MODE, *PVIDEO_MODE;
180
181/* VIDEO_MODE_INFORMATION.AttributeFlags */
182#define VIDEO_MODE_COLOR 0x0001
183#define VIDEO_MODE_GRAPHICS 0x0002
184#define VIDEO_MODE_PALETTE_DRIVEN 0x0004
185#define VIDEO_MODE_MANAGED_PALETTE 0x0008
186#define VIDEO_MODE_INTERLACED 0x0010
187#define VIDEO_MODE_NO_OFF_SCREEN 0x0020
188#define VIDEO_MODE_NO_64_BIT_ACCESS 0x0040
189#define VIDEO_MODE_BANKED 0x0080
190#define VIDEO_MODE_LINEAR 0x0100
191
192typedef struct _VIDEO_MODE_INFORMATION {
193 ULONG Length;
194 ULONG ModeIndex;
195 ULONG VisScreenWidth;
196 ULONG VisScreenHeight;
197 ULONG ScreenStride;
198 ULONG NumberOfPlanes;
199 ULONG BitsPerPlane;
200 ULONG Frequency;
201 ULONG XMillimeter;
202 ULONG YMillimeter;
203 ULONG NumberRedBits;
204 ULONG NumberGreenBits;
205 ULONG NumberBlueBits;
206 ULONG RedMask;
207 ULONG GreenMask;
208 ULONG BlueMask;
209 ULONG AttributeFlags;
210 ULONG VideoMemoryBitmapWidth;
211 ULONG VideoMemoryBitmapHeight;
212 ULONG DriverSpecificAttributeFlags;
213} VIDEO_MODE_INFORMATION, *PVIDEO_MODE_INFORMATION;
214
215typedef struct _VIDEO_NUM_MODES {
216 ULONG NumModes;
217 ULONG ModeInformationLength;
218} VIDEO_NUM_MODES, *PVIDEO_NUM_MODES;
219
220typedef enum _VIDEO_POWER_STATE {
221 VideoPowerUnspecified = 0,
222 VideoPowerOn = 1,
223 VideoPowerStandBy,
224 VideoPowerSuspend,
225 VideoPowerOff,
226 VideoPowerHibernate,
227 VideoPowerShutdown,
228 VideoPowerMaximum
229} VIDEO_POWER_STATE, *PVIDEO_POWER_STATE;
230
231typedef struct _VIDEO_POWER_MANAGEMENT {
232 ULONG Length;
233 ULONG DPMSVersion;
234 ULONG PowerState;
235} VIDEO_POWER_MANAGEMENT, *PVIDEO_POWER_MANAGEMENT;
236
237typedef struct _VIDEO_PUBLIC_ACCESS_RANGES {
238 ULONG InIoSpace;
239 ULONG MappedInIoSpace;
240 PVOID VirtualAddress;
241} VIDEO_PUBLIC_ACCESS_RANGES, *PVIDEO_PUBLIC_ACCESS_RANGES;
242
243typedef struct _VIDEO_SHARE_MEMORY {
244 HANDLE ProcessHandle;
245 ULONG ViewOffset;
246 ULONG ViewSize;
247 PVOID RequestedVirtualAddress;
248} VIDEO_SHARE_MEMORY, *PVIDEO_SHARE_MEMORY;
249
250typedef struct _VIDEO_SHARE_MEMORY_INFORMATION {
251 ULONG SharedViewOffset;
252 ULONG SharedViewSize;
253 PVOID VirtualAddress;
254} VIDEO_SHARE_MEMORY_INFORMATION, *PVIDEO_SHARE_MEMORY_INFORMATION;
255
256/* VIDEO_BANK_SELECT.BankingFlags constants */
257#define PLANAR_HC 0x00000001
258
259/* VIDEO_BANK_SELECT.BankingType and PlanarHCBankingType constants */
260typedef enum _VIDEO_BANK_TYPE {
261 VideoNotBanked = 0,
262 VideoBanked1RW,
263 VideoBanked1R1W,
264 VideoBanked2RW,
265 NumVideoBankTypes
266} VIDEO_BANK_TYPE, *PVIDEO_BANK_TYPE;
267
268typedef struct _VIDEO_BANK_SELECT {
269 ULONG Length;
270 ULONG Size;
271 ULONG BankingFlags;
272 ULONG BankingType;
273 ULONG PlanarHCBankingType;
274 ULONG BitmapWidthInBytes;
275 ULONG BitmapSize;
276 ULONG Granularity;
277 ULONG PlanarHCGranularity;
278 ULONG CodeOffset;
279 ULONG PlanarHCBankCodeOffset;
280 ULONG PlanarHCEnableCodeOffset;
281 ULONG PlanarHCDisableCodeOffset;
282} VIDEO_BANK_SELECT, *PVIDEO_BANK_SELECT;
283
284typedef struct _VIDEO_LOAD_FONT_INFORMATION {
285 USHORT WidthInPixels;
286 USHORT HeightInPixels;
287 ULONG FontSize;
288 UCHAR Font[1];
289} VIDEO_LOAD_FONT_INFORMATION, *PVIDEO_LOAD_FONT_INFORMATION;
290
291/* VIDEO_COLOR_CAPABILITIES.AttributeFlags constants */
292#define VIDEO_DEVICE_COLOR 0x00000001
293#define VIDEO_OPTIONAL_GAMMET_TABLE 0x00000002
294
295typedef struct _VIDEO_COLOR_CAPABILITIES {
296 ULONG Length;
297 ULONG AttributeFlags;
298 LONG RedPhosphoreDecay;
299 LONG GreenPhosphoreDecay;
300 LONG BluePhosphoreDecay;
301 LONG WhiteChromaticity_x;
302 LONG WhiteChromaticity_y;
303 LONG WhiteChromaticity_Y;
304 LONG RedChromaticity_x;
305 LONG RedChromaticity_y;
306 LONG GreenChromaticity_x;
307 LONG GreenChromaticity_y;
308 LONG BlueChromaticity_x;
309 LONG BlueChromaticity_y;
310 LONG WhiteGamma;
311 LONG RedGamma;
312 LONG GreenGamma;
313 LONG BlueGamma;
314} VIDEO_COLOR_CAPABILITIES, *PVIDEO_COLOR_CAPABILITIES;
315
316typedef struct _VIDEO_CURSOR_ATTRIBUTES {
317 USHORT Width;
318 USHORT Height;
319 SHORT Column;
320 SHORT Row;
321 UCHAR Rate;
322 UCHAR Enable;
323} VIDEO_CURSOR_ATTRIBUTES, *PVIDEO_CURSOR_ATTRIBUTES;
324
325typedef struct _VIDEO_CURSOR_POSITION {
326 SHORT Column;
327 SHORT Row;
328} VIDEO_CURSOR_POSITION, *PVIDEO_CURSOR_POSITION;
329
330typedef struct _VIDEO_POINTER_ATTRIBUTES {
331 ULONG Flags;
332 ULONG Width;
333 ULONG Height;
334 ULONG WidthInBytes;
335 ULONG Enable;
336 SHORT Column;
337 SHORT Row;
338 UCHAR Pixels[1];
339} VIDEO_POINTER_ATTRIBUTES, *PVIDEO_POINTER_ATTRIBUTES;
340
341/* VIDEO_POINTER_CAPABILITIES.Flags */
342#define VIDEO_MODE_ASYNC_POINTER 0x01
343#define VIDEO_MODE_MONO_POINTER 0x02
344#define VIDEO_MODE_COLOR_POINTER 0x04
345#define VIDEO_MODE_ANIMATE_START 0x08
346#define VIDEO_MODE_ANIMATE_UPDATE 0x10
347
348typedef struct _VIDEO_POINTER_CAPABILITIES {
349 ULONG Flags;
350 ULONG MaxWidth;
351 ULONG MaxHeight;
352 ULONG HWPtrBitmapStart;
353 ULONG HWPtrBitmapEnd;
354} VIDEO_POINTER_CAPABILITIES, *PVIDEO_POINTER_CAPABILITIES;
355
356typedef struct _VIDEO_POINTER_POSITION {
357 SHORT Column;
358 SHORT Row;
359} VIDEO_POINTER_POSITION, *PVIDEO_POINTER_POSITION;
360
361
362/* VIDEO_HARDWARE_STATE_HEADER.VGAStateFlags constants */
363#define VIDEO_STATE_NON_STANDARD_VGA 0x00000001
364#define VIDEO_STATE_UNEMULATED_VGA_STATE 0x00000002
365#define VIDEO_STATE_PACKED_CHAIN4_MODE 0x00000004
366
367typedef struct _VIDEO_HARDWARE_STATE_HEADER {
368 ULONG Length;
369 UCHAR PortValue[0x30];
370 ULONG AttribIndexDataState;
371 ULONG BasicSequencerOffset;
372 ULONG BasicCrtContOffset;
373 ULONG BasicGraphContOffset;
374 ULONG BasicAttribContOffset;
375 ULONG BasicDacOffset;
376 ULONG BasicLatchesOffset;
377 ULONG ExtendedSequencerOffset;
378 ULONG ExtendedCrtContOffset;
379 ULONG ExtendedGraphContOffset;
380 ULONG ExtendedAttribContOffset;
381 ULONG ExtendedDacOffset;
382 ULONG ExtendedValidatorStateOffset;
383 ULONG ExtendedMiscDataOffset;
384 ULONG PlaneLength;
385 ULONG Plane1Offset;
386 ULONG Plane2Offset;
387 ULONG Plane3Offset;
388 ULONG Plane4Offset;
389 ULONG VGAStateFlags;
390 ULONG DIBOffset;
391 ULONG DIBBitsPerPixel;
392 ULONG DIBXResolution;
393 ULONG DIBYResolution;
394 ULONG DIBXlatOffset;
395 ULONG DIBXlatLength;
396 ULONG VesaInfoOffset;
397 PVOID FrameBufferData;
398} VIDEO_HARDWARE_STATE_HEADER, *PVIDEO_HARDWARE_STATE_HEADER;
399
400typedef struct _VIDEO_CLUTDATA {
401 UCHAR Red;
402 UCHAR Green;
403 UCHAR Blue;
404 UCHAR Unused;
405} VIDEO_CLUTDATA, *PVIDEO_CLUTDATA;
406
407typedef struct {
408 USHORT NumEntries;
409 USHORT FirstEntry;
410 union {
411 VIDEO_CLUTDATA RgbArray;
412 ULONG RgbLong;
413 } LookupTable[1];
414} VIDEO_CLUT, *PVIDEO_CLUT;
415
416typedef struct _VIDEO_PALETTE_DATA {
417 USHORT NumEntries;
418 USHORT FirstEntry;
419 USHORT Colors[1];
420} VIDEO_PALETTE_DATA, *PVIDEO_PALETTE_DATA;
421
422typedef struct _VIDEO_HARDWARE_STATE {
423 PVIDEO_HARDWARE_STATE_HEADER StateHeader;
424 ULONG StateLength;
425} VIDEO_HARDWARE_STATE, *PVIDEO_HARDWARE_STATE;
426
427#define VIDEO_CHILD_ACTIVE 0x00000001
428#define VIDEO_CHILD_DETACHED 0x00000002
429#define VIDEO_CHILD_NOPRUNE_FREQ 0x80000000
430#define VIDEO_CHILD_NOPRUNE_RESOLUTION 0x40000000
431
432#define VIDEO_DUALVIEW_REMOVABLE 0x00000001
433#define VIDEO_DUALVIEW_PRIMARY 0x80000000
434#define VIDEO_DUALVIEW_SECONDARY 0x40000000
435
436#ifdef __cplusplus
437}
438#endif
439
440#endif /* __NTDDVDEO_H */
Note: See TracBrowser for help on using the repository browser.