Function · Desktop Services
getDesktopDisplays
Returns information about connected desktop displays.
@sharpts/gui · SharpTS 572a2e31be0eSignature
TypeScript
getDesktopDisplays(): DesktopDisplayInfo[]Returns
DesktopDisplayInfo[] — Connected display records.
Remarks
The result is a point-in-time snapshot. Call the function again after the desktop display configuration changes.
Examples
TypeScript
import { getDesktopDisplays } from "@sharpts/gui";
const primary = getDesktopDisplays().find(display => display.isPrimary);
if (primary !== undefined) console.log(primary.workingAreaSize);Related symbols
Source
src/SharpTS.Gui.Sdk/GuiPackage/runtime.ts:1687 at SharpTS revision 572a2e31be0e2a09be0138bc44501b34d6245b51.