x11_pointer_grab.h 928 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2015 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef UI_BASE_X_X11_POINTER_GRAB_H_
  5. #define UI_BASE_X_X11_POINTER_GRAB_H_
  6. #include "base/component_export.h"
  7. #include "ui/gfx/x/xproto.h"
  8. namespace ui {
  9. class X11Cursor;
  10. // Grabs the pointer. It is unnecessary to ungrab the pointer prior to grabbing
  11. // it.
  12. COMPONENT_EXPORT(UI_BASE_X)
  13. x11::GrabStatus GrabPointer(x11::Window window,
  14. bool owner_events,
  15. scoped_refptr<ui::X11Cursor> cursor);
  16. // Sets the cursor to use for the duration of the active pointer grab.
  17. COMPONENT_EXPORT(UI_BASE_X)
  18. void ChangeActivePointerGrabCursor(scoped_refptr<ui::X11Cursor> cursor);
  19. // Ungrabs the pointer.
  20. COMPONENT_EXPORT(UI_BASE_X) void UngrabPointer();
  21. } // namespace ui
  22. #endif // UI_BASE_X_X11_POINTER_GRAB_H_