IndirectPointerInputChange


Represents a single pointer input change for an indirect pointer event. The coordinate space does NOT map to the screen space but to the coordinate space of the device sending the data (thus the name indirect pointer change).

Summary

Public constructors

IndirectPointerInputChange(
    id: PointerId,
    uptimeMillis: Long,
    position: Offset,
    pressed: Boolean,
    pressure: Float,
    previousUptimeMillis: Long,
    previousPosition: Offset,
    previousPressed: Boolean
)
Cmn

Public functions

Unit

Consumes the change event, claiming it for the caller.

Cmn
IndirectPointerInputChange
copy(
    id: PointerId,
    uptimeMillis: Long,
    position: Offset,
    pressed: Boolean,
    pressure: Float,
    previousUptimeMillis: Long,
    previousPosition: Offset,
    previousPressed: Boolean,
    historical: List<HistoricalChange>
)
Cmn
open String
Cmn

Public properties

List<HistoricalChange>

Optional high-frequency pointer moves in between the last two dispatched events.

Cmn
PointerId

The unique identifier for the pointer.

Cmn
Boolean

Indicates whether the change was consumed or not.

Cmn
Offset

The position of the pointer on the input device (not screen).

Cmn
Boolean

Whether the pointer is down or up.

Cmn
Float

The pressure of the pointer.

Cmn
Offset

The position of the pointer on the input device (not screen) at the previous event.

Cmn
Boolean

Whether the pointer was down or up at the previous event.

Cmn
Long

The time at which the previous event occurred.

Cmn
Long

The time at which the event occurred.

Cmn

Public constructors

IndirectPointerInputChange

IndirectPointerInputChange(
    id: PointerId,
    uptimeMillis: Long,
    position: Offset,
    pressed: Boolean,
    pressure: Float,
    previousUptimeMillis: Long,
    previousPosition: Offset,
    previousPressed: Boolean
)
Parameters
id: PointerId

The unique identifier for the pointer.

uptimeMillis: Long

The time at which the event occurred.

position: Offset

The position of the pointer on the input device (not screen).

pressed: Boolean

Whether the pointer is down or up.

pressure: Float

The pressure of the pointer.

previousUptimeMillis: Long

The time at which the previous event occurred.

previousPosition: Offset

The position of the pointer on the input device (not screen) at the previous event.

previousPressed: Boolean

Whether the pointer was down or up at the previous event.

Public functions

consume

fun consume(): Unit

Consumes the change event, claiming it for the caller.

copy

fun copy(
    id: PointerId = this.id,
    uptimeMillis: Long = this.uptimeMillis,
    position: Offset = this.position,
    pressed: Boolean = this.pressed,
    pressure: Float = this.pressure,
    previousUptimeMillis: Long = this.previousUptimeMillis,
    previousPosition: Offset = this.previousPosition,
    previousPressed: Boolean = this.previousPressed,
    historical: List<HistoricalChange> = this.historical
): IndirectPointerInputChange

toString

open fun toString(): String

Public properties

historical

val historical: List<HistoricalChange>

Optional high-frequency pointer moves in between the last two dispatched events. Can be used for extra accuracy when input rate exceeds framerate.

id

val id: PointerId

The unique identifier for the pointer.

isConsumed

val isConsumed: Boolean

Indicates whether the change was consumed or not.

position

val position: Offset

The position of the pointer on the input device (not screen).

pressed

val pressed: Boolean

Whether the pointer is down or up.

pressure

val pressure: Float

The pressure of the pointer.

previousPosition

val previousPosition: Offset

The position of the pointer on the input device (not screen) at the previous event.

previousPressed

val previousPressed: Boolean

Whether the pointer was down or up at the previous event.

previousUptimeMillis

val previousUptimeMillis: Long

The time at which the previous event occurred.

uptimeMillis

val uptimeMillis: Long

The time at which the event occurred.