| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 namespace ui { | 45 namespace ui { |
| 46 | 46 |
| 47 // These functions use the default display and this /must/ be called from | 47 // These functions use the default display and this /must/ be called from |
| 48 // the UI thread. Thus, they don't support multiple displays. | 48 // the UI thread. Thus, they don't support multiple displays. |
| 49 | 49 |
| 50 // These functions cache their results --------------------------------- | 50 // These functions cache their results --------------------------------- |
| 51 | 51 |
| 52 // Check if there's an open connection to an X server. | 52 // Check if there's an open connection to an X server. |
| 53 UI_EXPORT bool XDisplayExists(); | 53 UI_EXPORT bool XDisplayExists(); |
| 54 | 54 // Return an X11 connection for the current, primary display. |
| 55 // Returns true if the system supports XINPUT2. | |
| 56 UI_EXPORT bool IsXInput2Available(); | |
| 57 | 55 |
| 58 // X shared memory comes in three flavors: | 56 // X shared memory comes in three flavors: |
| 59 // 1) No SHM support, | 57 // 1) No SHM support, |
| 60 // 2) SHM putimage, | 58 // 2) SHM putimage, |
| 61 // 3) SHM pixmaps + putimage. | 59 // 3) SHM pixmaps + putimage. |
| 62 enum SharedMemorySupport { | 60 enum SharedMemorySupport { |
| 63 SHARED_MEMORY_NONE, | 61 SHARED_MEMORY_NONE, |
| 64 SHARED_MEMORY_PUTIMAGE, | 62 SHARED_MEMORY_PUTIMAGE, |
| 65 SHARED_MEMORY_PIXMAP | 63 SHARED_MEMORY_PIXMAP |
| 66 }; | 64 }; |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 private: | 377 private: |
| 380 ::Cursor cursor_; | 378 ::Cursor cursor_; |
| 381 XDisplay* display_; | 379 XDisplay* display_; |
| 382 | 380 |
| 383 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); | 381 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); |
| 384 }; | 382 }; |
| 385 | 383 |
| 386 } // namespace ui | 384 } // namespace ui |
| 387 | 385 |
| 388 #endif // UI_BASE_X_X11_UTIL_H_ | 386 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |