Skip to main content

Module translate

Module translate 

Source
Expand description

winit-event -> retroglyph-event converters. winit-event -> retroglyph-event converters.

Pure functions, unit-testable without a window.

Functions§

translate_ime
Translates a winit Ime event into an Event.
translate_key
Translates a winit key event into an Event.
translate_key_event_kind
Maps a winit key state/repeat pair to a KeyEventKind.
translate_key_location
Maps winit’s KeyLocation 1:1 onto our KeyLocation.
translate_modifiers
Translates winit modifier state into our KeyModifiers.
translate_mouse_button
Translates a winit [winit::event::MouseButton] into our MouseButton.
translate_physical_pos
Converts a raw f64 cursor position to a PhysicalPos.
translate_pixel_to_cell
Converts physical pixel coordinates to a grid cell Pos, given a raw cell_w/cell_h pixel size.