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 // You can pass NULL to |manufacturer_id|, |serial_number|, and |
| 248 // |human_readable_name| then it just ignores them. |
| 249 UI_EXPORT bool GetOutputDeviceData(XID output, |
| 250 uint16* manufacturer_id, |
| 251 uint32* serial_number, |
| 252 std::string* human_readable_name); |
| 253 |
239 enum WindowManagerName { | 254 enum WindowManagerName { |
240 WM_UNKNOWN, | 255 WM_UNKNOWN, |
241 WM_BLACKBOX, | 256 WM_BLACKBOX, |
242 WM_CHROME_OS, | 257 WM_CHROME_OS, |
243 WM_COMPIZ, | 258 WM_COMPIZ, |
244 WM_ENLIGHTENMENT, | 259 WM_ENLIGHTENMENT, |
245 WM_ICE_WM, | 260 WM_ICE_WM, |
246 WM_KWIN, | 261 WM_KWIN, |
247 WM_METACITY, | 262 WM_METACITY, |
248 WM_MUTTER, | 263 WM_MUTTER, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 307 |
293 private: | 308 private: |
294 char* string_; | 309 char* string_; |
295 | 310 |
296 DISALLOW_COPY_AND_ASSIGN(XScopedString); | 311 DISALLOW_COPY_AND_ASSIGN(XScopedString); |
297 }; | 312 }; |
298 | 313 |
299 } // namespace ui | 314 } // namespace ui |
300 | 315 |
301 #endif // UI_BASE_X_X11_UTIL_H_ | 316 #endif // UI_BASE_X_X11_UTIL_H_ |
OLD | NEW |