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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 XID pixmap, void* pixmap_gc, | 229 XID pixmap, void* pixmap_gc, |
230 const uint8* data, | 230 const uint8* data, |
231 int data_width, int data_height, | 231 int data_width, int data_height, |
232 int src_x, int src_y, | 232 int src_x, int src_y, |
233 int dst_x, int dst_y, | 233 int dst_x, int dst_y, |
234 int copy_width, int copy_height); | 234 int copy_width, int copy_height); |
235 | 235 |
236 void FreePicture(Display* display, XID picture); | 236 void FreePicture(Display* display, XID picture); |
237 void FreePixmap(Display* display, XID pixmap); | 237 void FreePixmap(Display* display, XID pixmap); |
238 | 238 |
| 239 // Gets the list of the output displaying device handles via XRandR, and sets to |
| 240 // |outputs|. Returns false if it fails to get the list and |outputs| is |
| 241 // cleared. |
| 242 UI_EXPORT bool GetOutputDeviceHandles(std::vector<XID>* outputs); |
| 243 |
| 244 // Gets some useful data from the specified output device, such like |
| 245 // manufacturer's ID, serial#, and human readable name. Returns false if it |
| 246 // fails to get those data and doesn't touch manufacturer ID/serial#/name. |
| 247 // NULL can be passed for unwanted output parameters. |
| 248 UI_EXPORT bool GetOutputDeviceData(XID output, |
| 249 uint16* manufacturer_id, |
| 250 uint32* serial_number, |
| 251 std::string* human_readable_name); |
| 252 |
239 enum WindowManagerName { | 253 enum WindowManagerName { |
240 WM_UNKNOWN, | 254 WM_UNKNOWN, |
241 WM_BLACKBOX, | 255 WM_BLACKBOX, |
242 WM_CHROME_OS, | 256 WM_CHROME_OS, |
243 WM_COMPIZ, | 257 WM_COMPIZ, |
244 WM_ENLIGHTENMENT, | 258 WM_ENLIGHTENMENT, |
245 WM_ICE_WM, | 259 WM_ICE_WM, |
246 WM_KWIN, | 260 WM_KWIN, |
247 WM_METACITY, | 261 WM_METACITY, |
248 WM_MUTTER, | 262 WM_MUTTER, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 306 |
293 private: | 307 private: |
294 char* string_; | 308 char* string_; |
295 | 309 |
296 DISALLOW_COPY_AND_ASSIGN(XScopedString); | 310 DISALLOW_COPY_AND_ASSIGN(XScopedString); |
297 }; | 311 }; |
298 | 312 |
299 } // namespace ui | 313 } // namespace ui |
300 | 314 |
301 #endif // UI_BASE_X_X11_UTIL_H_ | 315 #endif // UI_BASE_X_X11_UTIL_H_ |
OLD | NEW |