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