Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 // Returns true if the EDID for the output has the flag of overscan. Note that | |
|
Daniel Erat
2013/01/04 00:19:12
nit: s/the flag of overscan/its overscan flag set/
Jun Mukai
2013/01/04 01:43:01
Done.
| |
| 280 // returning false does not mean no overscan, it just means the lack of flag. | |
|
Daniel Erat
2013/01/04 00:19:12
nit: s/no overscan/overscan is disabled/, s/lack o
Jun Mukai
2013/01/04 01:43:01
Hmm, 'overscan is disabled' sounds like a bit weir
| |
| 281 UI_EXPORT bool HasOutputOverscanFlag(XID output); | |
|
Daniel Erat
2013/01/04 00:19:12
nit: sorry for conflicting with an earlier suggest
Jun Mukai
2013/01/04 01:43:01
I also changed my mind and it would be good to dis
| |
| 282 | |
| 283 // Parses |prop| as EDID data and stores extracted data into |manufacturer_id|, | |
| 284 // |serial_number|, and |human_readable_name| and returns true. This is exported | |
| 285 // for x11_util_unittest.cc. | |
|
Daniel Erat
2013/01/04 00:19:12
nit: document that the last three arguments can be
Jun Mukai
2013/01/04 01:43:01
Done.
| |
| 286 UI_EXPORT bool ParseOutputDeviceData(const unsigned char* prop, | |
| 287 unsigned long nitems, | |
| 288 uint16* manufacturer_id, | |
| 289 uint32* serial_number, | |
| 290 std::string* human_readable_name); | |
| 291 | |
| 292 // Parses |prop| as EDID data and stores overscan flag to |flag|. Returns true | |
| 293 // if the flag is found. This is exported for x11_util_unittest.cc. | |
| 294 UI_EXPORT bool ParseOutputOverscanFlag(const unsigned char* prop, | |
| 295 unsigned long nitems, | |
| 296 bool* flag); | |
| 297 | |
| 279 // Gets the names of the all displays physically connected to the system. | 298 // Gets the names of the all displays physically connected to the system. |
| 280 UI_EXPORT std::vector<std::string> GetDisplayNames( | 299 UI_EXPORT std::vector<std::string> GetDisplayNames( |
| 281 const std::vector<XID>& output_id); | 300 const std::vector<XID>& output_id); |
| 282 | 301 |
| 283 // Gets the name of outputs given by |output_id|. | 302 // Gets the name of outputs given by |output_id|. |
| 284 UI_EXPORT std::vector<std::string> GetOutputNames( | 303 UI_EXPORT std::vector<std::string> GetOutputNames( |
| 285 const std::vector<XID>& output_id); | 304 const std::vector<XID>& output_id); |
| 286 | 305 |
| 287 enum WindowManagerName { | 306 enum WindowManagerName { |
| 288 WM_UNKNOWN, | 307 WM_UNKNOWN, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 381 private: | 400 private: |
| 382 ::Cursor cursor_; | 401 ::Cursor cursor_; |
| 383 Display* display_; | 402 Display* display_; |
| 384 | 403 |
| 385 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); | 404 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); |
| 386 }; | 405 }; |
| 387 | 406 |
| 388 } // namespace ui | 407 } // namespace ui |
| 389 | 408 |
| 390 #endif // UI_BASE_X_X11_UTIL_H_ | 409 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |