On Search Result Listener
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
Called for each chunk of results as they arrive. May be invoked multiple times per search; implementations must accumulate.
Called when the current results have been cleared (query emptied or search bar closed).
Called once the current search has finished.
Called when a search could not complete because of error.
Called when a result is selected (next/prev/tap), or null when the selection is cleared.
Called once a search starts for searchTerm.