| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // This file declares utility functions for X11 (Linux only). | 9 // This file declares utility functions for X11 (Linux only). |
| 10 // | 10 // |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 }; | 61 }; |
| 62 // Return the shared memory type of our X connection. | 62 // Return the shared memory type of our X connection. |
| 63 UI_EXPORT SharedMemorySupport QuerySharedMemorySupport(Display* dpy); | 63 UI_EXPORT SharedMemorySupport QuerySharedMemorySupport(Display* dpy); |
| 64 | 64 |
| 65 // Return true iff the display supports Xrender | 65 // Return true iff the display supports Xrender |
| 66 UI_EXPORT bool QueryRenderSupport(Display* dpy); | 66 UI_EXPORT bool QueryRenderSupport(Display* dpy); |
| 67 | 67 |
| 68 // Return the default screen number for the display | 68 // Return the default screen number for the display |
| 69 int GetDefaultScreen(Display* display); | 69 int GetDefaultScreen(Display* display); |
| 70 | 70 |
| 71 // TODO(xiyuan): Fix the stale XCursorCache problem properly. |
| 72 // A special cursor that makes GetXCursor below to clear its XCursorCache. |
| 73 const int kCursorClearXCursorCache = -1; |
| 74 |
| 71 // Returns an X11 Cursor, sharable across the process. | 75 // Returns an X11 Cursor, sharable across the process. |
| 72 // |cursor_shape| is an X font cursor shape, see XCreateFontCursor(). | 76 // |cursor_shape| is an X font cursor shape, see XCreateFontCursor(). |
| 73 UI_EXPORT Cursor GetXCursor(int cursor_shape); | 77 UI_EXPORT Cursor GetXCursor(int cursor_shape); |
| 74 | 78 |
| 75 // These functions do not cache their results -------------------------- | 79 // These functions do not cache their results -------------------------- |
| 76 | 80 |
| 77 // Get the X window id for the default root window | 81 // Get the X window id for the default root window |
| 78 UI_EXPORT XID GetX11RootWindow(); | 82 UI_EXPORT XID GetX11RootWindow(); |
| 79 | 83 |
| 80 // Returns the user's current desktop. | 84 // Returns the user's current desktop. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h | 206 // the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h |
| 203 // to set your own error handlers. | 207 // to set your own error handlers. |
| 204 UI_EXPORT void SetDefaultX11ErrorHandlers(); | 208 UI_EXPORT void SetDefaultX11ErrorHandlers(); |
| 205 | 209 |
| 206 // Return true if a given window is in full-screen mode. | 210 // Return true if a given window is in full-screen mode. |
| 207 UI_EXPORT bool IsX11WindowFullScreen(XID window); | 211 UI_EXPORT bool IsX11WindowFullScreen(XID window); |
| 208 | 212 |
| 209 } // namespace ui | 213 } // namespace ui |
| 210 | 214 |
| 211 #endif // UI_BASE_X_X11_UTIL_H_ | 215 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |