Struct lux::window::Window [] [src]

pub struct Window {
    // some fields omitted
}

A 1 to 1 correlation with a window shown on your desktop.

Lux uses Glutin for the window implementation.

Methods

impl Window

fn assert_no_error(&self)

Panics if an OpenGL error has occurred.

fn new() -> LuxResult<Window>

Constructs a new window with the default settings.

fn restock_events<I: DoubleEndedIterator<Item=Event>>(&mut self, i: I)

Add the events from an iterator of events back to the internal event queue.

fn process_events(&mut self)

Query the underlying window system for events and add them to the the interal event queue.

This function is automatically called by is_open(), events().

fn cleared_frame<C: Color>(&mut self, clear_color: C) -> Frame

Produce a frame that has been cleared with a color.

fn frame(&mut self) -> Frame

Produce a frame that has not been cleared.

Trait Implementations

impl Interactive for Window

fn is_open(&mut self) -> bool

fn was_open(&self) -> bool

fn title(&self) -> &str

fn set_title(&mut self, _title: &str)

fn set_size(&mut self, _width: u32, _height: u32)

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

fn get_size(&self) -> (Float, Float)

fn is_focused(&self) -> bool

fn mouse_pos_i(&self) -> (i32, i32)

fn mouse_pos(&self) -> (f32, f32)

fn is_mouse_down(&self) -> bool

fn events(&mut self) -> EventIterator

fn is_key_pressed<K: AbstractKey>(&self, k: K) -> bool

fn width(&self) -> f32

fn height(&self) -> f32

fn width_u(&self) -> u32

fn height_u(&self) -> u32

fn mouse_x(&self) -> Float

fn mouse_x_i(&self) -> i32

fn mouse_y(&self) -> Float

fn mouse_y_i(&self) -> i32

impl HasDisplay for Window

fn borrow_display(&self) -> &Display

fn clone_display(&self) -> Display

impl HasFontCache for Window

fn font_cache(&self) -> RefMut<FontCache>

impl HasPrograms for Window

fn texture_shader(&self) -> &Program

fn color_shader(&self) -> &Program