program

open override fun program(init: suspend Program.() -> Unit): Program(source)

Initializes and runs a program within the application.

The provided init block is executed in the context of the Program instance, allowing for configuration and definition of the program's behavior, including setup, input handling, rendering, and other lifecycle-related operations.

Return

The configured Program instance.

Parameters

init

A suspendable lambda that operates on the Program instance. This lambda is used to define the behavior and structure of the program.


open override var program: Program(source)

Represents the abstract program instance associated with the application being built.

This variable allows access and manipulation of the program's configuration and lifecycle. The program instance provides functionalities such as handling input events, managing extensions, controlling the application clock, and rendering graphics. It serves as the centerpiece of the application, combining various elements and enabling the execution of a custom program structure.

Implementing this property in a subclass allows defining the specific Program instance with its unique setup, event handling, rendering logic, and other properties.