Package-level declarations

Types

Link copied to clipboard
class ChangeListRenderer<W : Any>(json: Json)

Renders a SnapshotChangeList into a target view by creating all of the widgets and assigning their properties.

Link copied to clipboard
@ObjCName(name = "Content", exact = true)
interface Content

A UI built as an interactive widget tree, that may or may not be actively running, or bound to an on-screen display.

Link copied to clipboard
@ObjCName(name = "Crashed", exact = true)
interface Crashed<W : Any> : Widget<W>
Link copied to clipboard
@ObjCName(name = "DynamicContentWidgetFactory", exact = true)
interface DynamicContentWidgetFactory<W : Any>
Link copied to clipboard
@ObjCName(name = "EventListener", exact = true)
open class EventListener
Link copied to clipboard
@ObjCName(name = "Loading", exact = true)
interface Loading<W : Any> : Widget<W>
Link copied to clipboard

A simple in-memory state store.

Link copied to clipboard
interface StateStore

All functions are invoked on the UI dispatcher.

Link copied to clipboard
@ObjCName(name = "TreehouseApp", exact = true)
abstract class TreehouseApp<A : AppService> : AutoCloseable

Manages the Zipline runtimes that run the code to power on-screen views.

Link copied to clipboard
@ObjCName(name = "TreehouseContentSource", exact = true)
fun interface TreehouseContentSource<A : AppService>
Link copied to clipboard
@ObjCName(name = "TreehouseDispatchers", exact = true)
interface TreehouseDispatchers : AutoCloseable

One of the trickiest things Treehouse needs to do is balance its two dispatchers:

Link copied to clipboard
open class TreehouseLayout(context: Context, val widgetSystem: TreehouseView.WidgetSystem<View>, androidOnBackPressedDispatcher: OnBackPressedDispatcher, val dynamicContentWidgetFactory: DynamicContentWidgetFactory<View> = EmptyDynamicContentWidgetFactory(context)) : RedwoodLayout, TreehouseView<View>
Link copied to clipboard
open class TreehouseUIView(val widgetSystem: TreehouseView.WidgetSystem<UIView>, val dynamicContentWidgetFactory: DynamicContentWidgetFactory<UIView>) : RedwoodUIView, TreehouseView<UIView>
Link copied to clipboard
@ObjCName(name = "TreehouseView", exact = true)
interface TreehouseView<W : Any> : RedwoodView<W>

Functions

Link copied to clipboard
fun <W : Any> Content.bindWhenReady(view: TreehouseView<W>): Closeable

Binds this content to view whenever the view is ready for content. The content will bind and unbind as this view is attached and detached from the UI.

Link copied to clipboard
fun TreehouseAppFactory(context: Context, httpClient: ZiplineHttpClient, manifestVerifier: ManifestVerifier, embeddedFileSystem: FileSystem? = null, embeddedDir: Path? = null, cacheName: String = "zipline", cacheMaxSizeInBytes: Long = 50L * 1024L * 1024L, loaderEventListener: LoaderEventListener = LoaderEventListener.None, concurrentDownloads: Int = 8, stateStore: StateStore = MemoryStateStore(), leakDetector: LeakDetector = LeakDetector.none()): TreehouseApp.Factory
fun TreehouseAppFactory(context: Context, httpClient: OkHttpClient, manifestVerifier: ManifestVerifier, embeddedFileSystem: FileSystem? = null, embeddedDir: Path? = null, cacheName: String = "zipline", cacheMaxSizeInBytes: Long = 50L * 1024L * 1024L, loaderEventListener: LoaderEventListener = LoaderEventListener.None, concurrentDownloads: Int = 8, stateStore: StateStore = MemoryStateStore(), leakDetector: LeakDetector = LeakDetector.none()): TreehouseApp.Factory
fun TreehouseAppFactory(httpClient: ZiplineHttpClient, manifestVerifier: ManifestVerifier, embeddedFileSystem: FileSystem? = null, embeddedDir: Path? = null, cacheName: String = "zipline", cacheMaxSizeInBytes: Long = 50L * 1024L * 1024L, concurrentDownloads: Int = 8, loaderEventListener: LoaderEventListener = LoaderEventListener.None, stateStore: StateStore = MemoryStateStore(), leakDetector: LeakDetector = LeakDetector.none()): TreehouseApp.Factory