| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 const std::string& type, | 204 const std::string& type, |
| 205 const std::vector<int>& value); | 205 const std::vector<int>& value); |
| 206 UI_EXPORT bool SetAtomArrayProperty(XID window, | 206 UI_EXPORT bool SetAtomArrayProperty(XID window, |
| 207 const std::string& name, | 207 const std::string& name, |
| 208 const std::string& type, | 208 const std::string& type, |
| 209 const std::vector<Atom>& value); | 209 const std::vector<Atom>& value); |
| 210 | 210 |
| 211 // Gets the X atom for default display corresponding to atom_name. | 211 // Gets the X atom for default display corresponding to atom_name. |
| 212 Atom GetAtom(const char* atom_name); | 212 Atom GetAtom(const char* atom_name); |
| 213 | 213 |
| 214 // Sets the WM_CLASS attribute for a given X11 window. |
| 215 UI_EXPORT void SetWindowClassHint(Display* display, |
| 216 XID window, |
| 217 std::string res_name, |
| 218 std::string res_class); |
| 219 |
| 214 // Get |window|'s parent window, or None if |window| is the root window. | 220 // Get |window|'s parent window, or None if |window| is the root window. |
| 215 UI_EXPORT XID GetParentWindow(XID window); | 221 UI_EXPORT XID GetParentWindow(XID window); |
| 216 | 222 |
| 217 // Walk up |window|'s hierarchy until we find a direct child of |root|. | 223 // Walk up |window|'s hierarchy until we find a direct child of |root|. |
| 218 XID GetHighestAncestorWindow(XID window, XID root); | 224 XID GetHighestAncestorWindow(XID window, XID root); |
| 219 | 225 |
| 220 static const int kAllDesktops = -1; | 226 static const int kAllDesktops = -1; |
| 221 // Queries the desktop |window| is on, kAllDesktops if sticky. Returns false if | 227 // Queries the desktop |window| is on, kAllDesktops if sticky. Returns false if |
| 222 // property not found. | 228 // property not found. |
| 223 bool GetWindowDesktop(XID window, int* desktop); | 229 bool GetWindowDesktop(XID window, int* desktop); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 private: | 428 private: |
| 423 ::Cursor cursor_; | 429 ::Cursor cursor_; |
| 424 Display* display_; | 430 Display* display_; |
| 425 | 431 |
| 426 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); | 432 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); |
| 427 }; | 433 }; |
| 428 | 434 |
| 429 } // namespace ui | 435 } // namespace ui |
| 430 | 436 |
| 431 #endif // UI_BASE_X_X11_UTIL_H_ | 437 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |