pub struct RawInputEventArgs { /* private fields */ }Expand description
A raw input event.
Raw input events are sent from the windowing subsystem to the input manager for processing: this gives an application the opportunity to pre-process the event. After pre-processing they are consumed by the relevant input device and turned into standard events.
Implementations§
Source§impl RawInputEventArgs
impl RawInputEventArgs
Sourcepub fn new(
device: Rc<dyn IInputDevice>,
timestamp: u64,
root: Rc<dyn IInputRoot>,
) -> Self
pub fn new( device: Rc<dyn IInputDevice>, timestamp: u64, root: Rc<dyn IInputRoot>, ) -> Self
Creates raw input event args.
timestamp is the time stamp of the input as reported by the
platform; root is the root from which the event originates.
Sourcepub fn device(&self) -> &Rc<dyn IInputDevice>
pub fn device(&self) -> &Rc<dyn IInputDevice>
The associated device.
Sourcepub fn root(&self) -> &Rc<dyn IInputRoot>
pub fn root(&self) -> &Rc<dyn IInputRoot>
The root from which the event originates.
Sourcepub fn handled(&self) -> bool
pub fn handled(&self) -> bool
Whether the event was handled.
If an event is not marked handled after processing, this event will be returned to the windowing subsystem for further processing.
Sourcepub fn set_handled(&self, value: bool)
pub fn set_handled(&self, value: bool)
Marks the event as handled or unhandled.
Sourcepub fn set_timestamp(&self, value: u64)
pub fn set_timestamp(&self, value: u64)
Sets the timestamp associated with the event.
Trait Implementations§
Source§impl IRawInputEventArgs for RawInputEventArgs
impl IRawInputEventArgs for RawInputEventArgs
Source§fn as_raw_input_event_args(&self) -> &RawInputEventArgs
fn as_raw_input_event_args(&self) -> &RawInputEventArgs
The base raw input event args.
Auto Trait Implementations§
impl !Freeze for RawInputEventArgs
impl !RefUnwindSafe for RawInputEventArgs
impl !Send for RawInputEventArgs
impl !Sync for RawInputEventArgs
impl !UnwindSafe for RawInputEventArgs
impl Unpin for RawInputEventArgs
impl UnsafeUnpin for RawInputEventArgs
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more