Trait thyme::IO

source ·
pub trait IO {
    // Required methods
    fn scale_factor(&self) -> f32;
    fn display_size(&self) -> Point;
}
Expand description

A trait to be implemented on the type to be used for Event handling. See WinitIO for an example implementation. The IO handles events from an external source and passes them to the Thyme Context.

Required Methods§

source

fn scale_factor(&self) -> f32

Returns the current window scale factor (1.0 for logical pixel size = physical pixel size).

source

fn display_size(&self) -> Point

Returns the current window size in logical pixels.

Implementors§