Struct quicksilver::graphics::Window [−][src]
pub struct Window { /* fields omitted */ }
The window currently in use
Methods
impl Window
[src]
impl Window
pub fn clear_temporary_states(&mut self)
[src]
pub fn clear_temporary_states(&mut self)
Transition temporary input states (Pressed, Released) into sustained ones (Held, NotPressed)
pub fn view(&self) -> View
[src]
pub fn view(&self) -> View
Get the view from the window
pub fn set_view(&mut self, view: View)
[src]
pub fn set_view(&mut self, view: View)
Set the view the window uses
pub fn resize_strategy(&self) -> ResizeStrategy
[src]
pub fn resize_strategy(&self) -> ResizeStrategy
Get the resize strategy used by the window
pub fn set_resize_strategy(&mut self, resize: ResizeStrategy)
[src]
pub fn set_resize_strategy(&mut self, resize: ResizeStrategy)
Switch the strategy the window uses to display content when the available area changes
pub fn screen_size(&self) -> Vector
[src]
pub fn screen_size(&self) -> Vector
Get the screen size
pub fn unproject(&self) -> Transform
[src]
pub fn unproject(&self) -> Transform
Get the unprojection matrix according to the View
pub fn project(&self) -> Transform
[src]
pub fn project(&self) -> Transform
Get the projection matrix according to the View
pub fn keyboard(&self) -> &Keyboard
[src]
pub fn keyboard(&self) -> &Keyboard
Get a reference to the keyboard
pub fn mouse(&self) -> Mouse
[src]
pub fn mouse(&self) -> Mouse
Get an instance of a mouse, projected into the current View
pub fn set_title(&self, title: &str)
[src]
pub fn set_title(&self, title: &str)
Set the title of the Window
pub fn clear(&mut self, color: Color)
[src]
pub fn clear(&mut self, color: Color)
Clear the screen to a given color
The blend mode is also automatically reset, and any un-flushed draw calls are dropped.
pub fn present(&mut self)
[src]
pub fn present(&mut self)
Flush changes and also present the changes to the window
pub fn flush(&mut self)
[src]
pub fn flush(&mut self)
Flush the current buffered draw calls
Until Window::present is called they won't be visible, but the items will be behind all future items drawn.
Generally it's a bad idea to call this manually; as a general rule, the fewer times your application needs to flush the faster it will run.
pub fn set_blend_mode(&mut self, blend: BlendMode)
[src]
pub fn set_blend_mode(&mut self, blend: BlendMode)
Set the blend mode for the window
This will flush all of the drawn items to the screen and switch to the new blend mode.
pub fn reset_blend_mode(&mut self)
[src]
pub fn reset_blend_mode(&mut self)
Reset the blend mode for the window to the default alpha blending
This will flush all of the drawn items to the screen
pub fn draw<T: Drawable>(&mut self, item: &T)
[src]
pub fn draw<T: Drawable>(&mut self, item: &T)
Draw a single object to the screen
It will not appear until Window::flush is called
pub fn add_vertices<V, T>(&mut self, vertices: V, triangles: T) where
V: Iterator<Item = Vertex>,
T: Iterator<Item = GpuTriangle>,
[src]
pub fn add_vertices<V, T>(&mut self, vertices: V, triangles: T) where
V: Iterator<Item = Vertex>,
T: Iterator<Item = GpuTriangle>,
Add vertices directly to the list without using a Drawable
Each vertex has a position in terms of the current view. The indices of the given GPU triangles are specific to these vertices, so that the index must be at least 0 and at most the number of vertices. Other index values will have undefined behavior
pub fn gamepads(&self) -> &Vec<Gamepad>
[src]
pub fn gamepads(&self) -> &Vec<Gamepad>
Get a reference to the connected gamepads