Trait luminance_windowing::Surface[][src]

pub trait Surface: GraphicsContext + Sized {
    type Event;
    type Error;
    fn new(
        dim: WindowDim,
        title: &str,
        win_opt: WindowOpt
    ) -> Result<Self, Self::Error>;
fn size(&self) -> [u32; 2];
fn wait_events<'a>(&'a mut self) -> Box<Iterator<Item = Self::Event> + 'a>;
fn poll_events<'a>(&'a mut self) -> Box<Iterator<Item = Self::Event> + 'a>; fn width(&self) -> u32 { ... }
fn height(&self) -> u32 { ... } }

Rendering surface.

This type holds anything related to rendering. The interface is straight forward, so feel free to have a look around.

Associated Types

Type of events.

Type of surface errors.

Required Methods

Create a surface along with its associated event stream and bootstrap a luminance environment that it lives as long as the surface lives.

Size of the surface’s framebuffer.

Get an iterator over events by blocking until the first event happens.

Get an iterator over events without blocking if no event is there.

Provided Methods

Width of the surface’s framebuffer.

Defaults

Defaults to .size()[0].

Height of the surface’s framebuffer.

Defaults

Defaults to .size()[1].

Implementors