mouse_warp_controller.h 923 B

123456789101112131415161718192021222324252627282930313233
  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 ASH_DISPLAY_MOUSE_WARP_CONTROLLER_H_
  5. #define ASH_DISPLAY_MOUSE_WARP_CONTROLLER_H_
  6. #include "ash/ash_export.h"
  7. namespace ui {
  8. class MouseEvent;
  9. }
  10. namespace ash {
  11. // MouseWarpController implements the mouse warp behavior for
  12. // different display modes and platforms.
  13. class ASH_EXPORT MouseWarpController {
  14. public:
  15. virtual ~MouseWarpController() {}
  16. // An implementaion may warp the mouse cursor to another display
  17. // when necessary. Returns true if the mouse cursor has been
  18. // moved to another display, or false otherwise.
  19. virtual bool WarpMouseCursor(ui::MouseEvent* event) = 0;
  20. // Enables/Disables mouse warping.
  21. virtual void SetEnabled(bool enable) = 0;
  22. };
  23. } // namespace ash
  24. #endif // ASH_DISPLAY_MOUSE_WARP_CONTROLLER_H_