open-stream

Function

Package: common-graphics

Arguments: device &optional location direction &rest options

This function creates streams. In Allegro CL for Windows 3.0.x, it was used to create window streams (i.e. windows) as well as other types of Common Graphics streams, such as bitmap-stream and printer streams. Starting in 5.0, however, it should not be used for making windows (although it still works for that purpose for backward compatibility). New code should use make-window instead to make a window.

open-stream should still be used for printer steams and bitmap-streams. The device is the class of the stream (either printer, bitmap-stream or an appropriate subclass).

The location and direction arguments are ignored because Common Graphics now uses simple-streams (see Common Graphics and Simple Streams in cgide.htm). They remain as optional arguments for backward compatibility. Values must be passed if additional initargs are to be specified, but nil is a suitable value for both arguments.

For example, a printer stream is typically opened with the form

(open-stream 'printer nil nil ...)

where the ... may be replaced by any number of initargs. For a list of open-stream initargs for printers, refer to pop-up-printer-job-dialog. Note that if there are no intargs, this will open a printer stream:

(open-stream 'printer)

The exact list of possible arguments depends on the device.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.