kvision / pl.treksoft.kvision.electron / Screen

Screen

external interface Screen : EventEmitter

Functions

addListener

abstract fun addListener(event: String, listener: (event: Event, newDisplay: Display) -> Unit): Screen
abstract fun addListener(event: String, listener: (event: Event, display: Display, changedMetrics: Array<String>) -> Unit): Screen
abstract fun addListener(event: String, listener: (event: Event, oldDisplay: Display) -> Unit): Screen

getAllDisplays

abstract fun getAllDisplays(): Array<Display>

getCursorScreenPoint

abstract fun getCursorScreenPoint(): Point

getDisplayMatching

abstract fun getDisplayMatching(rect: Rectangle): Display

getDisplayNearestPoint

abstract fun getDisplayNearestPoint(point: Point): Display

getMenuBarHeight

abstract fun getMenuBarHeight(): Number

getPrimaryDisplay

abstract fun getPrimaryDisplay(): Display

on

abstract fun on(event: String, listener: (event: Event, newDisplay: Display) -> Unit): Screen
abstract fun on(event: String, listener: (event: Event, display: Display, changedMetrics: Array<String>) -> Unit): Screen
abstract fun on(event: String, listener: (event: Event, oldDisplay: Display) -> Unit): Screen

once

abstract fun once(event: String, listener: (event: Event, newDisplay: Display) -> Unit): Screen
abstract fun once(event: String, listener: (event: Event, display: Display, changedMetrics: Array<String>) -> Unit): Screen
abstract fun once(event: String, listener: (event: Event, oldDisplay: Display) -> Unit): Screen

removeListener

abstract fun removeListener(event: String, listener: (event: Event, newDisplay: Display) -> Unit): Screen
abstract fun removeListener(event: String, listener: (event: Event, display: Display, changedMetrics: Array<String>) -> Unit): Screen
abstract fun removeListener(event: String, listener: (event: Event, oldDisplay: Display) -> Unit): Screen

Inherited Functions

addListener

open fun addListener(event: String, listener: Function<*>): EventEmitter

emit

open fun emit(event: String, vararg args: Any): Boolean

eventNames

open fun eventNames(): Array<String>

getMaxListeners

open fun getMaxListeners(): Number

listenerCount

open fun listenerCount(type: String): Number

listeners

open fun listeners(event: String): Array<Function<*>>

on

open fun on(event: String, listener: Function<*>): EventEmitter

once

open fun once(event: String, listener: Function<*>): EventEmitter

prependListener

open fun prependListener(event: String, listener: Function<*>): EventEmitter

prependOnceListener

open fun prependOnceListener(event: String, listener: Function<*>): EventEmitter

removeAllListeners

open fun removeAllListeners(event: String? = definedExternally): EventEmitter

removeListener

open fun removeListener(event: String, listener: Function<*>): EventEmitter

setMaxListeners

open fun setMaxListeners(n: Number): EventEmitter

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.