Trait buttons::Event

source ·
pub trait Event<Handler> {
    // Required method
    fn handle(&self, handler: &mut Handler);
}
Expand description

A trait for events that can modify input state.

Required Methods§

source

fn handle(&self, handler: &mut Handler)

Modify the state of the provided handler (for example, a Mouse or Keyboard).

This should rarely be called directly. Instead, pass this event to the handler’s handle_event method.

Implementations on Foreign Types§

source§

impl<'a, T> Event<Touchpad<u64, f64>> for WinitEvent<'a, T>

source§

fn handle(&self, touchpad: &mut Touchpad<u64, f64>)

source§

impl<'a, T> Event<Keyboard<VirtualKeyCode, ModifiersState>> for WinitEvent<'a, T>

source§

fn handle(&self, keyboard: &mut WinitKeyboard)

source§

impl<'a, T> Event<Mouse<MouseButton, f64>> for WinitEvent<'a, T>

source§

fn handle(&self, mouse: &mut WinitMouse)

Implementors§