From 36058ab8e62a491c38ea13d7d50e9570d4dca0ce Mon Sep 17 00:00:00 2001 From: Bruno Ploumhans Date: Sat, 28 Oct 2017 12:33:51 +0200 Subject: [PATCH] Improve the documentation of DeviceEvent::Motion (#321) --- src/events.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/events.rs b/src/events.rs index ef5c6e9b..f3c21238 100644 --- a/src/events.rs +++ b/src/events.rs @@ -110,6 +110,9 @@ pub enum WindowEvent { pub enum DeviceEvent { Added, Removed, + /// Mouse devices yield `Motion` events where axis `0` is horizontal and axis `1` is vertical. + /// A positive value means a movement to the right or the bottom, depending on the axis. + /// Such events will be sent even if the mouse is in a corner of the screen. Motion { axis: AxisId, value: f64 }, Button { button: ButtonId, state: ElementState }, Key(KeyboardInput),