| 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 24 matching lines...) Expand all Loading... |
| 35 void ShowCursor(); | 35 void ShowCursor(); |
| 36 void HideCursor(); | 36 void HideCursor(); |
| 37 gfx::AcceleratedWidget GetCursorWindow(); | 37 gfx::AcceleratedWidget GetCursorWindow(); |
| 38 | 38 |
| 39 // CursorDelegateEvdev: | 39 // CursorDelegateEvdev: |
| 40 void MoveCursorTo(gfx::AcceleratedWidget widget, | 40 void MoveCursorTo(gfx::AcceleratedWidget widget, |
| 41 const gfx::PointF& location) override; | 41 const gfx::PointF& location) override; |
| 42 void MoveCursor(const gfx::Vector2dF& delta) override; | 42 void MoveCursor(const gfx::Vector2dF& delta) override; |
| 43 bool IsCursorVisible() override; | 43 bool IsCursorVisible() override; |
| 44 gfx::PointF location() override; | 44 gfx::PointF location() override; |
| 45 gfx::PointF root_location() override; |
| 45 | 46 |
| 46 private: | 47 private: |
| 47 // The location of the bitmap (the cursor location is the hotspot location). | 48 // The location of the bitmap (the cursor location is the hotspot location). |
| 48 gfx::Point bitmap_location(); | 49 gfx::Point bitmap_location(); |
| 49 | 50 |
| 50 // The DRI implementation for setting the hardware cursor. | 51 // The DRI implementation for setting the hardware cursor. |
| 51 HardwareCursorDelegate* hardware_; | 52 HardwareCursorDelegate* hardware_; |
| 52 | 53 |
| 53 DriWindowManager* window_manager_; // Not owned. | 54 DriWindowManager* window_manager_; // Not owned. |
| 54 | 55 |
| 55 // The current cursor bitmap. | 56 // The current cursor bitmap. |
| 56 scoped_refptr<BitmapCursorOzone> cursor_; | 57 scoped_refptr<BitmapCursorOzone> cursor_; |
| 57 | 58 |
| 58 // The window under the cursor. | 59 // The window under the cursor. |
| 59 gfx::AcceleratedWidget cursor_window_; | 60 gfx::AcceleratedWidget cursor_window_; |
| 60 | 61 |
| 61 // The location of the cursor within the window. | 62 // The location of the cursor within the window. |
| 62 gfx::PointF cursor_location_; | 63 gfx::PointF cursor_location_; |
| 64 |
| 65 // The location of the cursor within the screen. |
| 66 gfx::PointF cursor_root_location_; |
| 63 }; | 67 }; |
| 64 | 68 |
| 65 } // namespace ui | 69 } // namespace ui |
| 66 | 70 |
| 67 #endif // UI_OZONE_PLATFORM_DRI_DRI_CURSOR_H_ | 71 #endif // UI_OZONE_PLATFORM_DRI_DRI_CURSOR_H_ |
| OLD | NEW |