OnSearchResultListener

Observes search events from the Compose inline search.

This is the plain Kotlin/Java replacement for the deprecated PdfSearchView.Listener (the View inline search is removed in the toolbar migration). All callbacks have no-op defaults, so implementations only override what they need. Delivered on the main thread.

Functions

Link copied to clipboard

Called for each chunk of results as they arrive. May be invoked multiple times per search; implementations must accumulate.

Link copied to clipboard
open fun onSearchCleared()

Called when the current results have been cleared (query emptied or search bar closed).

Link copied to clipboard

Called once the current search has finished.

Link copied to clipboard
open fun onSearchError(error: Throwable)

Called when a search could not complete because of error.

Link copied to clipboard

Called when a result is selected (next/prev/tap), or null when the selection is cleared.

Link copied to clipboard
open fun onSearchStarted(searchTerm: String)

Called once a search starts for searchTerm.