| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // 2) SHM putimage, | 51 // 2) SHM putimage, |
| 52 // 3) SHM pixmaps + putimage. | 52 // 3) SHM pixmaps + putimage. |
| 53 enum SharedMemorySupport { | 53 enum SharedMemorySupport { |
| 54 SHARED_MEMORY_NONE, | 54 SHARED_MEMORY_NONE, |
| 55 SHARED_MEMORY_PUTIMAGE, | 55 SHARED_MEMORY_PUTIMAGE, |
| 56 SHARED_MEMORY_PIXMAP | 56 SHARED_MEMORY_PIXMAP |
| 57 }; | 57 }; |
| 58 // Return the shared memory type of our X connection. | 58 // Return the shared memory type of our X connection. |
| 59 UI_BASE_EXPORT SharedMemorySupport QuerySharedMemorySupport(XDisplay* dpy); | 59 UI_BASE_EXPORT SharedMemorySupport QuerySharedMemorySupport(XDisplay* dpy); |
| 60 | 60 |
| 61 // Return true iff the display supports Xrender |
| 62 UI_BASE_EXPORT bool QueryRenderSupport(XDisplay* dpy); |
| 63 |
| 61 // Returns an X11 Cursor, sharable across the process. | 64 // Returns an X11 Cursor, sharable across the process. |
| 62 // |cursor_shape| is an X font cursor shape, see XCreateFontCursor(). | 65 // |cursor_shape| is an X font cursor shape, see XCreateFontCursor(). |
| 63 UI_BASE_EXPORT ::Cursor GetXCursor(int cursor_shape); | 66 UI_BASE_EXPORT ::Cursor GetXCursor(int cursor_shape); |
| 64 | 67 |
| 65 // Resets the cache used by GetXCursor(). Only useful for tests that may delete | 68 // Resets the cache used by GetXCursor(). Only useful for tests that may delete |
| 66 // the display. | 69 // the display. |
| 67 UI_BASE_EXPORT void ResetXCursorCache(); | 70 UI_BASE_EXPORT void ResetXCursorCache(); |
| 68 | 71 |
| 69 // Creates a custom X cursor from the image. This takes ownership of image. The | 72 // Creates a custom X cursor from the image. This takes ownership of image. The |
| 70 // caller must not free/modify the image. The refcount of the newly created | 73 // caller must not free/modify the image. The refcount of the newly created |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 private: | 335 private: |
| 333 ::Cursor cursor_; | 336 ::Cursor cursor_; |
| 334 XDisplay* display_; | 337 XDisplay* display_; |
| 335 | 338 |
| 336 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); | 339 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); |
| 337 }; | 340 }; |
| 338 | 341 |
| 339 } // namespace ui | 342 } // namespace ui |
| 340 | 343 |
| 341 #endif // UI_BASE_X_X11_UTIL_H_ | 344 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |