object SKryptonApp : NativeInterface
A singleton app instance for this library and is the main entry point for any program that wants to use any of the SKrypton APIs. This object is in charge of initializing the native components and managing it.
val APP_DIRECTORY: Path
Holds a Path pointing to the directory used by SKrypton, this directory contains all the native libraries and resources that SKrypton will use. |
|
lateinit var handle: CPointer
Native pointer, initialized in initialize. |
fun close(): Unit
Closes the SKryptonApp instance explicitly. |
|
fun exec(exit: Boolean = false): Int
Blocking function which starts the execution of the SKryptonApp. |
|
fun getEnv(key: String): String
Gets the value of the native environment variable. |
|
fun initialize(args: Array<String> = emptyArray(), remoteDebugPort: Int = -1, action: SKryptonApp.() -> Unit = {}): SKryptonApp
Initializes the native components. |
|
fun putEnv(key: String, value: String): Unit
Puts an variable into the native environment, it is lost when the SKryptonApp is done executing. |
|
fun runOnMainThread(action: () -> Unit): Unit
Executes the given action on the thread where SKryptonApp exists. This is similar to the Platform.runLater method. |
fun dispose(): Unit
Disposes this object, usually same action as close |
fun SKryptonApp.screen(url: String, showCursor: Boolean = true, width: Int = 1280, height: Int = 720, action: SKryptonScreen.() -> Unit = {}): SKryptonScreen
Creates a SKryptonScreen under this SKryptonApp instance |
|
fun SKryptonApp.webView(url: String, action: SKryptonWebView.() -> Unit = {}): SKryptonWebView
Creates a SKryptonWebView under this SKryptonApp instance. |