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

Side by Side Diff: ui/base/x/x11_util.h

Issue 11725005: Checks the possibility of overscans from EDID extension data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « no previous file | ui/base/x/x11_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BASE_X_X11_UTIL_H_ 5 #ifndef UI_BASE_X_X11_UTIL_H_
6 #define UI_BASE_X_X11_UTIL_H_ 6 #define UI_BASE_X_X11_UTIL_H_
7 7
8 // This file declares utility functions for X11 (Linux only). 8 // This file declares utility functions for X11 (Linux only).
9 // 9 //
10 // These functions do not require the Xlib headers to be included (which is why 10 // These functions do not require the Xlib headers to be included (which is why
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 // Gets some useful data from the specified output device, such like 270 // Gets some useful data from the specified output device, such like
271 // manufacturer's ID, serial#, and human readable name. Returns false if it 271 // manufacturer's ID, serial#, and human readable name. Returns false if it
272 // fails to get those data and doesn't touch manufacturer ID/serial#/name. 272 // fails to get those data and doesn't touch manufacturer ID/serial#/name.
273 // NULL can be passed for unwanted output parameters. 273 // NULL can be passed for unwanted output parameters.
274 UI_EXPORT bool GetOutputDeviceData(XID output, 274 UI_EXPORT bool GetOutputDeviceData(XID output,
275 uint16* manufacturer_id, 275 uint16* manufacturer_id,
276 uint32* serial_number, 276 uint32* serial_number,
277 std::string* human_readable_name); 277 std::string* human_readable_name);
278 278
279 // Gets the overscan flag from |output| and stores to |flag|. Returns true if
280 // the flag is found. Otherwise returns false and doesn't touch |flag|. The
281 // output will produce overscan if |flag| is set to true, but the output may
282 // still produce overscan even though it returns true and |flag| is set to
283 // false.
284 UI_EXPORT bool GetOutputOverscanFlag(XID output, bool* flag);
285
286 // Parses |prop| as EDID data and stores extracted data into |manufacturer_id|,
287 // |serial_number|, and |human_readable_name| and returns true. NULL can be
288 // passed for unwanted output parameters. This is exported for
289 // x11_util_unittest.cc.
290 UI_EXPORT bool ParseOutputDeviceData(const unsigned char* prop,
291 unsigned long nitems,
292 uint16* manufacturer_id,
293 uint32* serial_number,
294 std::string* human_readable_name);
295
296 // Parses |prop| as EDID data and stores the overscan flag to |flag|. Returns
297 // true if the flag is found. This is exported for x11_util_unittest.cc.
298 UI_EXPORT bool ParseOutputOverscanFlag(const unsigned char* prop,
299 unsigned long nitems,
300 bool* flag);
301
279 // Gets the names of the all displays physically connected to the system. 302 // Gets the names of the all displays physically connected to the system.
280 UI_EXPORT std::vector<std::string> GetDisplayNames( 303 UI_EXPORT std::vector<std::string> GetDisplayNames(
281 const std::vector<XID>& output_id); 304 const std::vector<XID>& output_id);
282 305
283 // Gets the name of outputs given by |output_id|. 306 // Gets the name of outputs given by |output_id|.
284 UI_EXPORT std::vector<std::string> GetOutputNames( 307 UI_EXPORT std::vector<std::string> GetOutputNames(
285 const std::vector<XID>& output_id); 308 const std::vector<XID>& output_id);
286 309
287 enum WindowManagerName { 310 enum WindowManagerName {
288 WM_UNKNOWN, 311 WM_UNKNOWN,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 private: 404 private:
382 ::Cursor cursor_; 405 ::Cursor cursor_;
383 Display* display_; 406 Display* display_;
384 407
385 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); 408 DISALLOW_COPY_AND_ASSIGN(XScopedCursor);
386 }; 409 };
387 410
388 } // namespace ui 411 } // namespace ui
389 412
390 #endif // UI_BASE_X_X11_UTIL_H_ 413 #endif // UI_BASE_X_X11_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698