OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 |
| 5 #ifndef UI_OZONE_PLATFORM_DRM_HOST_DRM_CURSOR_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_CURSOR_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 #include "base/logging.h" |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/synchronization/lock.h" |
| 13 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" |
| 14 #include "ui/gfx/geometry/point_f.h" |
| 15 #include "ui/gfx/geometry/rect.h" |
| 16 #include "ui/gfx/native_widget_types.h" |
| 17 #include "ui/ozone/public/gpu_platform_support_host.h" |
| 18 #include "ui/platform_window/platform_window.h" // for PlatformCursor |
| 19 |
| 20 namespace gfx { |
| 21 class PointF; |
| 22 class Vector2dF; |
| 23 class Rect; |
| 24 } |
| 25 |
| 26 namespace ui { |
| 27 |
| 28 class BitmapCursorOzone; |
| 29 class BitmapCursorFactoryOzone; |
| 30 class DrmGpuPlatformSupportHost; |
| 31 class DrmWindowHostManager; |
| 32 |
| 33 class DrmCursor : public CursorDelegateEvdev { |
| 34 public: |
| 35 explicit DrmCursor(DrmWindowHostManager* window_manager); |
| 36 ~DrmCursor() override; |
| 37 |
| 38 // Change the cursor over the specifed window. |
| 39 void SetCursor(gfx::AcceleratedWidget window, PlatformCursor platform_cursor); |
| 40 |
| 41 // Handle window lifecycle. |
| 42 void OnWindowAdded(gfx::AcceleratedWidget window, |
| 43 const gfx::Rect& bounds_in_screen, |
| 44 const gfx::Rect& cursor_confined_bounds); |
| 45 void OnWindowRemoved(gfx::AcceleratedWidget window); |
| 46 |
| 47 // Handle window bounds changes. |
| 48 void CommitBoundsChange(gfx::AcceleratedWidget window, |
| 49 const gfx::Rect& new_display_bounds_in_screen, |
| 50 const gfx::Rect& new_confined_bounds); |
| 51 |
| 52 // CursorDelegateEvdev: |
| 53 void MoveCursorTo(gfx::AcceleratedWidget window, |
| 54 const gfx::PointF& location) override; |
| 55 void MoveCursorTo(const gfx::PointF& screen_location) override; |
| 56 void MoveCursor(const gfx::Vector2dF& delta) override; |
| 57 bool IsCursorVisible() override; |
| 58 gfx::PointF GetLocation() override; |
| 59 gfx::Rect GetCursorConfinedBounds() override; |
| 60 }; |
| 61 |
| 62 } // namespace ui |
| 63 |
| 64 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_CURSOR_H_ |
OLD | NEW |