| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // |last_event|. | 86 // |last_event|. |
| 87 UI_BASE_EXPORT int CoalescePendingMotionEvents(const XEvent* xev, | 87 UI_BASE_EXPORT int CoalescePendingMotionEvents(const XEvent* xev, |
| 88 XEvent* last_event); | 88 XEvent* last_event); |
| 89 | 89 |
| 90 // Hides the host cursor. | 90 // Hides the host cursor. |
| 91 UI_BASE_EXPORT void HideHostCursor(); | 91 UI_BASE_EXPORT void HideHostCursor(); |
| 92 | 92 |
| 93 // Returns an invisible cursor. | 93 // Returns an invisible cursor. |
| 94 UI_BASE_EXPORT ::Cursor CreateInvisibleCursor(); | 94 UI_BASE_EXPORT ::Cursor CreateInvisibleCursor(); |
| 95 | 95 |
| 96 // Sets whether |window| should use the OS window frame. |
| 97 UI_BASE_EXPORT void SetUseOSWindowFrame(XID window, bool use_os_window_frame); |
| 98 |
| 96 // These functions do not cache their results -------------------------- | 99 // These functions do not cache their results -------------------------- |
| 97 | 100 |
| 98 // Returns true if the shape extension is supported. | 101 // Returns true if the shape extension is supported. |
| 99 UI_BASE_EXPORT bool IsShapeExtensionAvailable(); | 102 UI_BASE_EXPORT bool IsShapeExtensionAvailable(); |
| 100 | 103 |
| 101 // Get the X window id for the default root window | 104 // Get the X window id for the default root window |
| 102 UI_BASE_EXPORT XID GetX11RootWindow(); | 105 UI_BASE_EXPORT XID GetX11RootWindow(); |
| 103 | 106 |
| 104 // Returns the user's current desktop. | 107 // Returns the user's current desktop. |
| 105 bool GetCurrentDesktop(int* desktop); | 108 bool GetCurrentDesktop(int* desktop); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 165 |
| 163 // These setters all make round trips. | 166 // These setters all make round trips. |
| 164 UI_BASE_EXPORT bool SetIntProperty(XID window, | 167 UI_BASE_EXPORT bool SetIntProperty(XID window, |
| 165 const std::string& name, | 168 const std::string& name, |
| 166 const std::string& type, | 169 const std::string& type, |
| 167 int value); | 170 int value); |
| 168 UI_BASE_EXPORT bool SetIntArrayProperty(XID window, | 171 UI_BASE_EXPORT bool SetIntArrayProperty(XID window, |
| 169 const std::string& name, | 172 const std::string& name, |
| 170 const std::string& type, | 173 const std::string& type, |
| 171 const std::vector<int>& value); | 174 const std::vector<int>& value); |
| 175 UI_BASE_EXPORT bool SetAtomProperty(XID window, |
| 176 const std::string& name, |
| 177 const std::string& type, |
| 178 Atom value); |
| 172 UI_BASE_EXPORT bool SetAtomArrayProperty(XID window, | 179 UI_BASE_EXPORT bool SetAtomArrayProperty(XID window, |
| 173 const std::string& name, | 180 const std::string& name, |
| 174 const std::string& type, | 181 const std::string& type, |
| 175 const std::vector<Atom>& value); | 182 const std::vector<Atom>& value); |
| 176 UI_BASE_EXPORT bool SetStringProperty(XID window, | 183 UI_BASE_EXPORT bool SetStringProperty(XID window, |
| 177 Atom property, | 184 Atom property, |
| 178 Atom type, | 185 Atom type, |
| 179 const std::string& value); | 186 const std::string& value); |
| 180 | 187 |
| 181 // Gets the X atom for default display corresponding to atom_name. | 188 // Gets the X atom for default display corresponding to atom_name. |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 UI_BASE_EXPORT void ResetXCursorCache(); | 351 UI_BASE_EXPORT void ResetXCursorCache(); |
| 345 | 352 |
| 346 // Returns the cached XcursorImage for |cursor|. | 353 // Returns the cached XcursorImage for |cursor|. |
| 347 UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); | 354 UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); |
| 348 | 355 |
| 349 } // namespace test | 356 } // namespace test |
| 350 | 357 |
| 351 } // namespace ui | 358 } // namespace ui |
| 352 | 359 |
| 353 #endif // UI_BASE_X_X11_UTIL_H_ | 360 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |