| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 UI_EXPORT bool GetIntProperty(XID window, const std::string& property_name, | 116 UI_EXPORT bool GetIntProperty(XID window, const std::string& property_name, |
| 117 int* value); | 117 int* value); |
| 118 UI_EXPORT bool GetIntArrayProperty(XID window, const std::string& property_name, | 118 UI_EXPORT bool GetIntArrayProperty(XID window, const std::string& property_name, |
| 119 std::vector<int>* value); | 119 std::vector<int>* value); |
| 120 UI_EXPORT bool GetAtomArrayProperty(XID window, | 120 UI_EXPORT bool GetAtomArrayProperty(XID window, |
| 121 const std::string& property_name, | 121 const std::string& property_name, |
| 122 std::vector<Atom>* value); | 122 std::vector<Atom>* value); |
| 123 UI_EXPORT bool GetStringProperty( | 123 UI_EXPORT bool GetStringProperty( |
| 124 XID window, const std::string& property_name, std::string* value); | 124 XID window, const std::string& property_name, std::string* value); |
| 125 | 125 |
| 126 // Gets the X atom for default display corresponding to atom_name. |
| 127 Atom GetAtom(const char* atom_name); |
| 128 |
| 126 // Get |window|'s parent window, or None if |window| is the root window. | 129 // Get |window|'s parent window, or None if |window| is the root window. |
| 127 XID GetParentWindow(XID window); | 130 XID GetParentWindow(XID window); |
| 128 | 131 |
| 129 // Walk up |window|'s hierarchy until we find a direct child of |root|. | 132 // Walk up |window|'s hierarchy until we find a direct child of |root|. |
| 130 XID GetHighestAncestorWindow(XID window, XID root); | 133 XID GetHighestAncestorWindow(XID window, XID root); |
| 131 | 134 |
| 132 static const int kAllDesktops = -1; | 135 static const int kAllDesktops = -1; |
| 133 // Queries the desktop |window| is on, kAllDesktops if sticky. Returns false if | 136 // Queries the desktop |window| is on, kAllDesktops if sticky. Returns false if |
| 134 // property not found. | 137 // property not found. |
| 135 bool GetWindowDesktop(XID window, int* desktop); | 138 bool GetWindowDesktop(XID window, int* desktop); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h | 209 // the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h |
| 207 // to set your own error handlers. | 210 // to set your own error handlers. |
| 208 UI_EXPORT void SetDefaultX11ErrorHandlers(); | 211 UI_EXPORT void SetDefaultX11ErrorHandlers(); |
| 209 | 212 |
| 210 // Return true if a given window is in full-screen mode. | 213 // Return true if a given window is in full-screen mode. |
| 211 UI_EXPORT bool IsX11WindowFullScreen(XID window); | 214 UI_EXPORT bool IsX11WindowFullScreen(XID window); |
| 212 | 215 |
| 213 } // namespace ui | 216 } // namespace ui |
| 214 | 217 |
| 215 #endif // UI_BASE_X_X11_UTIL_H_ | 218 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |