kvision / pl.treksoft.kvision.electron / SystemPreferences

SystemPreferences

external interface SystemPreferences : EventEmitter

Functions

addListener

abstract fun addListener(event: String, listener: (event: Event, newColor: String) -> Unit): SystemPreferences
abstract fun addListener(event: String, listener: (event: Event) -> Unit): SystemPreferences
abstract fun addListener(event: String, listener: (event: Event, invertedColorScheme: Boolean) -> Unit): SystemPreferences

getAccentColor

abstract fun getAccentColor(): String

getColor

abstract fun getColor(color: dynamic): String

getUserDefault

abstract fun getUserDefault(key: String, type: String): Any
abstract fun getUserDefault(key: String, type: String): Any
abstract fun getUserDefault(key: String, type: String): Any
abstract fun getUserDefault(key: String, type: String): Any
abstract fun getUserDefault(key: String, type: String): Any
abstract fun getUserDefault(key: String, type: String): Any
abstract fun getUserDefault(key: String, type: String): Any
abstract fun getUserDefault(key: String, type: String): Any

isAeroGlassEnabled

abstract fun isAeroGlassEnabled(): Boolean

isDarkMode

abstract fun isDarkMode(): Boolean

isInvertedColorScheme

abstract fun isInvertedColorScheme(): Boolean

isSwipeTrackingFromScrollEventsEnabled

abstract fun isSwipeTrackingFromScrollEventsEnabled(): Boolean

on

abstract fun on(event: String, listener: (event: Event, newColor: String) -> Unit): SystemPreferences
abstract fun on(event: String, listener: (event: Event) -> Unit): SystemPreferences
abstract fun on(event: String, listener: (event: Event, invertedColorScheme: Boolean) -> Unit): SystemPreferences

once

abstract fun once(event: String, listener: (event: Event, newColor: String) -> Unit): SystemPreferences
abstract fun once(event: String, listener: (event: Event) -> Unit): SystemPreferences
abstract fun once(event: String, listener: (event: Event, invertedColorScheme: Boolean) -> Unit): SystemPreferences

postLocalNotification

abstract fun postLocalNotification(event: String, userInfo: Any): Unit

postNotification

abstract fun postNotification(event: String, userInfo: Any): Unit

registerDefaults

abstract fun registerDefaults(defaults: Any): Unit

removeListener

abstract fun removeListener(event: String, listener: (event: Event, newColor: String) -> Unit): SystemPreferences
abstract fun removeListener(event: String, listener: (event: Event) -> Unit): SystemPreferences
abstract fun removeListener(event: String, listener: (event: Event, invertedColorScheme: Boolean) -> Unit): SystemPreferences

removeUserDefault

abstract fun removeUserDefault(key: String): Unit

setUserDefault

abstract fun setUserDefault(key: String, type: String, value: String): Unit

subscribeLocalNotification

abstract fun subscribeLocalNotification(event: String, callback: (event: String, userInfo: Any) -> Unit): Unit

subscribeNotification

abstract fun subscribeNotification(event: String, callback: (event: String, userInfo: Any) -> Unit): Unit

unsubscribeLocalNotification

abstract fun unsubscribeLocalNotification(id: Number): Unit

unsubscribeNotification

abstract fun unsubscribeNotification(id: Number): Unit

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.