Program

interface Program : InputEvents, ExtensionHost

Functions

Link copied to clipboard
abstract fun draw()
Link copied to clipboard
abstract fun drawImpl()
Link copied to clipboard
abstract fun <T : Extension> extend(extension: T): T
abstract fun <T : Extension> extend(extension: T, configure: T.() -> Unit): T
abstract fun extend(stage: ExtensionStage = ExtensionStage.BEFORE_DRAW, userDraw: Program.() -> Unit)
Link copied to clipboard
abstract suspend fun setup()

Properties

Link copied to clipboard
abstract var application: Application
Link copied to clipboard
abstract var assetMetadata: () -> AssetMetadata
Link copied to clipboard
abstract var assetProperties: MutableMap<String, String>
Link copied to clipboard
abstract var backgroundColor: ColorRGBa?
Link copied to clipboard
abstract val clipboard: ProgramImplementation.ApplicationClipboard
Link copied to clipboard
abstract var clock: () -> Double
Link copied to clipboard
abstract val dispatcher: Dispatcher
Link copied to clipboard
abstract var drawer: Drawer
Link copied to clipboard
abstract var driver: Driver
Link copied to clipboard
abstract var ended: Event<ProgramEvent>
Link copied to clipboard
abstract val extensions: MutableList<Extension>
Link copied to clipboard
abstract val frameCount: Int
Link copied to clipboard
abstract var height: Int
Link copied to clipboard
abstract var isNested: Boolean
Link copied to clipboard
abstract val keyboard: KeyEvents
Link copied to clipboard
abstract val mouse: MouseEvents
Link copied to clipboard
abstract var name: String
Link copied to clipboard
abstract val pointers: Pointers
Link copied to clipboard
abstract val produceAssets: Event<ProduceAssetsEvent>
Link copied to clipboard
abstract val program: Program
Link copied to clipboard
abstract val requestAssets: Event<RequestAssetsEvent>
Link copied to clipboard
abstract val seconds: Double
Link copied to clipboard
abstract var width: Int
Link copied to clipboard
abstract val window: Window

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
fun Program.drawComposition(    documentBounds: CompositionDimensions = CompositionDimensions(0.0.pixels, 0.0.pixels, this.drawer.width.toDouble().pixels, this.drawer.height.toDouble().pixels),     composition: Composition? = null,     cursor: GroupNode? = composition?.root as? GroupNode,     drawFunction: CompositionDrawer.() -> Unit): Composition
fun Program.drawComposition(    documentBounds: Rectangle,     composition: Composition? = null,     cursor: GroupNode? = composition?.root as? GroupNode,     drawFunction: CompositionDrawer.() -> Unit): Composition
Link copied to clipboard
fun Program.launch(    context: CoroutineContext = dispatcher,     start: CoroutineStart = CoroutineStart.DEFAULT,     block: suspend CoroutineScope.() -> Unit): Job

launch a coroutine in the Program context

Link copied to clipboard
fun Program.loadFont(    fileOrUrl: String,     size: Double,     characterSet: Set<Char> = defaultFontmapCharacterSet,     contentScale: Double = this.drawer.context.contentScale): FontImageMap
Link copied to clipboard
expect fun Program.namedTimestamp(extension: String = "", path: String? = null): String
actual fun Program.namedTimestamp(extension: String, path: String?): String
actual fun Program.namedTimestamp(extension: String, path: String?): String
Link copied to clipboard
fun <T> Program.writer(f: Writer.() -> T): T

Sources

Link copied to clipboard