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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 WM_METACITY, | 255 WM_METACITY, |
256 WM_MUFFIN, | 256 WM_MUFFIN, |
257 WM_MUTTER, | 257 WM_MUTTER, |
258 WM_OPENBOX, | 258 WM_OPENBOX, |
259 WM_XFWM4, | 259 WM_XFWM4, |
260 }; | 260 }; |
261 // Attempts to guess the window maager. Returns WM_UNKNOWN if we can't | 261 // Attempts to guess the window maager. Returns WM_UNKNOWN if we can't |
262 // determine it for one reason or another. | 262 // determine it for one reason or another. |
263 UI_BASE_EXPORT WindowManagerName GuessWindowManager(); | 263 UI_BASE_EXPORT WindowManagerName GuessWindowManager(); |
264 | 264 |
| 265 // The same as GuessWindowManager(), but returns the raw string. If we |
| 266 // can't determine it, return "Unknown". |
| 267 UI_BASE_EXPORT std::string GuessWindowManagerName(); |
| 268 |
265 // Enable the default X error handlers. These will log the error and abort | 269 // Enable the default X error handlers. These will log the error and abort |
266 // the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h | 270 // the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h |
267 // to set your own error handlers. | 271 // to set your own error handlers. |
268 UI_BASE_EXPORT void SetDefaultX11ErrorHandlers(); | 272 UI_BASE_EXPORT void SetDefaultX11ErrorHandlers(); |
269 | 273 |
270 // Returns true if a given window is in full-screen mode. | 274 // Returns true if a given window is in full-screen mode. |
271 UI_BASE_EXPORT bool IsX11WindowFullScreen(XID window); | 275 UI_BASE_EXPORT bool IsX11WindowFullScreen(XID window); |
272 | 276 |
273 // Returns true if the window manager supports the given hint. | 277 // Returns true if the window manager supports the given hint. |
274 UI_BASE_EXPORT bool WmSupportsHint(XAtom atom); | 278 UI_BASE_EXPORT bool WmSupportsHint(XAtom atom); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 UI_BASE_EXPORT void ResetXCursorCache(); | 356 UI_BASE_EXPORT void ResetXCursorCache(); |
353 | 357 |
354 // Returns the cached XcursorImage for |cursor|. | 358 // Returns the cached XcursorImage for |cursor|. |
355 UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); | 359 UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); |
356 | 360 |
357 } // namespace test | 361 } // namespace test |
358 | 362 |
359 } // namespace ui | 363 } // namespace ui |
360 | 364 |
361 #endif // UI_BASE_X_X11_UTIL_H_ | 365 #endif // UI_BASE_X_X11_UTIL_H_ |
OLD | NEW |