pub struct InputMap { /* private fields */ }Implementations§
Source§impl InputMap
impl InputMap
pub fn resize(&mut self, width: u32, height: u32, scale: f32)
Sourcepub fn set_display(&mut self, width: f32, height: f32)
pub fn set_display(&mut self, width: f32, height: f32)
The CSS size the canvas is shown at, which leads the physical size while a resize settles.
pub fn display_aspect(&self) -> Option<f32>
pub fn size(&self) -> (u32, u32)
pub fn scale(&self) -> f32
pub fn cursor(&self) -> [f32; 2]
pub fn cursor_locked(&self) -> bool
pub fn set_cursor_locked(&mut self, locked: bool)
pub fn ndc(&self, physical_x: f64, physical_y: f64) -> [f32; 2]
pub fn css_ndc(&self, css_x: f32, css_y: f32) -> [f32; 2]
pub fn action(&mut self, bindings: &Bindings, key: Key, pressed: bool)
pub fn release_all(&mut self)
pub fn raw_motion(&mut self, physical_dx: f32, physical_dy: f32)
pub fn moved(&mut self, ndc: [f32; 2])
pub fn touch(&mut self, id: u32, ndc: [f32; 2], phase: RuntimePointerPhase)
pub fn wheel(&mut self, delta: [f32; 2])
pub fn host_message(&mut self, topic: &str, values: &[f32])
pub fn take(&mut self) -> Input
pub fn reclaim(&mut self, reclaimed: Input)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputMap
impl RefUnwindSafe for InputMap
impl Send for InputMap
impl Sync for InputMap
impl Unpin for InputMap
impl UnsafeUnpin for InputMap
impl UnwindSafe for InputMap
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn 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.§fn 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.