# Pointer

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

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

```rust
struct Pointer
```

Identifies a specific input pointer and tracks the element that
captures it.

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

## Members

- [`get_next_free_id`](#function-get_next_free_id)
- [`new`](#function-new)
- [`with_platform_capture`](#function-with_platform_capture)
- [`platform_capture_lost`](#function-platform_capture_lost)
- [`capture_with_source`](#function-capture_with_source)
- [`captured_gesture_recognizer`](#function-captured_gesture_recognizer)
- [`capture_source`](#function-capture_source)
- [`is_gesture_recognition_skipped`](#function-is_gesture_recognition_skipped)
- [`set_is_gesture_recognition_skipped`](#function-set_is_gesture_recognition_skipped)
- [`dispose`](#function-dispose)

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

### get_next_free_id

```rust
fn get_next_free_id() -> i32
```

Returns a pointer identifier that is not in use.

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

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

### new

```rust
fn new(id: i32, type_: PointerType, is_primary: bool) -> Rc<Pointer>
```

Creates a pointer.

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

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

### with_platform_capture

```rust
fn with_platform_capture(id: i32, type_: PointerType, is_primary: bool, platform_capture: impl Fn(Option<&Ref<InputElement>>) -> () + 'static) -> Rc<Pointer>
```

Creates a pointer that captures the pointer in the platform through
`platform_capture` whenever the capturing element changes.

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

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

### platform_capture_lost

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

Notifies the pointer that its capture was lost in the platform.

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

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

### capture_with_source

```rust
fn capture_with_source(self: &Self, control: Option<&Ref<InputElement>>, source: CaptureSource)
```

Captures pointer input to the specified control, on behalf of
`source`.

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

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

### captured_gesture_recognizer

```rust
fn captured_gesture_recognizer(self: &Self) -> Option<Ref<GestureRecognizer>>
```

The gesture recognizer that captures the pointer, if any.

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

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

### capture_source

```rust
fn capture_source(self: &Self) -> CaptureSource
```

What requested the current capture state.

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

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

### is_gesture_recognition_skipped

```rust
fn is_gesture_recognition_skipped(self: &Self) -> bool
```

Whether gesture recognition is skipped for the pointer until it is
released.

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

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

### set_is_gesture_recognition_skipped

```rust
fn set_is_gesture_recognition_skipped(self: &Self, value: bool)
```

Sets whether gesture recognition is skipped for the pointer.

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

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

### dispose

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

Releases the pointer: its capture is lost and it can no longer be
captured.

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

## 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`
- [`IPointer`](/docs/0.5.0/api/ferroui-base/input/trait-ipointer/)

## Availability

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