HostProtocolAdapter

@ObjCName(name = "HostProtocolAdapter", exact = true)
class HostProtocolAdapter<W : Any>(guestVersion: RedwoodVersion, container: Widget.Children<W>, factory: ProtocolFactory<W>, eventSink: UiEventSink, leakDetector: LeakDetector) : ChangesSink

Runs the host side of the protocol.

This type receives Changes from the guest and applies them to the widget tree as children of the provided container.

It sends events from widgets to the guest via eventSink.

Constructors

Link copied to clipboard
constructor(guestVersion: RedwoodVersion, container: Widget.Children<W>, factory: ProtocolFactory<W>, eventSink: UiEventSink, leakDetector: LeakDetector)

Functions

Link copied to clipboard
fun close()

Proactively clear held widgets. (This avoids problems when mixing garbage-collected Kotlin objects with reference-counted Swift objects.)

Link copied to clipboard
open override fun sendChanges(changes: List<Change>)