pub unsafe extern "C" fn libinput_event_pointer_get_scroll_value_v120(
    event: *mut libinput_event_pointer,
    axis: libinput_pointer_axis
) -> f64
Expand description

@ingroup event_pointer

For events of type @ref LIBINPUT_EVENT_POINTER_SCROLL_WHEEL the v120-normalized value represents the movement in logical mouse wheel clicks, normalized to the -120..+120 range.

A value that is a fraction of ±120 indicates a wheel movement less than one logical click, a caller should either scroll by the respective fraction of the normal scroll distance or accumulate that value until a multiple of 120 is reached.

For most callers, this is the preferred way of handling high-resolution scroll events.

The normalized v120 value does not take device-specific physical angles or distances into account, i.e. a wheel with a click angle of 20 degrees produces only 18 logical clicks per 360 degree rotation, a wheel with a click angle of 15 degrees produces 24 logical clicks per 360 degree rotation. Where the physical angle matters, use libinput_event_pointer_get_axis_value() instead.

The magic number 120 originates from the Windows Vista Mouse Wheel design document.

@note It is an application bug to call this function for events other than @ref LIBINPUT_EVENT_POINTER_SCROLL_WHEEL.

@return A value normalized to the 0-±120 range

@see libinput_event_pointer_get_axis_value @see libinput_event_pointer_get_axis_value_discrete

@since 1.19