Mir
edid.h
Go to the documentation of this file.
1/*
2 * Copyright © 2016-2020 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef MIROIL_EDID_H
18#define MIROIL_EDID_H
19
20#include <string>
21#include <vector>
22
23namespace miroil
24{
25
26struct Edid
27{
28 std::string vendor;
29 uint16_t product_code{0};
30 uint32_t serial_number{0};
31
32 struct PhysicalSizeMM { int width; int height; };
34
35 struct Descriptor {
36 enum class Type : uint8_t {
37 timing_identifiers = 0xfa,
38 white_point_data = 0xfb,
39 monitor_name = 0xfc,
40 monitor_limits = 0xfd,
41 unspecified_text = 0xfe,
42 serial_number = 0xff,
43
44 undefined = 0x00,
45 };
46
47 union Value {
48 char monitor_name[13];
50 char serial_number[13];
51 };
52
55
56 std::string string_value() const;
57 };
59
60 Edid& parse_data(std::vector<uint8_t> const&);
61};
62
63}
64
65#endif // MIROIL_EDID_H
Definition: compositor.h:21
Definition: edid.h:35
std::string string_value() const
Value value
Definition: edid.h:54
Type
Definition: edid.h:36
Type type
Definition: edid.h:53
Definition: edid.h:32
int height
Definition: edid.h:32
int width
Definition: edid.h:32
Definition: edid.h:27
uint16_t product_code
Definition: edid.h:29
std::string vendor
Definition: edid.h:28
PhysicalSizeMM size
Definition: edid.h:33
Edid & parse_data(std::vector< uint8_t > const &)
Descriptor descriptors[4]
Definition: edid.h:58
uint32_t serial_number
Definition: edid.h:30
Definition: edid.h:47
char unspecified_text[13]
Definition: edid.h:49
char monitor_name[13]
Definition: edid.h:48
char serial_number[13]
Definition: edid.h:50

Copyright © 2012-2022 Canonical Ltd.
Generated on Thu Jul 21 23:32:06 UTC 2022
This documentation is licensed under the GPL version 2 or 3.