Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: chromeos/display/output_util.h

Issue 15067012: Move chromeos specific utility functions for display to chromeos/display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 CHROMEOS_DISPLAY_OUTPUT_UTIL_H_
6 #define CHROMEOS_DISPLAY_OUTPUT_UTIL_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "chromeos/chromeos_export.h"
12
13 // Forward declarations for Xlib and Xrandr.
14 // This is so unused X definitions don't pollute the namespace.
15 typedef unsigned long XID;
16
17 namespace chromeos {
18
19 // Generates the display id for the pair of |output| and |index| and store
20 // in |display_id_out|. Returns true if the display id is successfully
21 // generated, or false otherwise.
22 CHROMEOS_EXPORT bool GetDisplayId(XID output, size_t index,
23 int64* display_id_out);
24
25 // Generates the human readable string from EDID obtained for |output|.
26 CHROMEOS_EXPORT std::string GetDisplayName(XID output);
27
28 // Gets the overscan flag from |output| and stores to |flag|. Returns true if
29 // the flag is found. Otherwise returns false and doesn't touch |flag|. The
30 // output will produce overscan if |flag| is set to true, but the output may
31 // still produce overscan even though it returns true and |flag| is set to
32 // false.
33 CHROMEOS_EXPORT bool GetOutputOverscanFlag(XID output, bool* flag);
34
35 // Parses |prop| as EDID data and stores extracted data into |manufacturer_id|,
36 // |product_code|, and |human_readable_name| and returns true. NULL can be
37 // passed for unwanted output parameters. This is exported for
38 // x11_util_unittest.cc.
39 CHROMEOS_EXPORT bool ParseOutputDeviceData(const unsigned char* prop,
40 unsigned long nitems,
41 uint16* manufacturer_id,
42 uint16* product_code,
43 std::string* human_readable_name);
44
45 // Parses |prop| as EDID data and stores the overscan flag to |flag|. Returns
46 // true if the flag is found. This is exported for x11_util_unittest.cc.
47 CHROMEOS_EXPORT bool ParseOutputOverscanFlag(const unsigned char* prop,
48 unsigned long nitems,
49 bool* flag);
50
51 // Returns true if an output named |name| is an internal display.
52 CHROMEOS_EXPORT bool IsInternalOutputName(const std::string& name);
53
54 } // namespace chromeos
55
56 #endif // CHROMEOS_DISPLAY_OUTPUT_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698