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

Side by Side Diff: base/edid_parser_x11.h

Issue 23536057: linux_aura: Implement most of DesktopScreenX11. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix chromeos compile. Created 7 years, 3 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
« no previous file with comments | « base/base.gypi ('k') | base/edid_parser_x11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 BASE_EDID_PARSER_X11_H_
6 #define BASE_EDID_PARSER_X11_H_
7
8 #include <string>
9
10 #include "base/base_export.h"
11 #include "base/basictypes.h"
12
13 typedef unsigned long XID;
14
15 namespace base {
Elliot Glaysher 2013/09/19 20:53:12 Why put this in base? Because it's the only locati
16
17 // Get the EDID data from the |output| and stores to |prop|. |nitem| will store
18 // the number of characters |prop| will have. It doesn't take the ownership of
19 // |prop|, so caller must release it by XFree().
20 // Returns true if EDID property is successfully obtained. Otherwise returns
21 // false and does not touch |prop| and |nitems|.
22 BASE_EXPORT bool GetEDIDProperty(XID output,
23 unsigned long* nitems,
24 unsigned char** prop);
25
26 // Gets the EDID data from |output| and generates the display id through
27 // |GetDisplayIdFromEDID|.
28 BASE_EXPORT bool GetDisplayId(XID output, size_t index,
29 int64* display_id_out);
30
31 // Generates the display id for the pair of |prop| with |nitems| length and
32 // |index|, and store in |display_id_out|. Returns true if the display id is
33 // successfully generated, or false otherwise.
34 BASE_EXPORT bool GetDisplayIdFromEDID(const unsigned char* prop,
35 unsigned long nitems,
36 size_t index,
37 int64* display_id_out);
38
39 // Parses |prop| as EDID data and stores extracted data into |manufacturer_id|
40 // and |human_readable_name| and returns true. NULL can be passed for unwanted
41 // output parameters. Some devices (especially internal displays) may not have
42 // the field for |human_readable_name|, and it will return true in that case.
43 BASE_EXPORT bool ParseOutputDeviceData(const unsigned char* prop,
44 unsigned long nitems,
45 uint16* manufacturer_id,
46 std::string* human_readable_name);
47
48 } // namespace base
49
50 #endif // BASE_EDID_PARSER_X11_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/edid_parser_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698