VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.3.0.0/vdif.h@ 33428

Last change on this file since 33428 was 25078, checked in by vboxsync, 15 years ago

Additions/x11/x11include: exported and set eol-style on new headers

  • Property svn:eol-style set to native
File size: 6.4 KB
Line 
1
2#ifndef _VDIF_H
3#define _VDIF_H
4
5#define VDIF_MONITOR_MONOCHROME 0
6#define VDIF_MONITOR_COLOR 1
7#define VDIF_VIDEO_TTL 0
8#define VDIF_VIDEO_ANALOG 1
9#define VDIF_VIDEO_ECL 2
10#define VDIF_VIDEO_DECL 3
11#define VDIF_VIDEO_OTHER 4
12#define VDIF_SYNC_SEPARATE 0
13#define VDIF_SYNC_C 1
14#define VDIF_SYNC_CP 2
15#define VDIF_SYNC_G 3
16#define VDIF_SYNC_GP 4
17#define VDIF_SYNC_OTHER 5
18#define VDIF_SCAN_NONINTERLACED 0
19#define VDIF_SCAN_INTERLACED 1
20#define VDIF_SCAN_OTHER 2
21#define VDIF_POLARITY_NEGATIVE 0
22#define VDIF_POLARITY_POSITIVE 1
23
24#include <X11/Xmd.h>
25
26#undef CARD32
27#define CARD32 unsigned int /* ... on all supported platforms */
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#undef CARD32
173
174#endif
Note: See TracBrowser for help on using the repository browser.

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