diff options
author | 2020-04-30 08:16:38 +0200 | |
---|---|---|
committer | 2020-04-30 08:16:38 +0200 | |
commit | 98bc8cf2a7c4944d762a0148ca9f615d6ccc0d6e (patch) | |
tree | 9e22665e41793517b7ba0b48d7315d3283dfde91 /wgpu/src/widget/canvas | |
parent | d4c4198f7242f168de65146e0ca339e0c1cbfe9b (diff) | |
download | iced-98bc8cf2a7c4944d762a0148ca9f615d6ccc0d6e.tar.gz iced-98bc8cf2a7c4944d762a0148ca9f615d6ccc0d6e.tar.bz2 iced-98bc8cf2a7c4944d762a0148ca9f615d6ccc0d6e.zip |
Rename `MouseCursor` to `mouse::Interaction`
Diffstat (limited to 'wgpu/src/widget/canvas')
-rw-r--r-- | wgpu/src/widget/canvas/program.rs | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/wgpu/src/widget/canvas/program.rs b/wgpu/src/widget/canvas/program.rs index 5b995bfa..725d9d72 100644 --- a/wgpu/src/widget/canvas/program.rs +++ b/wgpu/src/widget/canvas/program.rs @@ -1,5 +1,5 @@ use crate::canvas::{Cursor, Event, Geometry}; -use iced_native::{MouseCursor, Rectangle}; +use iced_native::{mouse, Rectangle}; /// The state and logic of a [`Canvas`]. /// @@ -42,15 +42,19 @@ pub trait Program<Message> { /// [`Cache`]: struct.Cache.html fn draw(&self, bounds: Rectangle, cursor: Cursor) -> Vec<Geometry>; - /// Returns the mouse cursor state of the [`Program`]. + /// Returns the current mouse interaction of the [`Program`]. /// - /// The mouse cursor returned will be in effect even if the cursor position + /// The interaction returned will be in effect even if the cursor position /// is out of bounds of the program's [`Canvas`]. /// /// [`Program`]: trait.Program.html /// [`Canvas`]: struct.Canvas.html - fn mouse_cursor(&self, _bounds: Rectangle, _cursor: Cursor) -> MouseCursor { - MouseCursor::default() + fn mouse_interaction( + &self, + _bounds: Rectangle, + _cursor: Cursor, + ) -> mouse::Interaction { + mouse::Interaction::default() } } @@ -71,7 +75,11 @@ where T::draw(self, bounds, cursor) } - fn mouse_cursor(&self, bounds: Rectangle, cursor: Cursor) -> MouseCursor { - T::mouse_cursor(self, bounds, cursor) + fn mouse_interaction( + &self, + bounds: Rectangle, + cursor: Cursor, + ) -> mouse::Interaction { + T::mouse_interaction(self, bounds, cursor) } } |