#[non_exhaustive]pub enum ScrollSource {
Unknown,
Wheel,
Finger,
Momentum,
}Expand description
What is driving a WindowEvent::MouseWheel event.
This lets an application treat the different kinds of scrolling differently, for example to not scroll a slider during system-driven momentum scrolling, or to implement its own momentum scrolling only on platforms where the system doesn’t.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown
The platform doesn’t say.
Wheel
A physical wheel, usually on a mouse (including tilting it sideways).
Finger
Fingers moving on a touchpad.
On platforms that report a TouchPhase, the fingers are on the touchpad from
TouchPhase::Started until TouchPhase::Ended.
Momentum
The system is continuing a finger scroll after the fingers were lifted, with decaying speed, such as the “momentum phase” on macOS.
On platforms that report a TouchPhase, this gets its own TouchPhase::Started
… TouchPhase::Ended cycle after the ScrollSource::Finger one.