Package-level declarations

Types

Link copied to clipboard
actual abstract class Application

This class is responsible for selecting and initializing the appropriate graphics backend.

expect abstract class Application

Application interface

actual abstract class Application

Application interface

Link copied to clipboard
actual abstract class ApplicationBase

This is accessible before finalizing the application in ApplicationBuilder.

expect abstract class ApplicationBase

This is accessible before finalizing the application in ApplicationBuilder.

actual abstract class ApplicationBase

This is accessible before finalizing the application in ApplicationBuilder.

Link copied to clipboard
abstract class ApplicationBuilder

Abstract class for constructing and configuring an application. The ApplicationBuilder serves as the entry point for setting up the application's program, configuration, and other components.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Application configuration object

Link copied to clipboard
class ApplicationMouse(application: () -> Application) : MouseEvents

Mouse events

Link copied to clipboard

ApplicationPreload can be used to configure Application and Program without changing user code.

Link copied to clipboard
abstract class ApplicationWindow(val program: Program) : AutoCloseable
Link copied to clipboard
class ApplicationWindowMouse(applicationWindow: () -> ApplicationWindow) : MouseEvents
Link copied to clipboard
data class AssetMetadata(val programName: String, val assetBaseName: String, val assetProperties: Map<String, String>)
Link copied to clipboard
data class CharacterEvent(val character: Char, val modifiers: Set<KeyModifier>)

Represents an event triggered by a character input, typically used in text input scenarios.

Link copied to clipboard
interface Clipboard

Interface representing a clipboard for accessing and modifying its contents.

Link copied to clipboard
interface Clock
Link copied to clipboard

Configuration class to customize the behavior, appearance, and settings of a window in an application.

Link copied to clipboard

Represents the type of cursor used within an application.

Link copied to clipboard
actual class Dispatcher : <ERROR CLASS> ERROR CLASS: Symbol not found for MainCoroutineDispatcher, <ERROR CLASS> ERROR CLASS: Symbol not found for Delay
expect class Dispatcher
actual class Dispatcher
Link copied to clipboard
abstract class Display

Any coordinates or positions are provided as screen coordinates, which may or may not be equivalent to pixel coordinates, depending on your setup.

Link copied to clipboard
data class DropEvent(val position: Vector2, val files: List<String>)

window drop item event message

Link copied to clipboard
interface Extension

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.

Link copied to clipboard
annotation class ExtensionDslMarker
Link copied to clipboard

Represents a host for managing and executing extensions within a program. This interface provides methods for adding, configuring, and executing extensions at different stages of the program's lifecycle.

Link copied to clipboard

Represents the various stages of an extension's lifecycle in the application.

Link copied to clipboard

Fullscreen mode

Link copied to clipboard
enum Hit : Enum<Hit>
Link copied to clipboard
interface InputEvents

Interface representing input events in an application. Combines events related to mouse, keyboard, and pointers.

Link copied to clipboard

The Keyboard class provides event-based interaction for keyboard inputs. It implements the KeyEvents interface to handle various types of keyboard-related events such as key presses, releases, repetitions, and character inputs. These events are typically triggered by the Application interacting with the underlying system.

Link copied to clipboard
data class KeyEvent(val type: KeyEventType, val key: Int, val name: String, val modifiers: Set<KeyModifier>)

Key event describes key events.

Link copied to clipboard
interface KeyEvents

Interface for handling keyboard events. This interface provides access to events related to keyboard interactions such as key presses, releases, repetitions, and character inputs.

Link copied to clipboard

Represents the type of a key event in an application.

Link copied to clipboard

Represents key modifiers that can be used in combination with keyboard or mouse input.

Link copied to clipboard
class KeyTracker(keyEvents: KeyEvents)

Tracks the keys currently pressed on the keyboard.

Link copied to clipboard

Represents mouse buttons commonly used in interaction with graphical user interfaces.

Link copied to clipboard
data class MouseEvent(val position: Vector2, val rotation: Vector2, val dragDisplacement: Vector2, val type: MouseEventType, val button: MouseButton, val modifiers: Set<KeyModifier>)

Represents a mouse event in a 2D GUI or application.

Link copied to clipboard
interface MouseEvents
Link copied to clipboard

Represents the types of mouse events that can occur in the system.

Link copied to clipboard
class MouseTracker(mouseEvents: MouseEvents)

Keeps track of which mouse buttons are currently pressed. Usage: val mt = MouseTracker(mouse), then read mt.pressedButtons. Replaces MouseEvents.pressedButtons.

Link copied to clipboard
data class Pointer(val pointerID: Long, val position: Vector2, val pressure: Double)
Link copied to clipboard
data class PointerEvent(val pointerID: Long, val position: Vector2, val displacement: Vector2, val pressure: Double)
Link copied to clipboard
interface PointerEvents

The PointerEvents interface manages the lifecycle of pointer-related events such as pointer press, release, movement, and cancellation.

Link copied to clipboard
Link copied to clipboard
class PointerTracker(pointerEvents: PointerEvents)

Tracks the state of pointer interactions in an application.

Link copied to clipboard

PresentationMode describes modes of frame presentation

Link copied to clipboard
data class ProduceAssetsEvent(val origin: Any, val program: Program, val assetMetadata: AssetMetadata)
Link copied to clipboard

Represents a program interface that combines input event handling, extension hosting, and clock functionalities. It provides common properties and methods for managing the lifecycle of a program, drawing operations, and asset management.

Link copied to clipboard

Represents an event occurring within a program.

Link copied to clipboard

program event type

Link copied to clipboard
open class ProgramImplementation(val suspend: Boolean = false) : Program

