Chromium Code Reviews| 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 19 matching lines...) Expand all Loading... | |
| 30 namespace gfx { | 30 namespace gfx { |
| 31 class Canvas; | 31 class Canvas; |
| 32 class Insets; | 32 class Insets; |
| 33 class Point; | 33 class Point; |
| 34 class Rect; | 34 class Rect; |
| 35 } | 35 } |
| 36 class SkBitmap; | 36 class SkBitmap; |
| 37 | 37 |
| 38 namespace ui { | 38 namespace ui { |
| 39 | 39 |
| 40 enum class NetWmMoveResize { | |
|
Daniel Erat
2016/10/12 16:13:10
nit: add a comment saying that these must match th
Tom (Use chromium acct)
2016/10/12 18:08:27
Done.
| |
| 41 SIZE_TOPLEFT, | |
| 42 SIZE_TOP, | |
| 43 SIZE_TOPRIGHT, | |
| 44 SIZE_RIGHT, | |
| 45 SIZE_BOTTOMRIGHT, | |
| 46 SIZE_BOTTOM, | |
| 47 SIZE_BOTTOMLEFT, | |
| 48 SIZE_LEFT, | |
| 49 MOVE, // movement only | |
| 50 SIZE_KEYBOARD, // size via keyboard | |
| 51 MOVE_KEYBOARD, // move via keyboard | |
| 52 CANCEL, // cancel operation | |
| 53 }; | |
| 54 | |
| 40 // These functions use the default display and this /must/ be called from | 55 // These functions use the default display and this /must/ be called from |
| 41 // the UI thread. Thus, they don't support multiple displays. | 56 // the UI thread. Thus, they don't support multiple displays. |
| 42 | 57 |
| 43 // These functions cache their results --------------------------------- | 58 // These functions cache their results --------------------------------- |
| 44 | 59 |
| 45 // Returns true if the system supports XINPUT2. | 60 // Returns true if the system supports XINPUT2. |
| 46 UI_BASE_X_EXPORT bool IsXInput2Available(); | 61 UI_BASE_X_EXPORT bool IsXInput2Available(); |
| 47 | 62 |
| 48 // Return true iff the display supports Xrender | 63 // Return true iff the display supports Xrender |
| 49 UI_BASE_X_EXPORT bool QueryRenderSupport(XDisplay* dpy); | 64 UI_BASE_X_EXPORT bool QueryRenderSupport(XDisplay* dpy); |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 77 | 92 |
| 78 // Hides the host cursor. | 93 // Hides the host cursor. |
| 79 UI_BASE_X_EXPORT void HideHostCursor(); | 94 UI_BASE_X_EXPORT void HideHostCursor(); |
| 80 | 95 |
| 81 // Returns an invisible cursor. | 96 // Returns an invisible cursor. |
| 82 UI_BASE_X_EXPORT::Cursor CreateInvisibleCursor(); | 97 UI_BASE_X_EXPORT::Cursor CreateInvisibleCursor(); |
| 83 | 98 |
| 84 // Sets whether |window| should use the OS window frame. | 99 // Sets whether |window| should use the OS window frame. |
| 85 UI_BASE_X_EXPORT void SetUseOSWindowFrame(XID window, bool use_os_window_frame); | 100 UI_BASE_X_EXPORT void SetUseOSWindowFrame(XID window, bool use_os_window_frame); |
| 86 | 101 |
| 102 // Requests the window manager move or resize the window on behalf of Chromium. | |
| 103 // Clients MUST release all grabs prior to calling. | |
|
Daniel Erat
2016/10/12 16:13:10
maybe document that this isn't implemented by all
Tom (Use chromium acct)
2016/10/12 18:08:27
Done.
| |
| 104 UI_BASE_X_EXPORT void MoveResizeWindowManaged(XID window, | |
|
Daniel Erat
2016/10/12 16:13:10
nit: change "WindowManaged" to "ManagedWindow"?
Tom (Use chromium acct)
2016/10/12 18:08:27
Done.
| |
| 105 gfx::Point origin, | |
|
Daniel Erat
2016/10/12 16:13:10
per the spec, this is actually the pointer positio
Tom (Use chromium acct)
2016/10/12 18:08:27
Done.
| |
| 106 NetWmMoveResize mode); | |
| 107 | |
| 87 // These functions do not cache their results -------------------------- | 108 // These functions do not cache their results -------------------------- |
| 88 | 109 |
| 89 // Returns true if the shape extension is supported. | 110 // Returns true if the shape extension is supported. |
| 90 UI_BASE_X_EXPORT bool IsShapeExtensionAvailable(); | 111 UI_BASE_X_EXPORT bool IsShapeExtensionAvailable(); |
| 91 | 112 |
| 92 // Get the X window id for the default root window | 113 // Get the X window id for the default root window |
| 93 UI_BASE_X_EXPORT XID GetX11RootWindow(); | 114 UI_BASE_X_EXPORT XID GetX11RootWindow(); |
| 94 | 115 |
| 95 // Returns the user's current desktop. | 116 // Returns the user's current desktop. |
| 96 UI_BASE_X_EXPORT bool GetCurrentDesktop(int* desktop); | 117 UI_BASE_X_EXPORT bool GetCurrentDesktop(int* desktop); |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 UI_BASE_X_EXPORT void ResetXCursorCache(); | 350 UI_BASE_X_EXPORT void ResetXCursorCache(); |
| 330 | 351 |
| 331 // Returns the cached XcursorImage for |cursor|. | 352 // Returns the cached XcursorImage for |cursor|. |
| 332 UI_BASE_X_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); | 353 UI_BASE_X_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); |
| 333 | 354 |
| 334 } // namespace test | 355 } // namespace test |
| 335 | 356 |
| 336 } // namespace ui | 357 } // namespace ui |
| 337 | 358 |
| 338 #endif // UI_BASE_X_X11_UTIL_H_ | 359 #endif // UI_BASE_X_X11_UTIL_H_ |
| OLD | NEW |