PointerCaptureComponentTester


class PointerCaptureComponentTester


A test-only accessor for PointerCaptureComponent that enables direct manipulation and inspection of its internal state.

Summary

Public functions

open operator Boolean
equals(other: Any?)
open Int
Unit

Simulates an input event from the runtime.

Unit

Simulates a pointer capture state change event.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

triggerOnInputEvent

Added in 1.0.0-alpha16
fun triggerOnInputEvent(event: InputEvent): Unit

Simulates an input event from the runtime.

This triggers the inputListener passed to PointerCaptureComponent.create on the java.util.concurrent.Executor specified there.

Parameters
event: InputEvent

The input event that occurred.

triggerOnStateChanged

Added in 1.0.0-alpha16
fun triggerOnStateChanged(
    newState: PointerCaptureComponent.PointerCaptureState
): Unit

Simulates a pointer capture state change event.

This triggers the stateListener passed to PointerCaptureComponent.create on the java.util.concurrent.Executor specified there.