1
0
mirror of synced 2026-01-12 00:42:56 +00:00
Interlisp.medley/lispusers/COURIERIMAGESTREAM.TEDIT
2020-11-15 19:22:14 -08:00

14 lines
6.6 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

en·vÅos COURIERIMAGESTREAM
2
4
1
COURIERIMAGESTREAM
1
4
By: Christopher Lane (Lane@Sumex-Aim.Stanford.Edu)
Uses: COURIERSERVE, COURIERDEFS and BITMAPFNS
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 module 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. The module contains the code for both the Courier client and server.
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 and if not supplied, a nameless DISPLAY image stream is opened. All other options are passed to the remote image stream. The image stream can be closed using CLOSEF.
The Courier Procedure 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 similar 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 to the IMAGEOPs of another image stream type on the remote host. 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). An 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 is used to transfer the bitmap using 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 accept 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 (pre-Lyric) functions.(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 53) (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 (ARABIC "" "")) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 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)))))
,È3ÈÈT3ÈÈT-ÈT2ÈÈ2ÈH,È,È,,È,ŠŠ8,ŠŠ8HÈÈ PAGEHEADING RUNNINGHEAD CLASSICCLASSICCLASSICMODERN
MODERN MODERNTERMINAL
MODERN
MODERN
MODERN MODERN
  
 HRULE.GETFNMODERN
   HRULE.GETFNMODERN
   HRULE.GETFNMODERN
  
  HRULE.GETFNMODERN 
  HRULE.GETFNMODERN 

4 
/ b É  = ( m " 3 "1) $ { 6 % GS § +% 7 @
   =- Ç   I = H mnzº