kvision / pl.treksoft.kvision.electron / IpcRenderer

IpcRenderer

external interface IpcRenderer : EventEmitter

Functions

on

abstract fun on(event: String, listener: Function<*>): IpcRenderer

once

abstract fun once(event: String, listener: Function<*>): IpcRenderer

removeAllListeners

abstract fun removeAllListeners(channel: String): IpcRenderer

removeListener

abstract fun removeListener(event: String, listener: Function<*>): IpcRenderer

send

abstract fun send(channel: String, vararg args: Any): Unit

sendSync

abstract fun sendSync(channel: String, vararg args: Any): Any

sendTo

abstract fun sendTo(windowId: Number, channel: String, vararg args: Any): Unit

sendToHost

abstract fun sendToHost(channel: String, vararg args: Any): 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<*>>

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

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.