OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_DISPLAY_X11_EDID_PARSER_X11_H_ | 5 #ifndef UI_DISPLAY_X11_EDID_PARSER_X11_H_ |
6 #define UI_DISPLAY_X11_EDID_PARSER_X11_H_ | 6 #define UI_DISPLAY_X11_EDID_PARSER_X11_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "ui/display/display_constants.h" | |
13 #include "ui/display/display_export.h" | 12 #include "ui/display/display_export.h" |
| 13 #include "ui/display/types/display_constants.h" |
14 | 14 |
15 typedef unsigned long XID; | 15 typedef unsigned long XID; |
16 typedef XID RROutput; | 16 typedef XID RROutput; |
17 | 17 |
18 // Xrandr utility functions to help get EDID information. | 18 // Xrandr utility functions to help get EDID information. |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
21 | 21 |
22 // Gets the EDID data from |output| and generates the display id through | 22 // Gets the EDID data from |output| and generates the display id through |
23 // |GetDisplayIdFromEDID|. | 23 // |GetDisplayIdFromEDID|. |
24 DISPLAY_EXPORT bool GetDisplayId(XID output, | 24 DISPLAY_EXPORT bool GetDisplayId(XID output, |
25 uint8_t index, | 25 uint8_t index, |
26 int64_t* display_id_out); | 26 int64_t* display_id_out); |
27 | 27 |
28 // Generate the human readable string from EDID obtained from |output|. | 28 // Generate the human readable string from EDID obtained from |output|. |
29 DISPLAY_EXPORT std::string GetDisplayName(RROutput output); | 29 DISPLAY_EXPORT std::string GetDisplayName(RROutput output); |
30 | 30 |
31 // Gets the overscan flag from |output| and stores to |flag|. Returns true if | 31 // Gets the overscan flag from |output| and stores to |flag|. Returns true if |
32 // the flag is found. Otherwise returns false and doesn't touch |flag|. The | 32 // the flag is found. Otherwise returns false and doesn't touch |flag|. The |
33 // output will produce overscan if |flag| is set to true, but the output may | 33 // output will produce overscan if |flag| is set to true, but the output may |
34 // still produce overscan even though it returns true and |flag| is set to | 34 // still produce overscan even though it returns true and |flag| is set to |
35 // false. | 35 // false. |
36 DISPLAY_EXPORT bool GetOutputOverscanFlag(RROutput output, bool* flag); | 36 DISPLAY_EXPORT bool GetOutputOverscanFlag(RROutput output, bool* flag); |
37 | 37 |
38 } // namespace ui | 38 } // namespace ui |
39 | 39 |
40 #endif // UI_DISPLAY_X11_EDID_PARSER_X11_H_ | 40 #endif // UI_DISPLAY_X11_EDID_PARSER_X11_H_ |
OLD | NEW |