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 = "CodeListener", exact = true)
open class CodeListener
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 = "EventListener", exact = true)
open class EventListener
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)
class TreehouseApp<A : AppService>

This class binds downloaded code to 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

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

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

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.

fun <A : AppService, W : Any> TreehouseContentSource<A>.bindWhenReady(view: TreehouseView<W>, app: TreehouseApp<A>, codeListener: CodeListener = CodeListener()): Closeable
Link copied to clipboard
fun TreehouseAppFactory(context: Context, httpClient: OkHttpClient, manifestVerifier: ManifestVerifier, embeddedFileSystem: FileSystem? = null, embeddedDir: Path? = null, cacheName: String = "zipline", cacheMaxSizeInBytes: Long = 50L * 1024L * 1024L, concurrentDownloads: Int = 8, stateStore: StateStore = MemoryStateStore()): 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, stateStore: StateStore = MemoryStateStore()): TreehouseApp.Factory