Skip to main content

IInputDevice

Trait IInputDevice 

Source
pub trait IInputDevice {
    // Required methods
    fn process_raw_event(&self, ev: &dyn IRawInputEventArgs);
    fn as_any(&self) -> &dyn Any;

    // Provided method
    fn as_pointer_device(&self) -> Option<&dyn IPointerDevice> { ... }
}
Expand description

Represents an input device: the object that turns the raw input events of the platform into routed events.

Required Methods§

Source

fn process_raw_event(&self, ev: &dyn IRawInputEventArgs)

Processes raw event. Is called after preprocessing by the input manager.

Source

fn as_any(&self) -> &dyn Any

The device as Any, for downcasting to the concrete device.

Provided Methods§

Source

fn as_pointer_device(&self) -> Option<&dyn IPointerDevice>

The device as a pointer device, if it is one.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§