ovr_sdk

diff 3rdParty/EDID/edid.h @ 0:1b39a1b46319

initial 0.4.4
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 14 Jan 2015 06:51:16 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/3rdParty/EDID/edid.h	Wed Jan 14 06:51:16 2015 +0200
     1.3 @@ -0,0 +1,174 @@
     1.4 +#include <X11/extensions/Xrandr.h>
     1.5 +#include <X11/Xlib.h>
     1.6 +
     1.7 +/*
     1.8 + * Copyright 2007 Red Hat, Inc.
     1.9 + *
    1.10 + * Permission is hereby granted, free of charge, to any person obtaining a
    1.11 + * copy of this software and associated documentation files (the "Software"),
    1.12 + * to deal in the Software without restriction, including without limitation
    1.13 + * on the rights to use, copy, modify, merge, publish, distribute, sub
    1.14 + * license, and/or sell copies of the Software, and to permit persons to whom
    1.15 + * the Software is furnished to do so, subject to the following conditions:
    1.16 + *
    1.17 + * The above copyright notice and this permission notice (including the next
    1.18 + * paragraph) shall be included in all copies or substantial portions of the
    1.19 + * Software.
    1.20 + *
    1.21 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    1.22 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    1.23 + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
    1.24 + * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
    1.25 + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    1.26 + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    1.27 + */
    1.28 +
    1.29 +/* Author: Soren Sandmann <sandmann@redhat.com> */
    1.30 +
    1.31 +typedef enum {
    1.32 +    UNDEFINED,
    1.33 +    DVI,
    1.34 +    HDMI_A,
    1.35 +    HDMI_B,
    1.36 +    MDDI,
    1.37 +    DISPLAY_PORT
    1.38 +} Interface;
    1.39 +
    1.40 +typedef enum {
    1.41 +    UNDEFINED_COLOR,
    1.42 +    MONOCHROME,
    1.43 +    RGB,
    1.44 +    OTHER_COLOR
    1.45 +} ColorType;
    1.46 +
    1.47 +typedef enum {
    1.48 +    NO_STEREO,
    1.49 +    FIELD_RIGHT,
    1.50 +    FIELD_LEFT,
    1.51 +    TWO_WAY_RIGHT_ON_EVEN,
    1.52 +    TWO_WAY_LEFT_ON_EVEN,
    1.53 +    FOUR_WAY_INTERLEAVED,
    1.54 +    SIDE_BY_SIDE
    1.55 +} StereoType;
    1.56 +
    1.57 +struct Timing {
    1.58 +    int width;
    1.59 +    int height;
    1.60 +    int frequency;
    1.61 +};
    1.62 +
    1.63 +struct DetailedTiming {
    1.64 +    int pixel_clock;
    1.65 +    int h_addr;
    1.66 +    int h_blank;
    1.67 +    int h_sync;
    1.68 +    int h_front_porch;
    1.69 +    int v_addr;
    1.70 +    int v_blank;
    1.71 +    int v_sync;
    1.72 +    int v_front_porch;
    1.73 +    int width_mm;
    1.74 +    int height_mm;
    1.75 +    int right_border;
    1.76 +    int top_border;
    1.77 +    int interlaced;
    1.78 +    StereoType stereo;
    1.79 +
    1.80 +    int digital_sync;
    1.81 +    union {
    1.82 +        struct {
    1.83 +            int bipolar;
    1.84 +            int serrations;
    1.85 +            int sync_on_green;
    1.86 +        } analog;
    1.87 +
    1.88 +        struct {
    1.89 +            int composite;
    1.90 +            int serrations;
    1.91 +            int negative_vsync;
    1.92 +            int negative_hsync;
    1.93 +        } digital;
    1.94 +    } connector;
    1.95 +};
    1.96 +
    1.97 +struct MonitorInfo {
    1.98 +    int checksum;
    1.99 +    char manufacturer_code[4];
   1.100 +    int product_code;
   1.101 +    unsigned int serial_number;
   1.102 +
   1.103 +    int production_week; /* -1 if not specified */
   1.104 +    int production_year; /* -1 if not specified */
   1.105 +    int model_year; /* -1 if not specified */
   1.106 +
   1.107 +    int major_version;
   1.108 +    int minor_version;
   1.109 +
   1.110 +    int is_digital;
   1.111 +
   1.112 +    union {
   1.113 +        struct {
   1.114 +            int bits_per_primary;
   1.115 +            Interface interface;
   1.116 +            int rgb444;
   1.117 +            int ycrcb444;
   1.118 +            int ycrcb422;
   1.119 +        } digital;
   1.120 +
   1.121 +        struct {
   1.122 +            double video_signal_level;
   1.123 +            double sync_signal_level;
   1.124 +            double total_signal_level;
   1.125 +
   1.126 +            int blank_to_black;
   1.127 +
   1.128 +            int separate_hv_sync;
   1.129 +            int composite_sync_on_h;
   1.130 +            int composite_sync_on_green;
   1.131 +            int serration_on_vsync;
   1.132 +            ColorType color_type;
   1.133 +        } analog;
   1.134 +    } connector;
   1.135 +
   1.136 +    int width_mm; /* -1 if not specified */
   1.137 +    int height_mm; /* -1 if not specified */
   1.138 +    double aspect_ratio; /* -1.0 if not specififed */
   1.139 +
   1.140 +    double gamma; /* -1.0 if not specified */
   1.141 +
   1.142 +    int standby;
   1.143 +    int suspend;
   1.144 +    int active_off;
   1.145 +
   1.146 +    int srgb_is_standard;
   1.147 +    int preferred_timing_includes_native;
   1.148 +    int continuous_frequency;
   1.149 +
   1.150 +    double red_x;
   1.151 +    double red_y;
   1.152 +    double green_x;
   1.153 +    double green_y;
   1.154 +    double blue_x;
   1.155 +    double blue_y;
   1.156 +    double white_x;
   1.157 +    double white_y;
   1.158 +
   1.159 +    Timing established[24]; /* Terminated by 0x0x0 */
   1.160 +    Timing standard[8];
   1.161 +
   1.162 +    int n_detailed_timings;
   1.163 +    DetailedTiming detailed_timings[4]; /* If monitor has a preferred
   1.164 +     * mode, it is the first one
   1.165 +     * (whether it has, is
   1.166 +     * determined by the
   1.167 +     * preferred_timing_includes
   1.168 +     * bit.
   1.169 +     */
   1.170 +
   1.171 +    /* Optional product description */
   1.172 +    char dsc_serial_number[14];
   1.173 +    char dsc_product_name[14];
   1.174 +    char dsc_string[14]; /* Unspecified ASCII data */
   1.175 +};
   1.176 +
   1.177 +MonitorInfo * read_edid_data(Display * disp, RROutput id);