Learn how to evaluate and integrate the VNC SDK

We're here if you need help.

DisplayManager

vncsdk.DisplayManager

Manages the list of displays made available by a Server.

Method Summary

Modifier and Type Method and Description

enable(enable)

Specifies whether screen sharing is enabled.

number

getDisplayCount()

Returns the number of displays.

number

getDisplayIndex()

Gets the index of the currently selected display.

string

getId(index)

Gets the ID of the display (typically a short string).

string

getName(index)

Gets the name of the display (typically a human-readable string).

number

getOriginX(index)

Gets the horizontal origin of the display in pixels.

number

getOriginY(index)

Gets the vertical origin of the display in pixels.

number

getResolutionX(index)

Gets the horizontal resolution of the display in pixels.

number

getResolutionY(index)

Gets the vertical resolution of the display in pixels.

boolean

isEnabled()

Returns whether the server is sharing its screens, whether it is being called from a server or a viewer.

boolean

isPrimary(index)

Returns whether this is the primary (or main) display.

boolean

isSelectDisplayAllowed()

Returns whether the selectDisplay() call is permitted.

selectDisplay(index)

Chooses a particular display to remote to connected Viewer app users.

setCallback(callback)

Registers a callback notifying when displays are added or removed, or the resolution of an existing display changes.

Methods

DisplayManager.enable(enable)

Specifies whether screen sharing is enabled.

For more information, see vnc_DisplayManager_enable().

Arguments:
  • enable (boolean) –
Throws:

vncsdk.VncException on error

DisplayManager.getDisplayCount()

Returns the number of displays.

For more information, see vnc_DisplayManager_getDisplayCount().

Return type:number
DisplayManager.getDisplayIndex()

Gets the index of the currently selected display.

For more information, see vnc_DisplayManager_getDisplayIndex().

Return type:number
DisplayManager.getId(index)

Gets the ID of the display (typically a short string).

For more information, see vnc_DisplayManager_getId().

Arguments:
  • index (number) –
Throws:

vncsdk.VncException on error

Return type:

string

DisplayManager.getName(index)

Gets the name of the display (typically a human-readable string).

For more information, see vnc_DisplayManager_getName().

Arguments:
  • index (number) –
Throws:

vncsdk.VncException on error

Return type:

string

DisplayManager.getOriginX(index)

Gets the horizontal origin of the display in pixels.

For more information, see vnc_DisplayManager_getOriginX().

Arguments:
  • index (number) –
Return type:

number

DisplayManager.getOriginY(index)

Gets the vertical origin of the display in pixels.

For more information, see vnc_DisplayManager_getOriginY().

Arguments:
  • index (number) –
Return type:

number

DisplayManager.getResolutionX(index)

Gets the horizontal resolution of the display in pixels.

For more information, see vnc_DisplayManager_getResolutionX().

Arguments:
  • index (number) –
Return type:

number

DisplayManager.getResolutionY(index)

Gets the vertical resolution of the display in pixels.

For more information, see vnc_DisplayManager_getResolutionY().

Arguments:
  • index (number) –
Return type:

number

DisplayManager.isEnabled()

Returns whether the server is sharing its screens, whether it is being called from a server or a viewer.

For more information, see vnc_DisplayManager_isEnabled().

Return type:boolean
DisplayManager.isPrimary(index)

Returns whether this is the primary (or main) display.

For more information, see vnc_DisplayManager_isPrimary().

Arguments:
  • index (number) –
Return type:

boolean

DisplayManager.isSelectDisplayAllowed()

Returns whether the selectDisplay() call is permitted.

For more information, see vnc_DisplayManager_isSelectDisplayAllowed().

Return type:boolean
DisplayManager.selectDisplay(index)

Chooses a particular display to remote to connected Viewer app users.

For more information, see vnc_DisplayManager_selectDisplay().

Arguments:
  • index (number) –
Throws:

vncsdk.VncException on error

DisplayManager.setCallback(callback)

Registers a callback notifying when displays are added or removed, or the resolution of an existing display changes.

For more information, see vnc_DisplayManager_setCallback().

Arguments:
Throws:

vncsdk.VncException on error

×