Mir
edid.h
Go to the documentation of this file.
1/*
2 * Copyright © 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 <cstdint>
21#include <string>
22#include <vector>
23
24namespace miroil
25{
26
27struct Edid
28{
29 std::string vendor;
30 uint16_t product_code{0};
31 uint32_t serial_number{0};
32
33 struct PhysicalSizeMM { int width; int height; };
35
36 struct Descriptor {
37 enum class Type : uint8_t {
38 timing_identifiers = 0xfa,
39 white_point_data = 0xfb,
40 monitor_name = 0xfc,
41 monitor_limits = 0xfd,
42 unspecified_text = 0xfe,
43 serial_number = 0xff,
44
45 undefined = 0x00,
46 };
47
48 union Value {
49 char monitor_name[13];
51 char serial_number[13];
52 };
53
56
57 std::string string_value() const;
58 };
60
61 Edid& parse_data(std::vector<uint8_t> const&);
62};
63
64}
65
66#endif // MIROIL_EDID_H
Definition: compositor.h:21
Definition: edid.h:36
std::string string_value() const
Value value
Definition: edid.h:55
Type
Definition: edid.h:37
Type type
Definition: edid.h:54
Definition: edid.h:33
int height
Definition: edid.h:33
int width
Definition: edid.h:33
Definition: edid.h:28
uint16_t product_code
Definition: edid.h:30
std::string vendor
Definition: edid.h:29
PhysicalSizeMM size
Definition: edid.h:34
Edid & parse_data(std::vector< uint8_t > const &)
Descriptor descriptors[4]
Definition: edid.h:59
uint32_t serial_number
Definition: edid.h:31
Definition: edid.h:48
char unspecified_text[13]
Definition: edid.h:50
char monitor_name[13]
Definition: edid.h:49
char serial_number[13]
Definition: edid.h:51

Copyright © 2012-2023 Canonical Ltd.
Generated on Tue 2 May 10:01:24 UTC 2023
This documentation is licensed under the GPL version 2 or 3.