| 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_CURSOR_FACTORY_EVDEV_DRI_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_ | 6 #define UI_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_ |
| 7 | 7 |
| 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" | 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" |
| 9 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" | 9 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" |
| 10 #include "ui/gfx/geometry/point.h" | 10 #include "ui/gfx/geometry/point.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // BitmapCursorFactoryOzone: | 25 // BitmapCursorFactoryOzone: |
| 26 virtual gfx::AcceleratedWidget GetCursorWindow() OVERRIDE; | 26 virtual gfx::AcceleratedWidget GetCursorWindow() OVERRIDE; |
| 27 virtual void SetBitmapCursor(gfx::AcceleratedWidget widget, | 27 virtual void SetBitmapCursor(gfx::AcceleratedWidget widget, |
| 28 scoped_refptr<BitmapCursorOzone> cursor) | 28 scoped_refptr<BitmapCursorOzone> cursor) |
| 29 OVERRIDE; | 29 OVERRIDE; |
| 30 | 30 |
| 31 // CursorDelegateEvdev: | 31 // CursorDelegateEvdev: |
| 32 virtual void MoveCursorTo(gfx::AcceleratedWidget widget, | 32 virtual void MoveCursorTo(gfx::AcceleratedWidget widget, |
| 33 const gfx::PointF& location) OVERRIDE; | 33 const gfx::PointF& location) OVERRIDE; |
| 34 virtual void MoveCursor(const gfx::Vector2dF& delta) OVERRIDE; | 34 virtual void MoveCursor(const gfx::Vector2dF& delta) OVERRIDE; |
| 35 virtual bool IsCursorVisible() OVERRIDE; |
| 35 virtual gfx::PointF location() OVERRIDE; | 36 virtual gfx::PointF location() OVERRIDE; |
| 36 | 37 |
| 37 private: | 38 private: |
| 38 // The location of the bitmap (the cursor location is the hotspot location). | 39 // The location of the bitmap (the cursor location is the hotspot location). |
| 39 gfx::Point bitmap_location(); | 40 gfx::Point bitmap_location(); |
| 40 | 41 |
| 41 // The DRI implementation for setting the hardware cursor. | 42 // The DRI implementation for setting the hardware cursor. |
| 42 HardwareCursorDelegate* hardware_; | 43 HardwareCursorDelegate* hardware_; |
| 43 | 44 |
| 44 // The current cursor bitmap. | 45 // The current cursor bitmap. |
| 45 scoped_refptr<BitmapCursorOzone> cursor_; | 46 scoped_refptr<BitmapCursorOzone> cursor_; |
| 46 | 47 |
| 47 // The window under the cursor. | 48 // The window under the cursor. |
| 48 gfx::AcceleratedWidget cursor_window_; | 49 gfx::AcceleratedWidget cursor_window_; |
| 49 | 50 |
| 50 // The location of the cursor within the window. | 51 // The location of the cursor within the window. |
| 51 gfx::PointF cursor_location_; | 52 gfx::PointF cursor_location_; |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 } // namespace ui | 55 } // namespace ui |
| 55 | 56 |
| 56 #endif // UI_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_ | 57 #endif // UI_OZONE_PLATFORM_DRI_CURSOR_FACTORY_EVDEV_DRI_H_ |
| OLD | NEW |