Trait window::Window [] [src]

pub trait Window {
    type Event;
    fn should_close(&self) -> bool;
    fn size(&self) -> Size;
    fn swap_buffers(&mut self);
    fn poll_event(&mut self) -> Option<Self::Event>;
    fn draw_size(&self) -> Size;
}

Required to use the event loop.

Associated Types

type Event

The event type emitted by poll_event

Required Methods

fn should_close(&self) -> bool

Returns true if window should close.

fn size(&self) -> Size

Gets the size of the window in user coordinates.

fn swap_buffers(&mut self)

Swaps render buffers.

fn poll_event(&mut self) -> Option<Self::Event>

Polls event from window.

fn draw_size(&self) -> Size

Gets draw size of the window. This is equal to the size of the frame buffer of the inner window, excluding the title bar and borders.

Implementors