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 | |
| 280 // returning false does not mean no overscan, it just means the lack of flag. | |
| 281 // This is exported for x11_util_unittest.cc. | |
| 282 UI_EXPORT bool HasOutputOverscanFlag(XID output); | |
| 283 | |
| 284 // Parse |prop| as EDID data and stores extracted data into |manufacturer_id|, | |
|
Daniel Erat
2013/01/03 21:59:14
nit: s/Parse/Parses/
Jun Mukai
2013/01/03 22:50:53
Done.
| |
| 285 // |serial_number|, and |human_readable_name| and returns true. // This is | |
|
Daniel Erat
2013/01/03 21:59:14
nit: remove extra '//'
Jun Mukai
2013/01/03 22:50:53
Done.
| |
| 286 // exported for x11_util_unittest.cc. | |
| 287 UI_EXPORT bool ParseOutputDeviceData(const unsigned char* prop, | |
| 288 unsigned long nitems, | |
| 289 uint16* manufacturer_id, | |
| 290 uint32* serial_number, | |
| 291 std::string* human_readable_name); | |
| 292 | |
| 293 // Parse |prop| as EDID data and stores overscan flag to |flag|. Returns true | |
| 294 // if the flag is found. | |
| 295 UI_EXPORT bool ParseOutputOverscanFlag(const unsigned char* prop, | |
| 296 unsigned long nitems, | |
| 297 bool* flag); | |
| 298 | |
| 279 // Gets the names of the all displays physically connected to the system. | 299 // Gets the names of the all displays physically connected to the system. |
| 280 UI_EXPORT std::vector<std::string> GetDisplayNames( | 300 UI_EXPORT std::vector<std::string> GetDisplayNames( |
| 281 const std::vector<XID>& output_id); | 301 const std::vector<XID>& output_id); |
| 282 | 302 |
| 283 // Gets the name of outputs given by |output_id|. | 303 // Gets the name of outputs given by |output_id|. |
| 284 UI_EXPORT std::vector<std::string> GetOutputNames( | 304 UI_EXPORT std::vector<std::string> GetOutputNames( |
| 285 const std::vector<XID>& output_id); | 305 const std::vector<XID>& output_id); |
| 286 | 306 |
| 287 enum WindowManagerName { | 307 enum WindowManagerName { |
| 288 WM_UNKNOWN, | 308 WM_UNKNOWN, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 381 private: | 401 private: |
| 382 ::Cursor cursor_; | 402 ::Cursor cursor_; |
| 383 Display* display_; | 403 Display* display_; |
| 384 | 404 |
| 385 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); | 405 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); |
| 386 }; | 406 }; |
| 387 | 407 |
| 388 } // namespace ui | 408 } // namespace ui |
| 389 | 409 |
| 390 #endif // UI_BASE_X_X11_UTIL_H_ | 410 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |