# TouchDevice

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/struct-touchdevice/

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

```rust
struct TouchDevice
```

Handles raw touch events.

This class is supposed to be used on per-toplevel basis; don't use a
shared one.

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

## Members

- [`new`](#function-new)
- [`dispose`](#function-dispose)
- [`platform_capture_lost`](#function-platform_capture_lost)

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

### new

```rust
fn new() -> Rc<TouchDevice>
```

Creates a touch device.

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

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

### dispose

```rust
fn dispose(self: &Self)
```

Releases the device and its pointers.

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

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

### platform_capture_lost

```rust
fn platform_capture_lost(self: &Self)
```

Notifies the device that the capture of its pointers was lost in
the platform.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`
- [`IInputDevice`](/docs/0.5.0/api/ferroui-base/input/trait-iinputdevice/)
- [`IPointerDevice`](/docs/0.5.0/api/ferroui-base/input/trait-ipointerdevice/)

## Availability

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