# InputPointerBinding

`import { InputPointerBinding } from "destack:input/binding";`

Pointer binding family.

```ds title="InputPointerBinding"
export interface InputPointerBinding {
    readPointerState(device: InputDeviceHandle): Result<PointerState, HostError>;
    setPointerRelativeMode(device: InputDeviceHandle, isEnabled: boolean): Result<void, HostError>;
    setPointerGrab(device: InputDeviceHandle, window: WindowHandle, mode: PointerGrabMode): Result<void, HostError>;
    capturePointer(device: InputDeviceHandle, window: WindowHandle, isEnabled: boolean): Result<void, HostError>;
    warpPointer(device: InputDeviceHandle, window: WindowHandle, x: float64, y: float64): Result<void, HostError>;
}
```

[language/library/src/input/binding/pointer.ds:152:213](https://github.com/destack-sh/destack/blob/main/language/library/src/input/binding/pointer.ds#L152-L213)

## Members

### `readPointerState(device: InputDeviceHandle): Result<PointerState, HostError>`

Read one pointer state snapshot.

### `setPointerRelativeMode(device: InputDeviceHandle, isEnabled: boolean): Result<void, HostError>`

Enable or disable relative pointer mode.

### `setPointerGrab(device: InputDeviceHandle, window: WindowHandle, mode: PointerGrabMode): Result<void, HostError>`

Set pointer grab mode.

### `capturePointer(device: InputDeviceHandle, window: WindowHandle, isEnabled: boolean): Result<void, HostError>`

Enable or disable pointer capture.

### `warpPointer(device: InputDeviceHandle, window: WindowHandle, x: float64, y: float64): Result<void, HostError>`

Warp pointer position.
