Skip to main content

listen

Function listen 

Source
pub fn listen<F>(display: NonNull<c_void>, on_pinch: F) -> Result<(), String>
where F: Fn(f32) + Send + 'static,
Expand description

Calls on_pinch on another thread with how much each touchpad pinch changed, as a fraction. Off Wayland’s systems it does nothing.

display must be the live wl_display of the program’s windows, for as long as the program runs. Fails if the compositor has no pointer gestures.