summaryrefslogtreecommitdiffstats
path: root/native/src/input/mouse/event.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/input/mouse/event.rs')
-rw-r--r--native/src/input/mouse/event.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/native/src/input/mouse/event.rs b/native/src/input/mouse/event.rs
index 478f9b4d..aafc4fe3 100644
--- a/native/src/input/mouse/event.rs
+++ b/native/src/input/mouse/event.rs
@@ -34,11 +34,16 @@ pub enum Event {
},
/// The mouse wheel was scrolled.
- WheelScrolled { delta: ScrollDelta },
+ WheelScrolled {
+ /// The scroll movement.
+ delta: ScrollDelta,
+ },
}
+/// A scroll movement.
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum ScrollDelta {
+ /// A line-based scroll movement
Lines {
/// The number of horizontal lines scrolled
x: f32,
@@ -46,6 +51,7 @@ pub enum ScrollDelta {
/// The number of vertical lines scrolled
y: f32,
},
+ /// A pixel-based scroll movement
Pixels {
/// The number of horizontal pixels scrolled
x: f32,