# IInputDevice

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/trait-iinputdevice/

**trait** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
trait IInputDevice
```

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

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_device.rs#L7)

## Members

- [`process_raw_event`](#function-process_raw_event)
- [`as_any`](#function-as_any)
- [`as_pointer_device`](#function-as_pointer_device)

<a id="function-process_raw_event"></a>

### process_raw_event

```rust
fn process_raw_event(self: &Self, ev: &dyn IRawInputEventArgs)
```

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_device.rs#L10)

<a id="function-as_any"></a>

### as_any

```rust
fn as_any(self: &Self) -> &dyn Any
```

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_device.rs#L13)

<a id="function-as_pointer_device"></a>

### as_pointer_device

```rust
fn as_pointer_device(self: &Self) -> Option<&dyn IPointerDevice>
```

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_device.rs#L16)

## Trait implementations

- [`IInputDevice`](/docs/0.5.0/api/ferroui-base/input/trait-iinputdevice/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
