# screen

# getAllDisplays M

# getAllDisplays(): Promise<IDisplay[]>

An array of displays that are currently available.

import { display } from "@reactivemarkets/desktop-sdk";

const displays = await display.getAllDisplays();

# getCursorScreenDisplay M

# getCursorScreenDisplay(): Promise<IDisplay>

The display the current cursor screen point is nearest to.

import { display } from "@reactivemarkets/desktop-sdk";

const display = await display.getCursorScreenDisplay();

# getCursorScreenPoint M

# getCursorScreenPoint(): Promise<IPoint>

The current absolute position of the mouse pointer.

import { display } from "@reactivemarkets/desktop-sdk";

const { x, y } = await display.getCursorScreenPoint();

# getDisplayNearestPoint M

# getDisplayNearestPoint(): Promise<IDisplay>

The display nearest the specified point.

import { display } from "@reactivemarkets/desktop-sdk";

const display = await display.getDisplayNearestPoint({ x: 0, y: 0});

# getPrimaryDisplay M

# getPrimaryDisplay(): Promise<IDisplay>

The primary display.

import { display } from "@reactivemarkets/desktop-sdk";

const display = await display.getPrimaryDisplay();

# off M

# off(event: ScreenEvents, listener: () => void): void

Removes a listener from Screen Events.

import { desktop } from "@reactivemarkets/desktop-sdk";

const listener = () => {
    // trigger an action
};

desktop.off("display-added", listener);

# on M

# on(event: ScreenEvents, listener: () => void): void

Adds a listener to Screen Events.

import { desktop } from "@reactivemarkets/desktop-sdk";

const listener = () => {
    // trigger an action
};

desktop.on("display-added", listener);

# Screen Events

Event Description
display-added Emitted when a new display has been added.
display-removed Emitted when a display has been removed.
display-metrics-changed Emitted when a display metric has changed.