Upstream version 7.35.144.0
[platform/framework/web/crosswalk.git] / src / ui / display / edid_parser.h
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_DISPLAY_EDID_PARSER_H_
6 #define UI_DISPLAY_EDID_PARSER_H_
7
8 #include <stdint.h>
9
10 #include <string>
11 #include <vector>
12
13 #include "ui/display/display_export.h"
14
15 // EDID (Extended Display Identification Data) is a format for monitor
16 // metadata. This provides a parser for the data.
17
18 namespace ui {
19
20 // Generates the display id for the pair of |edid| and |index|, and store in
21 // |display_id_out|. Returns true if the display id is successfully generated,
22 // or false otherwise.
23 DISPLAY_EXPORT bool GetDisplayIdFromEDID(const std::vector<uint8_t>& edid,
24                                          uint8_t index,
25                                          int64_t* display_id_out);
26
27 // Parses |edid| as EDID data and stores extracted data into |manufacturer_id|
28 // and |human_readable_name| and returns true. NULL can be passed for unwanted
29 // output parameters. Some devices (especially internal displays) may not have
30 // the field for |human_readable_name|, and it will return true in that case.
31 DISPLAY_EXPORT bool ParseOutputDeviceData(const std::vector<uint8_t>& edid,
32                                           uint16_t* manufacturer_id,
33                                           std::string* human_readable_name);
34
35 DISPLAY_EXPORT bool ParseOutputOverscanFlag(const std::vector<uint8_t>& edid,
36                                             bool* flag);
37
38 }  // namespace ui
39
40 #endif // UI_DISPLAY_EDID_PARSER_H_