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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 UI_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect); | 158 UI_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect); |
159 | 159 |
160 // Returns true if |window| contains the point |screen_loc|. | 160 // Returns true if |window| contains the point |screen_loc|. |
161 UI_EXPORT bool WindowContainsPoint(XID window, gfx::Point screen_loc); | 161 UI_EXPORT bool WindowContainsPoint(XID window, gfx::Point screen_loc); |
162 | 162 |
163 // Return true if |window| has any property with |property_name|. | 163 // Return true if |window| has any property with |property_name|. |
164 UI_EXPORT bool PropertyExists(XID window, const std::string& property_name); | 164 UI_EXPORT bool PropertyExists(XID window, const std::string& property_name); |
165 | 165 |
166 // Get the value of an int, int array, atom array or string property. On | 166 // Get the value of an int, int array, atom array or string property. On |
167 // success, true is returned and the value is stored in |value|. | 167 // success, true is returned and the value is stored in |value|. |
| 168 // |
| 169 // TODO(erg): Once we remove the gtk port and are 100% aura, all of these |
| 170 // should accept an Atom instead of a string. |
168 UI_EXPORT bool GetIntProperty(XID window, const std::string& property_name, | 171 UI_EXPORT bool GetIntProperty(XID window, const std::string& property_name, |
169 int* value); | 172 int* value); |
170 UI_EXPORT bool GetIntArrayProperty(XID window, const std::string& property_name, | 173 UI_EXPORT bool GetIntArrayProperty(XID window, const std::string& property_name, |
171 std::vector<int>* value); | 174 std::vector<int>* value); |
172 UI_EXPORT bool GetAtomArrayProperty(XID window, | 175 UI_EXPORT bool GetAtomArrayProperty(XID window, |
173 const std::string& property_name, | 176 const std::string& property_name, |
174 std::vector<Atom>* value); | 177 std::vector<Atom>* value); |
175 UI_EXPORT bool GetStringProperty( | 178 UI_EXPORT bool GetStringProperty( |
176 XID window, const std::string& property_name, std::string* value); | 179 XID window, const std::string& property_name, std::string* value); |
177 | 180 |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 private: | 400 private: |
398 ::Cursor cursor_; | 401 ::Cursor cursor_; |
399 Display* display_; | 402 Display* display_; |
400 | 403 |
401 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); | 404 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); |
402 }; | 405 }; |
403 | 406 |
404 } // namespace ui | 407 } // namespace ui |
405 | 408 |
406 #endif // UI_BASE_X_X11_UTIL_H_ | 409 #endif // UI_BASE_X_X11_UTIL_H_ |
OLD | NEW |