XEROX COURIERIMAGESTREAM 2 4 1 COURIERIMAGESTREAM 1 4 By: Christopher Lane (Lane@Sumex-aim.ARPA) Requires: COURIERSERVE, COURIERDEFS INTRODUCTION COURIERIMAGESTREAM implements a simple Courier Server program for Interlisp-D which allows remote hosts to do Image Stream manipulations on an Interlisp-D workstation. It also defines an Image Stream interface which allows Interlisp-D workstations to manipulate remote Image Streams via local Image Streams. THE IMAGESTREAM COURIER PROGRAM The package defines a Courier Program called IMAGESTREAM (which inherits from the INTERLISP Courier Program defined in COURIERDEFS). For each IMAGEOP in the IMAGOPs definition, there is an equivalent Courier procedure in the IMAGESTREAM program. Currently, the file contains the code for both the Courier server and the Courier client. OPENING AND CLOSEING REMOTE IMAGE STREAMS Remote Image Streams can be opened one of two ways, via Courier calls or the COURIER Image Stream type. The Courier Prodedure Call Interface Courier Image streams can be opened using a Courier procedure call from any Courier client using the Courier procedure: (OPEN 0 (FILE IMAGETYPE) RETURNS (HANDLE) REPORTS NIL) which is invoked from INTERLISP-D using: (COURIER.CALL COURIERSTREAM 'IMAGESTREAM 'OPEN FILE IMAGETYPE OPTIONS) where FILE, IMAGETYPE and OPTIONS are identical to the arguments to OPENIMAGESTREAM. This Courier call will return a handle to be used with the remainder of the IMAGESTREAM procedures. To close an IMAGESTREAM from a Courier client use the Courier procedure: (CLOSE 1 (HANDLE) RETURNS NIL REPORTS NIL) which is invoked from INTERLISP-D using: (COURIER.CALL COURIERSTREAM 'IMAGESTREAM 'CLOSE HANDLE) The COURIER Image Stream Interface Remote Courier Image Streams can be opened from Interlisp-D using (OPENIMAGESTREAM COURIERSTREAM 'COURIER OPTIONS) Which returns an Image Stream. The OPTIONS can include FILE and IMAGETYPE which are passed to OPENIMAGESTREAM on the remote host. If not supplied, a nameless DISPLAY Image Stream is opened on the remote host. Any other options in OPTIONS are passed to the remote Image Stream. The Image Stream can be closed using CLOSEF. DIFFERENCES BETWEEN IMAGEOPS AND IMAGESTREAM COURIER PROCEDURES All of the IMAGEOPS are implemented in the COURIER Image Stream type as it merely passes the call onto the IMAGEOPS of another Image Stream type on the remote host. Currently, no error checking is done, so invoking an illegal ImageOp will cause a Courier rejection of the call. The arguments to the IMAGESTREAM Courier Procedures are generally in the same order as the arguments to the various IM* functions which implement an Image Stream (stream argument first). The only exception is BITBLT (and SCALEDBITBLT) which is defined as follows. (BITBLT 32 (HANDLE BULK.DATA.SOURCE LEFT BOTTOM WIDTH HEIGHT SOURCETYPE OPERATION TEXTURE CLIPPINGREGION) The BULK.DATA.SOURCE argument transfers the bitmap, as printed by WRITEBINARYBITMAP. Note that this is only relevant to direct Courier calls, the COURIER Image Stream BITBLT Imageop hides the differences. When using a COURIER Image Stream, the STRINGWIDTH, CHARWIDTH etc. Imageops are handled locally, not via Courier calls, to improve efficiency.(LIST ((PAGE NIL (FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))(((((8( (8D PAGEHEADING RUNNINGHEADMODERN MODERNTERMINAL MODERN MODERN MODERN MODERNLOGO HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN ,$ 6V)j$y6)IU+)7#C1I@ j z