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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 XID window, | 197 XID window, |
198 const std::string& role); | 198 const std::string& role); |
199 | 199 |
200 // Determine whether we should default to native decorations or the custom | 200 // Determine whether we should default to native decorations or the custom |
201 // frame based on the currently-running window manager. | 201 // frame based on the currently-running window manager. |
202 UI_BASE_X_EXPORT bool GetCustomFramePrefDefault(); | 202 UI_BASE_X_EXPORT bool GetCustomFramePrefDefault(); |
203 | 203 |
204 static const int kAllDesktops = -1; | 204 static const int kAllDesktops = -1; |
205 // Queries the desktop |window| is on, kAllDesktops if sticky. Returns false if | 205 // Queries the desktop |window| is on, kAllDesktops if sticky. Returns false if |
206 // property not found. | 206 // property not found. |
207 bool GetWindowDesktop(XID window, int* desktop); | 207 UI_BASE_X_EXPORT bool GetWindowDesktop(XID window, int* desktop); |
208 | 208 |
209 // Translates an X11 error code into a printable string. | 209 // Translates an X11 error code into a printable string. |
210 UI_BASE_X_EXPORT std::string GetX11ErrorString(XDisplay* display, int err); | 210 UI_BASE_X_EXPORT std::string GetX11ErrorString(XDisplay* display, int err); |
211 | 211 |
212 // Implementers of this interface receive a notification for every X window of | 212 // Implementers of this interface receive a notification for every X window of |
213 // the main display. | 213 // the main display. |
214 class EnumerateWindowsDelegate { | 214 class EnumerateWindowsDelegate { |
215 public: | 215 public: |
216 // |xid| is the X Window ID of the enumerated window. Return true to stop | 216 // |xid| is the X Window ID of the enumerated window. Return true to stop |
217 // further iteration. | 217 // further iteration. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 UI_BASE_X_EXPORT void ResetXCursorCache(); | 331 UI_BASE_X_EXPORT void ResetXCursorCache(); |
332 | 332 |
333 // Returns the cached XcursorImage for |cursor|. | 333 // Returns the cached XcursorImage for |cursor|. |
334 UI_BASE_X_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); | 334 UI_BASE_X_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); |
335 | 335 |
336 } // namespace test | 336 } // namespace test |
337 | 337 |
338 } // namespace ui | 338 } // namespace ui |
339 | 339 |
340 #endif // UI_BASE_X_X11_UTIL_H_ | 340 #endif // UI_BASE_X_X11_UTIL_H_ |
OLD | NEW |