Listener

fun interface Listener<E>(source)

Functional interface for receiving events from a Listenable source.

This interface represents a callback that will be invoked when an event occurs. It uses Kotlin's functional interface feature, allowing it to be implemented using lambda expressions for concise event handling.

Parameters

E

The type of event this listener can handle

Functions

Link copied to clipboard
abstract fun onEvent(event: E)

Called when an event occurs.