Package org.openrndr

Types

Link copied to clipboard
expect abstract class Application

Application interface

actual abstract class Application

Application interface

actual abstract class Application

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

Link copied to clipboard
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.

actual abstract class ApplicationBase

This is accessible before finalizing the application in ApplicationBuilder.

Link copied to clipboard
abstract class ApplicationBuilder
Link copied to clipboard
class ApplicationBuilderJS : ApplicationBuilder
Link copied to clipboard
class ApplicationBuilderJVM : ApplicationBuilder
Link copied to clipboard
open class ApplicationPreload

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

Link copied to clipboard
data class AssetMetadata(    val programName: String,     val assetBaseName: String,     val assetProperties: Map<String, String>)
Link copied to clipboard
class CharacterEvent(    val character: Char,     val modifiers: Set<KeyModifier>,     var propagationCancelled: Boolean = false)
Link copied to clipboard
class Configuration
Link copied to clipboard
enum CursorType : Enum<CursorType>
Link copied to clipboard
expect class Dispatcher
actual class Dispatcher
actual class Dispatcher : MainCoroutineDispatcher, Delay
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

Defines a Program extension. This is the interface for developers of OPENRNDR extensions.

Link copied to clipboard
annotation class ExtensionDslMarker
Link copied to clipboard
enum ExtensionStage : Enum<ExtensionStage>

Indicates the stage in which the extension is

Link copied to clipboard
enum Fullscreen : Enum<Fullscreen>

Fullscreen mode

Link copied to clipboard
class Keyboard

Keyboard events in a single class

Link copied to clipboard
class KeyEvent(    val type: KeyEventType,     val key: Int,     val name: String,     val modifiers: Set<KeyModifier>,     var propagationCancelled: Boolean = false)

Key event describes key events.

Link copied to clipboard
enum KeyEventType : Enum<KeyEventType>

Key event type enumeration

Link copied to clipboard
enum KeyModifier : Enum<KeyModifier>

Key modifier enumeration

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

Mouse events

Link copied to clipboard
enum MouseButton : Enum<MouseButton>

Mouse button enumeration

Link copied to clipboard
enum MouseCursorHideMode : Enum<MouseCursorHideMode>
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>)

Mouse event message

Link copied to clipboard
enum MouseEventType : Enum<MouseEventType>

Mouse event type enumeration

Link copied to clipboard
data class Pointer(    val position: Vector2,     val primary: Boolean,     val timestamp: Long)
Link copied to clipboard
class Pointers(application: () -> Application)
Link copied to clipboard
enum PresentationMode : Enum<PresentationMode>

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
open class Program(val suspend: Boolean = false)

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

Link copied to clipboard
data class ProgramEvent(val type: ProgramEventType)

program event message

Link copied to clipboard
enum ProgramEventType : Enum<ProgramEventType>

program event type

Link copied to clipboard
data class RequestAssetsEvent(val origin: Any, val program: Program)
Link copied to clipboard
enum UnfocusBehaviour : Enum<UnfocusBehaviour>
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
enum WindowEventType : Enum<WindowEventType>
Link copied to clipboard
sealed class WindowMultisample

Functions

Link copied to clipboard
expect fun application(build: ApplicationBuilder.() -> Unit)
expect fun application(program: Program, configuration: Configuration = Configuration())
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.

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
expect suspend fun applicationAsync(build: ApplicationBuilder.() -> Unit)
expect suspend fun applicationAsync(program: Program, configuration: Configuration = Configuration())
actual suspend fun applicationAsync(build: ApplicationBuilder.() -> Unit)

Creates and runs an asynchronous OPENRNDR application using the provided ApplicationBuilder.

actual suspend fun applicationAsync(program: Program, configuration: Configuration)

Runs program as an asynchronous application with the given configuration.

actual suspend fun applicationAsync(build: ApplicationBuilder.() -> Unit)

Creates and runs an asynchronous OPENRNDR application using the provided ApplicationBuilder.

actual suspend fun applicationAsync(program: Program, configuration: Configuration)

Runs program as an asynchronous application with the given configuration.

Link copied to clipboard
fun buildConfiguration(builder: Configuration.() -> Unit): Configuration

Convenience function for building a new Configuration.

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 Dispatcher.launch(start: CoroutineStart = CoroutineStart.DEFAULT, block: suspend CoroutineScope.() -> Unit): Job

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
inline fun <T> measure(name: String, crossinline f: () -> T): T
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 report()
Link copied to clipboard
expect fun resourceText(name: String, class: KClass<*> = Application::class): String
actual fun resourceText(name: String, class: KClass<*>): String
actual fun resourceText(name: String, class: KClass<*>): String
Link copied to clipboard
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
actual fun resourceUrl(name: String, class: KClass<*>): String
Link copied to clipboard
expect fun rootClassName(): String
actual fun rootClassName(): String
actual fun rootClassName(): String
Link copied to clipboard
suspend fun throttle(timeMillis: Long)
Link copied to clipboard
fun <T> Program.writer(f: Writer.() -> T): T

Properties

Link copied to clipboard
var applicationBaseFunc: () -> ApplicationBase? = null
Link copied to clipboard
val enableProfiling: Boolean
Link copied to clipboard
const val KEY_ARROW_DOWN: Int = 264
Link copied to clipboard
const val KEY_ARROW_LEFT: Int = 263
Link copied to clipboard
const val KEY_ARROW_RIGHT: Int = 262
Link copied to clipboard
const val KEY_ARROW_UP: Int = 265
Link copied to clipboard
const val KEY_BACKSPACE: Int = 259
Link copied to clipboard
const val KEY_CAPSLOCK: Int = 280
Link copied to clipboard
const val KEY_DELETE: Int = 261
Link copied to clipboard
const val KEY_END: Int = 269
Link copied to clipboard
const val KEY_ENTER: Int = 257
Link copied to clipboard
const val KEY_ESCAPE: Int = 256
Link copied to clipboard
const val KEY_F1: Int = 290
Link copied to clipboard
const val KEY_F10: Int = 299
Link copied to clipboard
const val KEY_F11: Int = 300
Link copied to clipboard
const val KEY_F12: Int = 301
Link copied to clipboard
const val KEY_F2: Int = 291
Link copied to clipboard
const val KEY_F3: Int = 292
Link copied to clipboard
const val KEY_F4: Int = 293
Link copied to clipboard
const val KEY_F5: Int = 294
Link copied to clipboard
const val KEY_F6: Int = 295
Link copied to clipboard
const val KEY_F7: Int = 296
Link copied to clipboard
const val KEY_F8: Int = 297
Link copied to clipboard
const val KEY_F9: Int = 298
Link copied to clipboard
const val KEY_HOME: Int = 268
Link copied to clipboard
const val KEY_INSERT: Int = 260
Link copied to clipboard
const val KEY_LEFT_SHIFT: Int = 340
Link copied to clipboard
const val KEY_PAGE_DOWN: Int = 267
Link copied to clipboard
const val KEY_PAGE_UP: Int = 266
Link copied to clipboard
const val KEY_PRINT_SCREEN: Int = 283
Link copied to clipboard
const val KEY_RIGHT_SHIFT: Int = 344
Link copied to clipboard
const val KEY_SPACEBAR: Int = 32
Link copied to clipboard
const val KEY_TAB: Int = 258