Skip to main content

Module wheel_lines

Module wheel_lines 

Source
Expand description

The lines a notch of the wheel moves on the system, read in the process, to seed egui-pop’s wheel speed: winit gives notches, and leaves the system’s lines out.

Experimental: may change in any release (docs/stability.md).
Read from
WindowsHKCU\Control Panel\Desktop WheelScrollLines, where the system keeps what SPI_GETWHEELSCROLLLINES answers, through the registry API (winreg). “One screen at a time” (-1) is no number of lines: 3
Other systemsnothing: 3

Give it to AppBuilder::system_wheel_lines, which makes it the default of the wheel speed until the user chooses one:

let app = egui_pop_api::App::builder()
    .system_wheel_lines(egui_pop_platform::wheel_lines::read());

Functions§

parse
The registry’s value as lines: None for what is no number of lines, as -1, one screen at a time.
read
The system’s lines a notch, now; SYSTEM_WHEEL_LINES when it says none.