pub struct Renderer { /* private fields */ }
Expand description
Represents the renderer’s game window
Implementations
sourceimpl Renderer
impl Renderer
pub fn base_size(&self) -> (f32, f32)
pub fn set_base_size(&mut self, width: f32, height: f32)
pub fn window_size(&self) -> (u32, u32)
pub fn window_scissor(&self) -> Rect<u32>
pub fn window_title(&self) -> String
pub fn set_window_title(&mut self, window_title: &str)
pub fn set_visible(&mut self, visible: bool)
pub fn fullscreen(&self) -> bool
pub fn set_fullscreen(&mut self, enabled: bool)
pub fn toggle_fullscreen(&mut self)
pub fn vsync(&self) -> VsyncMode
pub fn set_vsync(&mut self, mode: VsyncMode) -> bool
pub fn set_power_management_enabled(&mut self, enabled: bool)
pub fn get_clipboard(&self) -> Option<String>
pub fn set_clipboard(&self, text: &str) -> bool
pub fn current_refresh_rate(&self) -> i32
pub fn current_display_scale_factor(&self) -> f32
Auto Trait Implementations
impl !RefUnwindSafe for Renderer
impl !Send for Renderer
impl !Sync for Renderer
impl Unpin for Renderer
impl !UnwindSafe for Renderer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more