# SuspendingPointerInputModifierNode

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/input/pointer/SuspendingPointerInputFilter.kt+class:androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNode) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0) Common/AllAndroid/JVM
- Cmn

  ```
  sealed interface SuspendingPointerInputModifierNode : PointerInputModifierNode
  ```

*** ** * ** ***

Extends `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode` with a handler to execute asynchronously when an event occurs and a function to reset that handler (cancels the existing coroutine and essentially resets the handler's execution). Note: The handler still executes lazily, meaning nothing will be done until a new event comes in.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputModifierNode#resetPointerInputHandler()()` Resets the underlying coroutine used to run the handler for input pointer events. | Cmn |

| ### Public properties |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerInputEventHandler` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputModifierNode#pointerInputEventHandler()` Handler for pointer input events. | Cmn |
| `suspend https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerInputScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputModifierNode#pointerInputHandler()` **This property is deprecated.** This property is deprecated. | Cmn |

### Inherited functions

From [androidx.compose.ui.node.DelegatableNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#onLayoutDirectionChange()()`

Invoked when the layout direction changes for this node.
Cmn From [androidx.compose.ui.node.PointerInputModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode#interceptOutOfBoundsChildEvents()()`

Intercept pointer input that children receive even if the pointer is out of bounds.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode#onCancelPointerInput()()`

Invoked to notify the handler that no more calls to `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode` will be made, until at least new pointers exist.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode#onDensityChange()()`

Invoked when the density (pixels per inch for the screen) changes.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode#onPointerEvent(androidx.compose.ui.input.pointer.PointerEvent,androidx.compose.ui.input.pointer.PointerEventPass,androidx.compose.ui.unit.IntSize)(
pointerEvent: https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerEvent,
pass: https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerEventPass,
bounds: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize
)`

Invoked when pointers that previously hit this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode` have changed.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode#onViewConfigurationChange()()`

Invoked when the view configuration (touch slop size, minimum touch target, tap timing) changes which means the composable UI the pointer input block is tied to has changed and the new UI might impact the location of pointer input events (x and y).
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode#sharePointerInputWithSiblings()()`

If `false`, then this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode` will not allow siblings under it to respond to events.
Cmn

### Inherited properties

From [androidx.compose.ui.node.DelegatableNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode) `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#node()`

A reference of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that holds this node's position in the node hierarchy.
Cmn From [androidx.compose.ui.node.PointerInputModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode) `open https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TouchBoundsExpansion` `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode#touchBoundsExpansion()`

Override this value to expand the touch bounds of this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode` by the given value in align each edge.
Cmn

## Public functions

### resetPointerInputHandler

Cmn Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0)

```
fun resetPointerInputHandler(): Unit
```

Resets the underlying coroutine used to run the handler for input pointer events. This should be called whenever a large change has been made that forces the gesture detection to be completely invalid.

For example, if `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputModifierNode#pointerInputEventHandler()` has different modes for detecting a gesture (long press, double click, etc.), and by switching the modes, any currently-running gestures are no longer valid.

## Public properties

### pointerInputEventHandler

Cmn Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.8.0)

```
open var pointerInputEventHandler: PointerInputEventHandler
```

Handler for pointer input events. When changed, any previously executing pointerInputEventHandler will be canceled.

### pointerInputHandler

Cmn Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.8.0)

```
var pointerInputHandler: suspend PointerInputScope.() -> Unit
```

> [!CAUTION]
> **This property is deprecated.**   
> This property is deprecated. Use 'pointerInputEventHandler' instead, use this instead:
>
> ```kotlin
> pointerInputEventHandler
> ```

Handler for pointer input events. When changed, any previously executing pointerInputHandler will be canceled.