| 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 XID pixmap, void* pixmap_gc, | 264 XID pixmap, void* pixmap_gc, |
| 265 const uint8* data, | 265 const uint8* data, |
| 266 int data_width, int data_height, | 266 int data_width, int data_height, |
| 267 int src_x, int src_y, | 267 int src_x, int src_y, |
| 268 int dst_x, int dst_y, | 268 int dst_x, int dst_y, |
| 269 int copy_width, int copy_height); | 269 int copy_width, int copy_height); |
| 270 | 270 |
| 271 void FreePicture(Display* display, XID picture); | 271 void FreePicture(Display* display, XID picture); |
| 272 void FreePixmap(Display* display, XID pixmap); | 272 void FreePixmap(Display* display, XID pixmap); |
| 273 | 273 |
| 274 // Gets some useful data from the specified output device, such like | |
| 275 // manufacturer's ID, product code, and human readable name. Returns false if it | |
| 276 // fails to get those data and doesn't touch manufacturer ID/product code/name. | |
| 277 // NULL can be passed for unwanted output parameters. | |
| 278 UI_EXPORT bool GetOutputDeviceData(XID output, | |
| 279 uint16* manufacturer_id, | |
| 280 uint16* product_code, | |
| 281 std::string* human_readable_name); | |
| 282 | |
| 283 // Gets the overscan flag from |output| and stores to |flag|. Returns true if | |
| 284 // the flag is found. Otherwise returns false and doesn't touch |flag|. The | |
| 285 // output will produce overscan if |flag| is set to true, but the output may | |
| 286 // still produce overscan even though it returns true and |flag| is set to | |
| 287 // false. | |
| 288 UI_EXPORT bool GetOutputOverscanFlag(XID output, bool* flag); | |
| 289 | |
| 290 // Parses |prop| as EDID data and stores extracted data into |manufacturer_id|, | |
| 291 // |product_code|, and |human_readable_name| and returns true. NULL can be | |
| 292 // passed for unwanted output parameters. This is exported for | |
| 293 // x11_util_unittest.cc. | |
| 294 UI_EXPORT bool ParseOutputDeviceData(const unsigned char* prop, | |
| 295 unsigned long nitems, | |
| 296 uint16* manufacturer_id, | |
| 297 uint16* product_code, | |
| 298 std::string* human_readable_name); | |
| 299 | |
| 300 // Parses |prop| as EDID data and stores the overscan flag to |flag|. Returns | |
| 301 // true if the flag is found. This is exported for x11_util_unittest.cc. | |
| 302 UI_EXPORT bool ParseOutputOverscanFlag(const unsigned char* prop, | |
| 303 unsigned long nitems, | |
| 304 bool* flag); | |
| 305 | |
| 306 enum WindowManagerName { | 274 enum WindowManagerName { |
| 307 WM_UNKNOWN, | 275 WM_UNKNOWN, |
| 308 WM_BLACKBOX, | 276 WM_BLACKBOX, |
| 309 WM_CHROME_OS, | 277 WM_CHROME_OS, |
| 310 WM_COMPIZ, | 278 WM_COMPIZ, |
| 311 WM_ENLIGHTENMENT, | 279 WM_ENLIGHTENMENT, |
| 312 WM_ICE_WM, | 280 WM_ICE_WM, |
| 313 WM_KWIN, | 281 WM_KWIN, |
| 314 WM_METACITY, | 282 WM_METACITY, |
| 315 WM_MUFFIN, | 283 WM_MUFFIN, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 private: | 369 private: |
| 402 ::Cursor cursor_; | 370 ::Cursor cursor_; |
| 403 Display* display_; | 371 Display* display_; |
| 404 | 372 |
| 405 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); | 373 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); |
| 406 }; | 374 }; |
| 407 | 375 |
| 408 } // namespace ui | 376 } // namespace ui |
| 409 | 377 |
| 410 #endif // UI_BASE_X_X11_UTIL_H_ | 378 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |