Function input_sys::libinput_event_pointer_get_axis_value[][src]

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

@ingroup event_pointer

Return the axis value of the given axis. The interpretation of the value depends on the axis. For the two scrolling axes @ref LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL and @ref LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, the value of the event is in relative scroll units, with the positive direction being down or right, respectively. For the interpretation of the value, see libinput_event_pointer_get_axis_source().

If libinput_event_pointer_has_axis() returns 0 for an axis, this function returns 0 for that axis.

For pointer events that are not of type @ref LIBINPUT_EVENT_POINTER_AXIS, this function returns 0.

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

@return The axis value of this event

@see libinput_event_pointer_get_axis_value_discrete