Struct redox::orbital::Window
[−]
[src]
pub struct Window { // some fields omitted }
A window
Methods
impl Window
fn new(x: isize, y: isize, w: usize, h: usize, title: &str) -> Option<Box<Self>>
[−]
Create a new window
fn x(&self) -> isize
[−]
Get x
fn y(&self) -> isize
[−]
Get y
fn width(&self) -> usize
[−]
Get width
fn height(&self) -> usize
[−]
Get height
fn title(&self) -> String
[−]
Get title
fn set_title(&mut self, title: &str)
[−]
Set title
fn pixel(&mut self, x: isize, y: isize, color: Color)
[−]
Draw a pixel
fn char(&mut self, x: isize, y: isize, c: char, color: Color)
[−]
Draw a character, using the loaded font
fn set(&mut self, color: Color)
[−]
Set entire window to a color
fn rect(&mut self, start_x: isize, start_y: isize, w: usize, h: usize, color: Color)
[−]
Draw rectangle
fn image(&mut self, start_x: isize, start_y: isize, w: usize, h: usize, data: &[Color])
[−]
Display an image
fn poll(&mut self) -> Option<Event>
[−]
Poll for an event
fn sync(&mut self) -> bool
[−]
Flip the window buffer
fn event_iter<'a>(&'a mut self) -> EventIter<'a>
[−]
Return a iterator over events