pub struct Control { /* private fields */ }
Expand description
The control type of the main event loop.
Implementations§
source§impl Control
impl Control
pub fn resized(&self) -> Option<(u32, u32)>
pub fn set_min_delta_time(&self, min_delta_time: Duration)
pub fn delta_time(&self) -> Duration
pub fn fps(&self) -> u32
pub fn pressed_keys(&self) -> &[Key]
pub fn released_keys(&self) -> &[Key]
pub fn cursor_position(&self) -> Option<(f32, f32)>
pub fn cursor_position_normalized(&self) -> Option<(f32, f32)>
pub fn mouse(&self) -> &Mouse
Methods from Deref<Target = View>§
pub fn window(&self) -> Arc<Window>
pub fn format(&self) -> Format
pub fn size(&self) -> (u32, u32)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Control
impl !RefUnwindSafe for Control
impl Send for Control
impl !Sync for Control
impl Unpin for Control
impl !UnwindSafe for Control
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more