VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/vdif.h@ 97956

最後變更 在這個檔案從97956是 69098,由 vboxsync 提交於 7 年 前

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • 屬性 svn:eol-style 設為 native
檔案大小: 6.5 KB
 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/vdif.h,v 1.3 2000/04/14 12:16:04 tsi Exp $ */
2
3#ifndef _VDIF_H
4#define _VDIF_H
5
6#define VDIF_MONITOR_MONOCHROME 0
7#define VDIF_MONITOR_COLOR 1
8#define VDIF_VIDEO_TTL 0
9#define VDIF_VIDEO_ANALOG 1
10#define VDIF_VIDEO_ECL 2
11#define VDIF_VIDEO_DECL 3
12#define VDIF_VIDEO_OTHER 4
13#define VDIF_SYNC_SEPARATE 0
14#define VDIF_SYNC_C 1
15#define VDIF_SYNC_CP 2
16#define VDIF_SYNC_G 3
17#define VDIF_SYNC_GP 4
18#define VDIF_SYNC_OTHER 5
19#define VDIF_SCAN_NONINTERLACED 0
20#define VDIF_SCAN_INTERLACED 1
21#define VDIF_SCAN_OTHER 2
22#define VDIF_POLARITY_NEGATIVE 0
23#define VDIF_POLARITY_POSITIVE 1
24
25#include "Xmd.h"
26
27#pragma pack(1)
28
29typedef struct _VDIF { /* Monitor Description: */
30 CARD8 VDIFId[4]; /* alway "VDIF" */
31 CARD32 FileLength; /* lenght of the whole file */
32 CARD32 Checksum; /* sum of all bytes in the file after*/
33 /* this field */
34 CARD16 VDIFVersion; /* structure version number */
35 CARD16 VDIFRevision; /* structure revision number */
36 CARD16 Date[3]; /* file date Year/Month/Day */
37 CARD16 DateManufactured[3]; /* date Year/Month/Day */
38 CARD32 FileRevision; /* file revision string */
39 CARD32 Manufacturer; /* ASCII ID of the manufacturer */
40 CARD32 ModelNumber; /* ASCII ID of the model */
41 CARD32 MinVDIFIndex; /* ASCII ID of Minimum VDIF index */
42 CARD32 Version; /* ASCII ID of the model version */
43 CARD32 SerialNumber; /* ASCII ID of the serial number */
44 CARD8 MonitorType; /* Monochrome or Color */
45 CARD8 CRTSize; /* inches */
46 CARD8 BorderRed; /* percent */
47 CARD8 BorderGreen; /* percent */
48 CARD8 BorderBlue; /* percent */
49 CARD8 Reserved1; /* padding */
50 CARD16 Reserved2; /* padding */
51 CARD32 RedPhosphorDecay; /* microseconds */
52 CARD32 GreenPhosphorDecay; /* microseconds */
53 CARD32 BluePhosphorDecay; /* microseconds */
54 CARD16 WhitePoint_x; /* WhitePoint in CIExyY (scale 1000) */
55 CARD16 WhitePoint_y;
56 CARD16 WhitePoint_Y;
57 CARD16 RedChromaticity_x; /* Red chromaticity in x,y */
58 CARD16 RedChromaticity_y;
59 CARD16 GreenChromaticity_x; /* Green chromaticity in x,y */
60 CARD16 GreenChromaticity_y;
61 CARD16 BlueChromaticity_x; /* Blue chromaticity in x,y */
62 CARD16 BlueChromaticity_y;
63 CARD16 RedGamma; /* Gamme curve exponent (scale 1000) */
64 CARD16 GreenGamma;
65 CARD16 BlueGamma;
66 CARD32 NumberOperationalLimits;
67 CARD32 OffsetOperationalLimits;
68 CARD32 NumberOptions; /* optinal sections (gamma table) */
69 CARD32 OffsetOptions;
70 CARD32 OffsetStringTable;
71} xf86VdifRec, *xf86VdifPtr;
72
73typedef enum { /* Tags for section identification */
74 VDIF_OPERATIONAL_LIMITS_TAG = 1,
75 VDIF_PREADJUSTED_TIMING_TAG,
76 VDIF_GAMMA_TABLE_TAG
77} VDIFScnTag;
78
79typedef struct _VDIFScnHdr { /* Generic Section Header: */
80 CARD32 ScnLength; /* lenght of section */
81 CARD32 ScnTag; /* tag for section identification */
82} VDIFScnHdrRec, *VDIFScnHdrPtr;
83
84typedef struct _VDIFLimits { /* Operational Limits: */
85 VDIFScnHdrRec Header; /* common section info */
86 CARD16 MaxHorPixel; /* pixels */
87 CARD16 MaxVerPixel; /* lines */
88 CARD16 MaxHorActiveLength; /* millimeters */
89 CARD16 MaxVerActiveHeight; /* millimeters */
90 CARD8 VideoType; /* TTL / Analog / ECL / DECL */
91 CARD8 SyncType; /* TTL / Analog / ECL / DECL */
92 CARD8 SyncConfiguration; /* separate / composite / other */
93 CARD8 Reserved1; /* padding */
94 CARD16 Reserved2; /* padding */
95 CARD16 TerminationResistance; /* */
96 CARD16 WhiteLevel; /* millivolts */
97 CARD16 BlackLevel; /* millivolts */
98 CARD16 BlankLevel; /* millivolts */
99 CARD16 SyncLevel; /* millivolts */
100 CARD32 MaxPixelClock; /* kiloHertz */
101 CARD32 MinHorFrequency; /* Hertz */
102 CARD32 MaxHorFrequency; /* Hertz */
103 CARD32 MinVerFrequency; /* milliHertz */
104 CARD32 MaxVerFrequency; /* milliHertz */
105 CARD16 MinHorRetrace; /* nanoseconds */
106 CARD16 MinVerRetrace; /* microseconds */
107 CARD32 NumberPreadjustedTimings;
108 CARD32 OffsetNextLimits;
109} xf86VdifLimitsRec, *xf86VdifLimitsPtr;
110
111typedef struct _VDIFTiming { /* Preadjusted Timing: */
112 VDIFScnHdrRec Header; /* common section info */
113 CARD32 PreadjustedTimingName; /* SVGA/SVPMI mode number */
114 CARD16 HorPixel; /* pixels */
115 CARD16 VerPixel; /* lines */
116 CARD16 HorAddrLength; /* millimeters */
117 CARD16 VerAddrHeight; /* millimeters */
118 CARD8 PixelWidthRatio; /* gives H:V */
119 CARD8 PixelHeightRatio;
120 CARD8 Reserved1; /* padding */
121 CARD8 ScanType; /* noninterlaced / interlaced / other*/
122 CARD8 HorSyncPolarity; /* negative / positive */
123 CARD8 VerSyncPolarity; /* negative / positive */
124 CARD16 CharacterWidth; /* pixels */
125 CARD32 PixelClock; /* kiloHertz */
126 CARD32 HorFrequency; /* Hertz */
127 CARD32 VerFrequency; /* milliHertz */
128 CARD32 HorTotalTime; /* nanoseconds */
129 CARD32 VerTotalTime; /* microseconds */
130 CARD16 HorAddrTime; /* nanoseconds */
131 CARD16 HorBlankStart; /* nanoseconds */
132 CARD16 HorBlankTime; /* nanoseconds */
133 CARD16 HorSyncStart; /* nanoseconds */
134 CARD16 HorSyncTime; /* nanoseconds */
135 CARD16 VerAddrTime; /* microseconds */
136 CARD16 VerBlankStart; /* microseconds */
137 CARD16 VerBlankTime; /* microseconds */
138 CARD16 VerSyncStart; /* microseconds */
139 CARD16 VerSyncTime; /* microseconds */
140} xf86VdifTimingRec, *xf86VdifTimingPtr;
141
142typedef struct _VDIFGamma { /* Gamma Table: */
143 VDIFScnHdrRec Header; /* common section info */
144 CARD16 GammaTableEntries; /* count of grays or RGB 3-tuples */
145 CARD16 Unused1;
146} xf86VdifGammaRec, *xf86VdifGammaPtr;
147
148/* access macros */
149#define VDIF_OPERATIONAL_LIMITS(vdif) \
150((xf86VdifLimitsPtr)((char*)(vdif) + (vdif)->OffsetOperationalLimits))
151#define VDIF_NEXT_OPERATIONAL_LIMITS(limits) limits = \
152 ((xf86VdifLimitsPtr)((char*)(limits) + (limits)->OffsetNextLimits))
153#define VDIF_PREADJUSTED_TIMING(limits) \
154((xf86VdifTimingPtr)((char*)(limits) + (limits)->Header.ScnLength))
155#define VDIF_NEXT_PREADJUSTED_TIMING(timing) timing = \
156 ((xf86VdifTimingPtr)((char*)(timing) + (timing)->Header.ScnLength))
157#define VDIF_OPTIONS(vdif) \
158 ((VDIFScnHdrPtr)((char*)(vdif) + (vdif)->OffsetOptions))
159#define VDIF_NEXT_OPTIONS(options) options = \
160 ((xf86VdifGammaPtr)((char*)(options) + (options)->Header.ScnLength))
161#define VDIF_STRING(vdif, string) \
162 ((char*)((char*)vdif + vdif->OffsetStringTable + (string)))
163
164typedef struct _vdif {
165 xf86VdifPtr vdif;
166 xf86VdifLimitsPtr *limits;
167 xf86VdifTimingPtr *timings;
168 xf86VdifGammaPtr *gamma;
169 char * strings;
170} xf86vdif, *xf86vdifPtr;
171
172#pragma pack()
173
174#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette