Name
GetPubScreens -- return a list of all available public screens (V5.2)
Synopsis
t, info = GetPubScreens()
Platforms
AmigaOS and compatibles only

Function
This function can be used to query the system for a list of all available public screens. It will return a table that contains one string element for each public screen that is currently open.

Starting with Hollywood 5.3 this function will return a second table containing information about the screen dimensions and color depth. This second return table will contain as many elements as the first return table and there will be one subtable for each public screen that is currently open. Each subtable will contain the following fields:

Width:
Initialized to the width of the public screen.

Height:
Initialized to the height of the public screen.

Depth:
Initialized to the depth of the public screen.

You can use ShowScreen() to switch to a public screen. If you want to move your display to a specific public screen, use SetDisplayAttributes().

Note that in a multitasking environment like AmigaOS, all screens that aren't owned by your application can disappear at any time so you need to be prepared that this function returns screens that don't exist any longer because they have been closed already.

Inputs
none

Results
t
table containing a number of strings describing all open public screens
info
additional table containing information about the screen dimensions and depth (V5.3)
Example
t = GetPubScreens()
For Local k = 0 To ListItems(t) - 1 Do DebugPrint(t[k])
This code lists all public screens.

Show TOC