CreateScreenGroup

Creates a screen group and all its screens, bitmaps, buffers, and VDLs.

Synopsis

Item CreateScreenGroup (Item *screenItemArray,TagArg *targs)
Item CreateScreenGroupVA (Item *screenItemArray,uint32 targs,...)

Description

This call is the workhorse of the graphics display architecture. It creates a complete display environment, with all the associated components and data structures, based on the specifications made in the targs argument. The call returns the item number of a newly created ScreenGroup structure, and it fills out the specified screenItemArray with item numbers for the screen structures that have been created.

The tag arguments supplied as an argument to the call lets the programmer set all of the parameters that control the creation of the screen group. However, you don't need to specify all of the tag arguments. Each possible tag argument has an associated default value that is used if the tag argument is not supplied. In fact, if the programmer specifies a tag argument array with no entries, or specifies NULL as the targs argument, the defaults are sufficient to create a simple single-buffer screen group.

Note: Only one bitmap per screen is supported.

Tag Arguments

Here are the tag arguments that can be passed to CreateScreenGroup():

Arguments

screenItemArray
Pointer to an array of Item fields. The array is filled in by CreateScreenGroup() if the call is successful.
targs
A pointer to an array of tag arguments. The last element of the array must be the value TAG_END. If there are no tag arguments, this argument must be NULL.

Return Value

The call returns the item number of the newly created screen group or an error number (a negative value) if an error occurs.

GRAFERR_NOMEM
is returned if any memory allocation attempted on the behalf of the task fails.
GRAFERR_VDLWIDTH
is returned if an illegal width is specified for the VDL.

Caveats

Multiple bitmaps per screen are not yet supported.

Only VDLs of type VDLTYPE_FULL are currently supported.

SPORT-conscious bitmap buffer allocation is not yet done "automatically." You must supply a value from GetBankBits() to take advantage of this feature.

Implementation

Folio call is implemented in Graphics folio V20.

Associated Files

graphics.h, graphics.lib

See Also

AddScreenGroup(), DeleteScreenGroup(), RemoveScreenGroup()