io.displaysAPIinterface
Displays API.
10 Methods
capture()⚓︎
(options: CaptureOptions) => Promise<string>
Returns a Base64 string of the screenshot of a single display.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| options⚓︎ | CaptureOptions | Options for capturing the display. |
captureAll()⚓︎
(options: CaptureAllOptions) => Promise<string | string[]>
Returns a Base64 string of the screenshots of all displays. The returned value depends on the combined property specified in the options object.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| options⚓︎ | CaptureAllOptions | Options for capturing the displays. |
convertBounds()⚓︎
(options: ConvertBoundsOptions) => Promise<ConvertBoundsResult>
Converts display bounds between the different coordinate systems - physical (screen pixels), electron (Electron DIP pixels), and logical (location scaled by primary display scale, size - by target display scale).
io.Connect Desktop 10.2@interopio/desktop 6.20Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| options⚓︎ | ConvertBoundsOptions | Options for converting display bounds. |
get()⚓︎
(id: number) => Promise<Display>
Returns a single display by ID.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| id⚓︎ | number | ID of the desired display. |
getByBounds()⚓︎
(options: GetByBoundsOptions) => Promise<Display>
Retrieves the display matching the specified bounds in the given coordinate system.
io.Connect Desktop 10.2@interopio/desktop 6.20Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| options⚓︎ | GetByBoundsOptions | Options for retrieving a display by provided bounds. |
getByWindowId()⚓︎
(id: string) => Promise<Display>
Returns a single display by window ID.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| id⚓︎ | string | Window ID of the desired display. |
onDisplayChanged()⚓︎
(cb: (displays: Display[]) => void) => UnsubscribeFunction