# RotaryScrollableBehavior

Artifact: [androidx.wear.compose:compose-foundation](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/foundation/rotary/RotaryScrollable.kt+class:androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.4.0)


```
interface RotaryScrollableBehavior
```

<br />

*** ** * ** ***

An interface for handling scroll events. Has implementations for handling scroll with/without fling `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/rotary/FlingRotaryScrollableBehavior` and for handling snap `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/rotary/LowResSnapRotaryScrollableBehavior`, `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/rotary/HighResSnapRotaryScrollableBehavior` (see `https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/rotary/rotaryScrollable.modifier#(androidx.compose.ui.Modifier).rotaryScrollable(androidx.wear.compose.foundation.rotary.RotaryScrollableBehavior,androidx.compose.ui.focus.FocusRequester,kotlin.Boolean,androidx.compose.foundation.OverscrollEffect)` for descriptions of low-res and high-res devices). Note: It's not recommended to extend this interface directly. Please use the provided implementations instead.

## Summary

| ### Public functions |
|---|---|
| `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html.https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/rotary/RotaryScrollableBehavior#(kotlinx.coroutines.CoroutineScope).performScroll(kotlin.Long,kotlin.Float,kotlin.Int,androidx.compose.foundation.gestures.Orientation)( timestampMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, delta: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, inputDeviceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, orientation: https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/Orientation )` Executes a scrolling operation based on rotary input. |

## Public functions

### CoroutineScope.performScroll

Artifact: [androidx.wear.compose:compose-foundation](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/foundation/rotary/RotaryScrollable.kt+function:performScroll) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.4.0)

```
suspend fun CoroutineScope.performScroll(
    timestampMillis: Long,
    delta: Float,
    inputDeviceId: Int,
    orientation: Orientation
): Unit
```

Executes a scrolling operation based on rotary input.

| Parameters |
|---|---|
| `timestampMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time in milliseconds at which this event occurred |
| `delta: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The amount to scroll, in pixels |
| `inputDeviceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The id for the input device that this event came from |
| `orientation: https://developer.android.com/reference/kotlin/androidx/compose/foundation/gestures/Orientation` | Orientation of the scrolling |