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)
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
class TreehouseLayout(context: Context, val widgetSystem: TreehouseView.WidgetSystem<View>, androidOnBackPressedDispatcher: OnBackPressedDispatcher) : RedwoodLayout, TreehouseView<View>
Link copied to clipboard
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.

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, 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