[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

The OpenMonitor() function will locate and open the requested MonitorSpec.
It is called with either the name of the monitor or a ModeID.

    mspc = struct MonitorSpec *OpenMonitor(STRPTR name, ULONG modeID)

If the name argument is non-NULL, the MonitorSpec is chosen by name.  If
the name argument is NULL, the MonitorSpec is chosen by ModeID.  If both
the name and ModeID arguments are NULL, a pointer to the MonitorSpec for
the default monitor is returned.  OpenMonitor() returns either a pointer
to a MonitorSpec structure, or NULL if the requested MonitorSpec could not
be opened.  The CloseMonitor() function relinquishes access to a
MonitorSpec previously acquired with OpenMonitor().

To set up a View in Release 2, a ViewExtra structure must also be created
and attached to it.  The ViewExtra.Monitor field must be initialized to
the address of a valid MonitorSpec structure before the View is displayed.
Use OpenMonitor() to initialize the Monitor field.

[Back to Amiga Developer Docs]