androidx.compose.ui.input.pointer

PointerInputScope

Interface · from org.jetbrains.compose.ui:ui:1.12.2

No hand-written docs yet.

Receiver scope for Modifier.pointerInput that permits [handling pointer input]awaitPointerEventScope.

interface PointerInputScope : Density

Is a

Properties

size

val size: IntSize

The measured size of the pointer input region. Input events will be reported with a coordinate space of (0, 0) to (size.width, size,height) as the input region, with (0, 0) indicating the upper left corner.

extendedTouchPadding

val extendedTouchPadding: Size

The additional space applied to each side of the layout area when the layout is smaller than ViewConfiguration.minimumTouchTargetSize.

viewConfiguration

val viewConfiguration: ViewConfiguration

The ViewConfiguration used to tune gesture detectors.

interceptOutOfBoundsChildEvents

val interceptOutOfBoundsChildEvents: Boolean

Intercept pointer input that children receive even if the pointer is out of bounds.

Functions

awaitPointerEventScope

fun <R> awaitPointerEventScope(
    block: suspend AwaitPointerEventScope.() -> R,
): R

Suspend and install a pointer input block that can await input events and respond to them immediately. A call to awaitPointerEventScope will resume with block's result after it completes.

Library docs

Receiver scope for Modifier.pointerInput that permits [handling pointer input]awaitPointerEventScope.