Extension

interface Extension(source)

Represents an interface for creating extensions to enhance the functionality of a host program. Extensions allow developers to hook into the lifecycle of the program, enabling custom behavior during setup, drawing, and shutdown phases.

Properties

Link copied to clipboard
abstract var enabled: Boolean

Functions

Link copied to clipboard
open fun afterDraw(drawer: Drawer, program: Program)

Invoked after the drawing phase of the program's lifecycle, allowing the extension to execute any custom logic or operations needed post-rendering.

Link copied to clipboard
open fun beforeDraw(drawer: Drawer, program: Program)

Invoked before the drawing phase of the program's lifecycle, allowing the extension to perform custom operations or adjustments prior to rendering.

Link copied to clipboard
open fun setup(program: Program)

Allows an extension to perform its setup process with the given Program instance.

Link copied to clipboard
open fun shutdown(program: Program)

Allows the extension to perform clean-up or resource deallocation tasks during the shutdown phase of the program's lifecycle.