| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_OZONE_PLATFORM_DRI_DRI_CURSOR_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_CURSOR_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_DRI_CURSOR_H_ | 6 #define UI_OZONE_PLATFORM_DRI_DRI_CURSOR_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "ui/base/cursor/cursor.h" | 9 #include "ui/base/cursor/cursor.h" |
| 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" | 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 void ShowCursor(); | 36 void ShowCursor(); |
| 37 void HideCursor(); | 37 void HideCursor(); |
| 38 gfx::AcceleratedWidget GetCursorWindow(); | 38 gfx::AcceleratedWidget GetCursorWindow(); |
| 39 | 39 |
| 40 // CursorDelegateEvdev: | 40 // CursorDelegateEvdev: |
| 41 void MoveCursorTo(gfx::AcceleratedWidget widget, | 41 void MoveCursorTo(gfx::AcceleratedWidget widget, |
| 42 const gfx::PointF& location) override; | 42 const gfx::PointF& location) override; |
| 43 void MoveCursorTo(const gfx::PointF& location) override; | 43 void MoveCursorTo(const gfx::PointF& location) override; |
| 44 void MoveCursor(const gfx::Vector2dF& delta) override; | 44 void MoveCursor(const gfx::Vector2dF& delta) override; |
| 45 bool IsCursorVisible() override; | 45 bool IsCursorVisible() override; |
| 46 gfx::PointF location() override; | 46 gfx::PointF GetLocation() override; |
| 47 gfx::PointF GetRootLocation() override; |
| 47 gfx::Rect GetCursorDisplayBounds() override; | 48 gfx::Rect GetCursorDisplayBounds() override; |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 // The location of the bitmap (the cursor location is the hotspot location). | 51 // The location of the bitmap (the cursor location is the hotspot location). |
| 51 gfx::Point bitmap_location(); | 52 gfx::Point bitmap_location(); |
| 52 | 53 |
| 53 // The DRI implementation for setting the hardware cursor. | 54 // The DRI implementation for setting the hardware cursor. |
| 54 HardwareCursorDelegate* hardware_; | 55 HardwareCursorDelegate* hardware_; |
| 55 | 56 |
| 56 DriWindowManager* window_manager_; // Not owned. | 57 DriWindowManager* window_manager_; // Not owned. |
| 57 | 58 |
| 58 // The current cursor bitmap. | 59 // The current cursor bitmap. |
| 59 scoped_refptr<BitmapCursorOzone> cursor_; | 60 scoped_refptr<BitmapCursorOzone> cursor_; |
| 60 | 61 |
| 61 // The window under the cursor. | 62 // The window under the cursor. |
| 62 gfx::AcceleratedWidget cursor_window_; | 63 gfx::AcceleratedWidget cursor_window_; |
| 63 | 64 |
| 64 // The location of the cursor within the window. | 65 // The location of the cursor within the window. |
| 65 gfx::PointF cursor_location_; | 66 gfx::PointF cursor_location_; |
| 67 |
| 68 // The location of the cursor within the screen. |
| 69 gfx::PointF cursor_root_location_; |
| 66 }; | 70 }; |
| 67 | 71 |
| 68 } // namespace ui | 72 } // namespace ui |
| 69 | 73 |
| 70 #endif // UI_OZONE_PLATFORM_DRI_DRI_CURSOR_H_ | 74 #endif // UI_OZONE_PLATFORM_DRI_DRI_CURSOR_H_ |
| OLD | NEW |