XEROX COURIERIMAGESTREAM 2 4 1 COURIERIMAGESTREAM 1 4 By: Christopher Lane (Lane@Sumex-Aim.Stanford.Edu) Requires: COURIERSERVE, COURIERDEFS, BITMAPFNS INTRODUCTION COURIERIMAGESTREAM implements a Courier client and server program which allows remote hosts to do image stream manipulations on other workstations via the network. To do this, it defines the COURIER virtual image stream type which allows the user to manipulate remote image streams through 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 IMAGEOPs definition, there is an equivalent Courier procedure in the IMAGESTREAM program. Currently, the file contains the code for both the Courier server and client. OPENING AND CLOSING REMOTE IMAGE STREAMS Remote image streams can be opened using either the COURIER image stream type or using direct Courier calls . The COURIER Image Stream Interface Remote Courier image streams can be opened using: (SETQ COURIERSTREAM (COURIER.OPEN host) (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. The Courier Prodedure Call Interface Courier image streams can also be opened using Courier procedure calls from any Courier client with the Courier procedure: (OPEN 0 (FILE IMAGETYPE) RETURNS (HANDLE) REPORTS NIL) which is invoked from lisp by doing: (COURIER.CALL COURIERSTREAM 'IMAGESTREAM 'OPEN FILE IMAGETYPE OPTIONS) where FILE, IMAGETYPE and OPTIONS are identical to the arguments to OPENIMAGESTREAM. This call will return a handle to be used with the remainder of the IMAGESTREAM procedures. To close an image stream from a Courier client use the Courier procedure: (CLOSE 1 (HANDLE) RETURNS NIL REPORTS NIL) which is invoked from lisp by doing: (COURIER.CALL COURIERSTREAM 'IMAGESTREAM 'CLOSE HANDLE) 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. This is only relevant to direct Courier calls, the COURIER image stream BITBLT operation hides the differences. When using the COURIER image stream type, the STRINGWIDTH, CHARWIDTH etc. IMAGEOPs are handled locally, not via Courier calls, to improve efficiency. IMAGESTREAM PROGRAM VERSIONS The current implementation of the IMAGESTREAM Courier program is version 1. This module also has the previous version of the program (0) defined as OLDIMAGESTREAM (just the procedure definitions that differ, it inherits from IMAGESTREAM). This allows the current version of the program to accepts calls from older versions, but not vice-versa. However, the new version of the IMAGESTREAM Courier program can be loaded and used with the old (Koto) functions if desired.(LIST ((PAGE NIL (PAPERSIZE LETTER STARTINGPAGE# 47) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))(È(È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD MODERN MODERN MODERNTERMINAL MODERN MODERN MODERN MODERNLOGO  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN 4/ b É.  5? Z(55"3Y$  2CN$|6%G #D X*%7? Yq- T\  i.7"  DI=Oézº