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 27 matching lines...) Expand all Loading... | |
38 namespace ui { | 38 namespace ui { |
39 | 39 |
40 // These functions use the default display and this /must/ be called from | 40 // These functions use the default display and this /must/ be called from |
41 // the UI thread. Thus, they don't support multiple displays. | 41 // the UI thread. Thus, they don't support multiple displays. |
42 | 42 |
43 // These functions cache their results --------------------------------- | 43 // These functions cache their results --------------------------------- |
44 | 44 |
45 // Returns true if the system supports XINPUT2. | 45 // Returns true if the system supports XINPUT2. |
46 UI_BASE_EXPORT bool IsXInput2Available(); | 46 UI_BASE_EXPORT bool IsXInput2Available(); |
47 | 47 |
48 // Grabs the pointer. | |
49 UI_BASE_EXPORT int GrabPointer(XID window, bool owner_events, ::Cursor cursor); | |
50 | |
51 // Ungrabs the pointer. | |
52 UI_BASE_EXPORT void UngrabPointer(); | |
sadrul
2014/12/22 21:08:59
Would it be possible to have something like Scoped
| |
53 | |
48 // X shared memory comes in three flavors: | 54 // X shared memory comes in three flavors: |
49 // 1) No SHM support, | 55 // 1) No SHM support, |
50 // 2) SHM putimage, | 56 // 2) SHM putimage, |
51 // 3) SHM pixmaps + putimage. | 57 // 3) SHM pixmaps + putimage. |
52 enum SharedMemorySupport { | 58 enum SharedMemorySupport { |
53 SHARED_MEMORY_NONE, | 59 SHARED_MEMORY_NONE, |
54 SHARED_MEMORY_PUTIMAGE, | 60 SHARED_MEMORY_PUTIMAGE, |
55 SHARED_MEMORY_PIXMAP | 61 SHARED_MEMORY_PIXMAP |
56 }; | 62 }; |
57 // Return the shared memory type of our X connection. | 63 // Return the shared memory type of our X connection. |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
375 UI_BASE_EXPORT void ResetXCursorCache(); | 381 UI_BASE_EXPORT void ResetXCursorCache(); |
376 | 382 |
377 // Returns the cached XcursorImage for |cursor|. | 383 // Returns the cached XcursorImage for |cursor|. |
378 UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); | 384 UI_BASE_EXPORT const XcursorImage* GetCachedXcursorImage(::Cursor cursor); |
379 | 385 |
380 } // namespace test | 386 } // namespace test |
381 | 387 |
382 } // namespace ui | 388 } // namespace ui |
383 | 389 |
384 #endif // UI_BASE_X_X11_UTIL_H_ | 390 #endif // UI_BASE_X_X11_UTIL_H_ |
OLD | NEW |