Screen

external interface Screen : EventEmitter(source)

Properties

Functions

Link copied to clipboard
fun addListener(type: EventType, listener: EventListener)
Link copied to clipboard
abstract 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 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
fun emit(type: EventType, vararg args: Any?): Boolean
Link copied to clipboard
Link copied to clipboard

An array of displays that are currently available.

Link copied to clipboard
abstract fun getCursorScreenPoint(): Point

The current absolute position of the mouse pointer.

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

The display that most closely intersects the provided bounds.

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

The display nearest the specified point.

Link copied to clipboard
Link copied to clipboard
abstract fun getPrimaryDisplay(): Display

The primary display.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun off(type: EventType, listener: EventListener)
Link copied to clipboard
fun on(type: EventType, listener: EventListener)
Link copied to clipboard
fun once(type: EventType, listener: EventListener)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun removeListener(type: EventType, listener: EventListener)
Link copied to clipboard
abstract 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 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