Skip to main content

WindowHost

Trait WindowHost 

Source
pub trait WindowHost: HasWindowHandle + HasDisplayHandle {
    // Required method
    fn inner_size(&self) -> (u32, u32);

    // Provided method
    fn scale_factor(&self) -> f64 { ... }
}
Expand description

Narrow host-window abstraction required by the compositor.

Required Methods§

Source

fn inner_size(&self) -> (u32, u32)

Return the current inner size in physical pixels.

Provided Methods§

Source

fn scale_factor(&self) -> f64

Return the current scale factor for coordinate conversion.

Implementations on Foreign Types§

Source§

impl WindowHost for Window

Available on crate feature winit only.
Source§

fn inner_size(&self) -> (u32, u32)

Source§

fn scale_factor(&self) -> f64

Source§

impl<W> WindowHost for Arc<W>
where W: WindowHost,

Source§

fn inner_size(&self) -> (u32, u32)

Source§

fn scale_factor(&self) -> f64

Implementors§