The Program class, this is where most user implementations start.

Link copied to clipboard
data class RequestAssetsEvent(val origin: Any, val program: Program)
Link copied to clipboard

Specifies the behavior applied when an application window loses focus.

Link copied to clipboard
interface Window

Represents a window with configurable properties and behavior.

Link copied to clipboard
data class WindowConfiguration(val title: String = "OPENRNDR", val position: IntVector2? = null, val width: Int = 640, val height: Int = 480, val resizable: Boolean = false, val closable: Boolean = true, val alwaysOnTop: Boolean = false, val hideDecorations: Boolean = false, val transparent: Boolean = false, val multisample: WindowMultisample = WindowMultisample.Disabled, val fullscreen: Fullscreen = Fullscreen.DISABLED, val hideMouseCursor: Boolean = false, val relativeMouseCoordinates: Boolean = false, val utilityWindow: Boolean = false, val display: Display? = null, val unfocusBehaviour: UnfocusBehaviour = UnfocusBehaviour.NORMAL)
Link copied to clipboard
data class WindowEvent(val type: WindowEventType, val position: Vector2, val size: Vector2, val focused: Boolean)

window event message

Link copied to clipboard

Represents the types of events that can occur on a window.

Link copied to clipboard
sealed class WindowMultisample
Link copied to clipboard
open class WindowProgram(val suspend: Boolean = false) : Program

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val KEY_F1: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val KEY_F2: Int
Link copied to clipboard
val KEY_F3: Int
Link copied to clipboard
val KEY_F4: Int
Link copied to clipboard
val KEY_F5: Int
Link copied to clipboard
val KEY_F6: Int
Link copied to clipboard
val KEY_F7: Int
Link copied to clipboard
val KEY_F8: Int
Link copied to clipboard
val KEY_F9: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val KEYNAME_END: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val KEYNAME_F1: String
Link copied to clipboard
const val KEYNAME_F10: String
Link copied to clipboard
const val KEYNAME_F11: String
Link copied to clipboard
const val KEYNAME_F12: String
Link copied to clipboard
const val KEYNAME_F2: String
Link copied to clipboard
const val KEYNAME_F3: String
Link copied to clipboard
const val KEYNAME_F4: String
Link copied to clipboard
const val KEYNAME_F5: String
Link copied to clipboard
const val KEYNAME_F6: String
Link copied to clipboard
const val KEYNAME_F7: String
Link copied to clipboard
const val KEYNAME_F8: String
Link copied to clipboard
const val KEYNAME_F9: String
Link copied to clipboard
const val KEYNAME_HOME: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val KEYNAME_TAB: String
Link copied to clipboard
val logger: KLogger

Functions

Link copied to clipboard
actual fun application(build: ApplicationBuilder.() -> Unit)
actual fun application(program: Program, configuration: Configuration)

Runs program as a synchronous application with the given configuration.

expect fun application(build: ApplicationBuilder.() -> Unit)

Constructs and configures an application using the provided builder block.

expect fun application(program: Program, configuration: Configuration = Configuration())

Configures and initializes an application using the specified program and optional configuration settings.

actual fun application(build: ApplicationBuilder.() -> Unit)

Creates and runs a synchronous OPENRNDR application using the provided ApplicationBuilder.

actual fun application(program: Program, configuration: Configuration)

Runs program as a synchronous application with the given configuration.

Link copied to clipboard

Convenience function for building a new Configuration.

Link copied to clipboard
fun Program.drawImage(width: Int, height: Int, contentScale: Double? = null, format: ColorFormat = ColorFormat.RGBa, type: ColorType = defaultColorType(format), multisample: BufferMultisample? = null, drawFunction: Drawer.() -> Unit): ColorBuffer

Create an image ColorBuffer by drawing it

Link copied to clipboard
fun launch(block: suspend () -> Unit)
Link copied to clipboard
fun Dispatcher.launch(start: ERROR CLASS: Symbol not found for CoroutineStart = CoroutineStart.DEFAULT, block: suspend ERROR CLASS: Symbol not found for CoroutineScope.() -> Unit): ERROR CLASS: Symbol not found for Job

fun Program.launch(context: ERROR CLASS: Symbol not found for CoroutineContext = dispatcher, start: ERROR CLASS: Symbol not found for CoroutineStart = CoroutineStart.DEFAULT, block: suspend ERROR CLASS: Symbol not found for CoroutineScope.() -> Unit): ERROR CLASS: Symbol not found for Job

launch a coroutine in the Program context

Link copied to clipboard
actual fun Program.namedTimestamp(extension: String, path: String?): String
expect fun Program.namedTimestamp(extension: String = "", path: String? = null): String

Generates a timestamped name for the program, optionally including a file extension and path.

actual fun Program.namedTimestamp(extension: String, path: String?): String
Link copied to clipboard
actual fun resourceText(name: String, class: KClass<*>): String
expect fun resourceText(name: String, class: KClass<*> = Application::class): String
actual fun resourceText(name: String, class: KClass<*>): String
Link copied to clipboard
actual fun resourceUrl(name: String, class: KClass<*>): String
expect fun resourceUrl(name: String, class: KClass<*> = Application::class): String

Resolves resource named name relative to class as a String based URL.

actual fun resourceUrl(name: String, class: KClass<*>): String
Link copied to clipboard
actual fun rootClassName(): String
expect fun rootClassName(): String
actual fun rootClassName(): String
Link copied to clipboard
suspend fun throttle(timeMillis: Long)
Link copied to clipboard
fun Program.window(configuration: WindowConfiguration = WindowConfiguration(), init: suspend Program.() -> Unit): ApplicationWindow