| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 // Return the number of bits-per-pixel for a pixmap of the given depth | 139 // Return the number of bits-per-pixel for a pixmap of the given depth |
| 140 UI_EXPORT int BitsPerPixelForPixmapDepth(Display* display, int depth); | 140 UI_EXPORT int BitsPerPixelForPixmapDepth(Display* display, int depth); |
| 141 | 141 |
| 142 // Returns true if |window| is visible. | 142 // Returns true if |window| is visible. |
| 143 UI_EXPORT bool IsWindowVisible(XID window); | 143 UI_EXPORT bool IsWindowVisible(XID window); |
| 144 | 144 |
| 145 // Returns the bounds of |window|. | 145 // Returns the bounds of |window|. |
| 146 UI_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect); | 146 UI_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect); |
| 147 | 147 |
| 148 // Returns true if |window| contains the point |screen_loc|. |
| 149 UI_EXPORT bool WindowContainsPoint(XID window, gfx::Point screen_loc); |
| 150 |
| 148 // Return true if |window| has any property with |property_name|. | 151 // Return true if |window| has any property with |property_name|. |
| 149 UI_EXPORT bool PropertyExists(XID window, const std::string& property_name); | 152 UI_EXPORT bool PropertyExists(XID window, const std::string& property_name); |
| 150 | 153 |
| 151 // Get the value of an int, int array, atom array or string property. On | 154 // Get the value of an int, int array, atom array or string property. On |
| 152 // success, true is returned and the value is stored in |value|. | 155 // success, true is returned and the value is stored in |value|. |
| 153 UI_EXPORT bool GetIntProperty(XID window, const std::string& property_name, | 156 UI_EXPORT bool GetIntProperty(XID window, const std::string& property_name, |
| 154 int* value); | 157 int* value); |
| 155 UI_EXPORT bool GetIntArrayProperty(XID window, const std::string& property_name, | 158 UI_EXPORT bool GetIntArrayProperty(XID window, const std::string& property_name, |
| 156 std::vector<int>* value); | 159 std::vector<int>* value); |
| 157 UI_EXPORT bool GetAtomArrayProperty(XID window, | 160 UI_EXPORT bool GetAtomArrayProperty(XID window, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 private: | 371 private: |
| 369 ::Cursor cursor_; | 372 ::Cursor cursor_; |
| 370 Display* display_; | 373 Display* display_; |
| 371 | 374 |
| 372 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); | 375 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); |
| 373 }; | 376 }; |
| 374 | 377 |
| 375 } // namespace ui | 378 } // namespace ui |
| 376 | 379 |
| 377 #endif // UI_BASE_X_X11_UTIL_H_ | 380 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |