Struct radiant_rs::Display
[−]
[src]
pub struct Display { /* fields omitted */ }
A target to render to, e.g. a window or full screen.
Methods
impl Display
[src]
fn new(descriptor: DisplayInfo) -> Display
Creates a new instance from given DisplayInfo
.
fn set_title(&self, title: &str)
Sets the window title.
fn show(&self)
Makes the previously hidden window visible.
fn hide(&self)
Hides the window.
fn prepare_frame(&self)
Prepares a frame for rendering.
fn clear_frame(&self, color: Color)
Prepares a frame for rendering and clears it.
fn swap_frame(&self)
Swaps current drawing frame with visible frame.
fn grab_cursor(&self)
Enables cursor grab mode. While in this mode, the mouse cursor will be hidden and
constrained to the window. Additionally, Input
will be able to
provide mouse movement deltas and allow mouse coordinates to exceed the window-bounds.
Grab mode will be temporarily released when the window loses focus and automatically restored once it regains focus.
fn hide_cursor(&self)
Hides the mouse cursor while it is inside the window.
fn free_cursor(&self)
Releases a previously grabbed or hidden cursor and makes it visible again.
fn dimensions(&self) -> (u32, u32)
Returns the window dimensions.
fn monitor(index: u32) -> Option<Monitor>
Returns monitor details for given monitor id.
fn monitors() -> Vec<Monitor>
Returns a vector of available monitors.
fn from_glium(display: Display) -> Display
Takes a glium::Display and returns a radiant::Display.
fn poll_events(&self) -> &Self
Polls for events like keyboard or mouse input and changes to the window. See
Input
for basic keyboard and mouse support.
fn was_closed(&self) -> bool
Returns true once after the attached window was closed
Trait Implementations
impl Clone for Display
[src]
fn clone(&self) -> Display
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more