Source set: Common
public class IndirectPointerInputChange(
public val id: PointerId,
public val uptimeMillis: Long,
public val position: Offset,
@get:Suppress("GetterSetterNames") public val pressed: Boolean,
public val pressure: Float,
public val previousUptimeMillis: Long,
public val previousPosition: Offset,
@get:Suppress("GetterSetterNames") public val previousPressed: Boolean,
)
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).
Parameters
| id | The unique identifier for the pointer. |
| uptimeMillis | The time at which the event occurred. |
| position | The position of the pointer on the input device (not screen). |
| pressed | Whether the pointer is down or up. |
| pressure | The pressure of the pointer. |
| previousUptimeMillis | The time at which the previous event occurred. |
| previousPosition | The position of the pointer on the input device (not screen) at the previous event. |
| previousPressed | Whether the pointer was down or up at the previous event. |
Properties
historical
Source set: Common
public 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.
isConsumed
Source set: Common
public var isConsumed: Boolean = false
Indicates whether the change was consumed or not.
Functions
consume
Source set: Common
public fun consume()
Consumes the change event, claiming it for the caller.
copy
Source set: Common
public 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