Screen

external interface Screen : EventEmitter(source)

Properties

Link copied to clipboard
abstract external val displayAddedEvent: EventInstance<Tuple2<Event<*>, Display>>
Link copied to clipboard

Functions

Link copied to clipboard
external fun addListener(type: EventType, listener: EventListener)
Link copied to clipboard
abstract external fun dipToScreenPoint(point: Point): Point

Converts a screen DIP point to a screen physical point. The DPI scale is performed relative to the display containing the DIP point.

Link copied to clipboard
abstract external fun dipToScreenRect(window: BrowserWindow?, rect: Rectangle): Rectangle

Converts a screen DIP rect to a screen physical rect. The DPI scale is performed relative to the display nearest to window. If window is null, scaling will be performed to the display nearest to rect.

Link copied to clipboard
external fun emit(type: EventType, vararg args: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
abstract external fun getAllDisplays(): ReadonlyArray<Display>

An array of displays that are currently available.

Link copied to clipboard
abstract external fun getCursorScreenPoint(): Point

The current absolute position of the mouse pointer.

Link copied to clipboard
abstract external fun getDisplayMatching(rect: Rectangle): Display

The display that most closely intersects the provided bounds.

Link copied to clipboard
abstract external fun getDisplayNearestPoint(point: Point): Display

The display nearest the specified point.

Link copied to clipboard
external fun getMaxListeners(): Double
Link copied to clipboard
abstract external fun getPrimaryDisplay(): Display

The primary display.

Link copied to clipboard
external fun listenerCount(type: EventType, listener: EventListener): Double
Link copied to clipboard
Link copied to clipboard
external fun off(type: EventType, listener: EventListener)
Link copied to clipboard
external fun on(type: EventType, listener: EventListener)
Link copied to clipboard
external fun once(type: EventType, listener: EventListener)
Link copied to clipboard
external fun prependListener(type: EventType, listener: EventListener)
Link copied to clipboard
external fun prependOnceListener(type: EventType, listener: EventListener)
Link copied to clipboard
Link copied to clipboard
external fun removeAllListeners(type: EventType)
Link copied to clipboard
external fun removeListener(type: EventType, listener: EventListener)
Link copied to clipboard
abstract external fun screenToDipPoint(point: Point): Point

Converts a screen physical point to a screen DIP point. The DPI scale is performed relative to the display containing the physical point.

Link copied to clipboard
abstract external fun screenToDipRect(window: BrowserWindow?, rect: Rectangle): Rectangle

Converts a screen physical rect to a screen DIP rect. The DPI scale is performed relative to the display nearest to window. If window is null, scaling will be performed to the display nearest to rect.

Link copied to clipboard
external fun setMaxListeners(n: Number)