Trait carbide_winit::WinitWindow[][src]

pub trait WinitWindow {
    fn get_inner_size(&self) -> Option<(u32, u32)>;
fn hidpi_factor(&self) -> f32; }

Types that have access to a winit::Window and can provide the necessary dimensions and hidpi factor for converting winit::Events to carbide::event::Input, as well as set the mouse cursor.

This allows users to pass references to window render like glium::Display, glium::glutin::Window or winit::Window

Required methods

fn get_inner_size(&self) -> Option<(u32, u32)>[src]

Return the inner size of the window in logical pixels.

fn hidpi_factor(&self) -> f32[src]

Return the window's DPI factor so that we can convert from pixel values to scalar values.

Loading content...

Implementors

Loading content...