Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
edid.h
Go to the documentation of this file.
1 #include <X11/extensions/Xrandr.h>
2 #include <X11/Xlib.h>
3 
4 /*
5  * Copyright 2007 Red Hat, Inc.
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining a
8  * copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation
10  * on the rights to use, copy, modify, merge, publish, distribute, sub
11  * license, and/or sell copies of the Software, and to permit persons to whom
12  * the Software is furnished to do so, subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice (including the next
15  * paragraph) shall be included in all copies or substantial portions of the
16  * Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24  */
25 
26 /* Author: Soren Sandmann <sandmann@redhat.com> */
27 
28 typedef enum {
30  DVI,
35 } Interface;
36 
37 typedef enum {
40  RGB,
42 } ColorType;
43 
44 typedef enum {
52 } StereoType;
53 
54 struct Timing {
55  int width;
56  int height;
57  int frequency;
58 };
59 
62  int h_addr;
63  int h_blank;
64  int h_sync;
66  int v_addr;
67  int v_blank;
68  int v_sync;
70  int width_mm;
71  int height_mm;
76 
78  union {
79  struct {
80  int bipolar;
81  int serrations;
82  int sync_on_green;
83  } analog;
84 
85  struct {
86  int composite;
87  int serrations;
88  int negative_vsync;
89  int negative_hsync;
90  } digital;
91  } connector;
92 };
93 
94 struct MonitorInfo {
95  int checksum;
98  unsigned int serial_number;
99 
100  int production_week; /* -1 if not specified */
101  int production_year; /* -1 if not specified */
102  int model_year; /* -1 if not specified */
103 
106 
108 
109  union {
110  struct {
111  int bits_per_primary;
112  Interface interface;
113  int rgb444;
114  int ycrcb444;
115  int ycrcb422;
116  } digital;
117 
118  struct {
119  double video_signal_level;
120  double sync_signal_level;
121  double total_signal_level;
122 
123  int blank_to_black;
124 
125  int separate_hv_sync;
126  int composite_sync_on_h;
127  int composite_sync_on_green;
128  int serration_on_vsync;
129  ColorType color_type;
130  } analog;
131  } connector;
132 
133  int width_mm; /* -1 if not specified */
134  int height_mm; /* -1 if not specified */
135  double aspect_ratio; /* -1.0 if not specififed */
136 
137  double gamma; /* -1.0 if not specified */
138 
139  int standby;
140  int suspend;
142 
146 
147  double red_x;
148  double red_y;
149  double green_x;
150  double green_y;
151  double blue_x;
152  double blue_y;
153  double white_x;
154  double white_y;
155 
156  Timing established[24]; /* Terminated by 0x0x0 */
158 
160  DetailedTiming detailed_timings[4]; /* If monitor has a preferred
161  * mode, it is the first one
162  * (whether it has, is
163  * determined by the
164  * preferred_timing_includes
165  * bit.
166  */
167 
168  /* Optional product description */
171  char dsc_string[14]; /* Unspecified ASCII data */
172 };
173 
174 MonitorInfo * read_edid_data(Display * disp, RROutput id);
int model_year
Definition: edid.h:102
Definition: edid.h:40
int v_front_porch
Definition: edid.h:69
DetailedTiming detailed_timings[4]
Definition: edid.h:160
char dsc_product_name[14]
Definition: edid.h:170
Definition: edid.h:29
int h_blank
Definition: edid.h:63
int frequency
Definition: edid.h:57
double green_y
Definition: edid.h:150
ColorType
Definition: edid.h:37
double red_y
Definition: edid.h:148
int pixel_clock
Definition: edid.h:61
Definition: edid.h:31
int major_version
Definition: edid.h:104
int is_digital
Definition: edid.h:107
double white_y
Definition: edid.h:154
double red_x
Definition: edid.h:147
int active_off
Definition: edid.h:141
double blue_x
Definition: edid.h:151
int suspend
Definition: edid.h:140
int width_mm
Definition: edid.h:70
int width
Definition: edid.h:55
union DetailedTiming::@69 connector
int production_week
Definition: edid.h:100
int v_sync
Definition: edid.h:68
int standby
Definition: edid.h:139
int height_mm
Definition: edid.h:71
double green_x
Definition: edid.h:149
Definition: edid.h:32
double gamma
Definition: edid.h:137
int continuous_frequency
Definition: edid.h:145
int checksum
Definition: edid.h:95
Definition: edid.h:33
StereoType
Definition: edid.h:44
unsigned int serial_number
Definition: edid.h:98
int h_addr
Definition: edid.h:62
double aspect_ratio
Definition: edid.h:135
union MonitorInfo::@72 connector
Timing standard[8]
Definition: edid.h:157
Definition: edid.h:54
int height
Definition: edid.h:56
int right_border
Definition: edid.h:72
int minor_version
Definition: edid.h:105
MonitorInfo * read_edid_data(Display *disp, RROutput id)
Definition: edid.cpp:428
int preferred_timing_includes_native
Definition: edid.h:144
int interlaced
Definition: edid.h:74
int h_sync
Definition: edid.h:64
int srgb_is_standard
Definition: edid.h:143
int production_year
Definition: edid.h:101
int product_code
Definition: edid.h:97
int top_border
Definition: edid.h:73
int h_front_porch
Definition: edid.h:65
char manufacturer_code[4]
Definition: edid.h:96
int n_detailed_timings
Definition: edid.h:159
int width_mm
Definition: edid.h:133
Definition: edid.h:30
char dsc_serial_number[14]
Definition: edid.h:169
Definition: edid.h:45
double white_x
Definition: edid.h:153
int v_blank
Definition: edid.h:67
double blue_y
Definition: edid.h:152
StereoType stereo
Definition: edid.h:75
Timing established[24]
Definition: edid.h:156
char dsc_string[14]
Definition: edid.h:171
Interface
Definition: edid.h:28
int height_mm
Definition: edid.h:134
int v_addr
Definition: edid.h:66
int digital_sync
Definition: edid.h:77