Package-level declarations

Types

Link copied to clipboard
abstract class Application
Link copied to clipboard
interface Arguments

Unlike JavaFX, starting a Glok application is the same as any other JVM based application. Declare a 'main' function, and call launch.

Link copied to clipboard
class ArgumentsException(val arg: String, message: String) : Exception
Link copied to clipboard
Link copied to clipboard
class GlokTimer(val delay: Double, val repeating: Boolean = false, val action: () -> Unit) : Comparable<GlokTimer>

Runs code after a given time interval. This is not a high precision timer, there is no guarantee about how soon after delay milliseconds, the action will be performed.

Link copied to clipboard
expect object Platform
actual object Platform
actual object Platform
Link copied to clipboard
class Restart(val applicationClass: KClass<out Application>, val rawArgs: Array<out String> = emptyArray())

When an Application ends, it can choose to restart by adding an item to Application.restarts. applicationClass can be the same as the previous application, or another one.

Functions

Link copied to clipboard
fun createRestart(klass: Class<out Application>, rawArgs: Array<out String> = emptyArray()): Restart

A convenience function for those using Java rather than Kotlin. It creates a Restart using a Java Class, rather than a Kotlin KClass.

Link copied to clipboard
fun doubleDashArguments(flags: List<Char>, longFlags: List<String>, parameters: List<String>, args: Array<out String>): Arguments

Similar to posixArguments, but uses two dashes for long names. Single dashes are only used for flags.

Link copied to clipboard
expect fun launch(klass: KClass<out Application>, rawArgs: Array<out String> = emptyArray())

Called from the program's main entry point to start a Glok Application.

actual fun launch(klass: KClass<out Application>, rawArgs: Array<out String>)
fun launch(klass: Class<out Application>, rawArgs: Array<out String> = emptyArray())

A convenience function for those using Java rather than Kotlin. It launches an application using a Java Class, rather than a Kotlin KClass.

actual fun launch(klass: KClass<out Application>, rawArgs: Array<out String>)
Link copied to clipboard