Expose display information to the script API

Project:Sidewinder Web Applications Viewer
Version:2.0.4-1013
Component:JavaScript API
Category:feature
Priority:normal
Assigned:Phil Booth
Status:active
Description

In order for sane positioning of script-invoked renderer objects to be realistically possible, it is necessary to expose some information about the display to the script API.

Off the top of my head, I would consider perhaps adding a property to the global object called 'displays' which is an array representing all of the displays connected to the system. Each index into this array could then have further properties such as 'height', 'width', 'isPrimary' and so on.

Further, it would probably be appropriate to also add a property to the renderer object, so that a script can match up an entry from the 'displays' array to an instance of the renderer if necessary.