DecomposerControl.mesa
Copyright (C) Xerox Corporation 1981, 1982, 1983, 1984, 1985, 1986. All rights reserved.
Last Edited 4-Nov-85 9:53:26 by Jacks
Tim Diebert: December 15, 1986 9:28:52 am PST
DIRECTORY
NSString USING [String, nullString],
PaperTypes USING [Paper],
PrintingTypes USING [Option],
PrintQueue USING [ObjectStatus, QueueObjectHandle],
Process USING [Priority, priorityBackground],
PSAsyncMsg USING [Proc],
System USING [UniversalID];
DecomposerControl: CEDAR DEFINITIONS = BEGIN
DocumentInProgress: ERROR;
TraceLevel: TYPE = {none, terse, verbose};
WaitChoice: TYPE = {wait, dontWait};
NotifyCode: TYPE = {noDefaultFont, noResources, pageTooComplicated, other};
NotifyProc: TYPE = PROCEDURE [queueObject: PrintQueue.QueueObjectHandle, code: NotifyCode, continuable: BOOLEAN] RETURNS [keepGoing: BOOLEAN];
In some cases the client is notified of problems found
during decomposition and may continue (if continuable)
or abort the document.
CancelProc: TYPE = PROCEDURE [docName: NSString.String,
docQueueStatus: PrintQueue.ObjectStatus];
DecomposerStatus: TYPE = RECORD [decomposing: BOOLEAN,
decomposeObjectsOutstanding: CARDINAL -- equal to the number of documents already decomposed for which the decompose object has not yet been freed
];
Procedures
Init: PROCEDURE [
currentOption: PrintingTypes.Option,
priority: Process.Priority ← Process.priorityBackground,
fontDirectory: NSString.String ← NSString.nullString,
maxDecomposeHandles: CARDINAL ← 1,
errorThreshold: CARDINALLAST[CARDINAL],
psName: NSString.String ← NSString.nullString, --Service name that goes on banner page.
maxPaperSize: PaperTypes.Paper ← [],
notifyProc: NotifyProc, --Proc called to notify client of problems found during decomposition.
putAsyncMsgFromKey: PSAsyncMsg.Proc];
called only once
Expunge: PROCEDURE;
Don't call this after Init has been called! Causes all permanent storage to be released.
Start: PROCEDURE;
Enables (paused or stopped) decomposing and returns. Decompose.Handle's are placed in QueueObject.printObjectHandle.
Stop: PROCEDURE [status: PrintQueue.ObjectStatus,
canceledWhileDecomposing: CancelProc ← NIL];
Disables decomposing and returns; document in progress is given the status specified and put on the appropriate queue. If the document is put on the aborted queue, the cancel proc is called.
Stopped: PROCEDURE [wither: WaitChoice ← dontWait] RETURNS [BOOLEAN];
IF wither=wait, returns TRUE when decomposition is stopped.
IF wither=dontWait, return immediately.
FreeDecomposeObject: PROCEDURE [id: System.UniversalID];
Free the decompose object associated with the document identified by id.
UnloadOldFonts: PROCEDURE []; -- call before deleting fonts
NoticeNewFonts: PROCEDURE []; -- call after loading/deleting fonts
These two procedures will raise DocumentInProgress if any documents are being processed when they are called.
Status: PROCEDURE RETURNS [DecomposerStatus];
SetBannerMode: PROCEDURE [enableBanner: BOOLEAN];
ModifyTraceLevel: PROCEDURE [trace: TraceLevel];
END. -- of DecomposerControl
LOG
March 17, 1981 11:21 AM by J.Beeley: Created file to replace DecomposerControlDefs of February 6, 1981.
May 28, 1981 4:51 PM by JB. Imported PSExec.TraceLevel; added testPatternFromQ & testPatternDoneQ to Init.
June 19, 1981 5:13 PM by JB. Added ModifyTraceLevel.
July 8, 1981 9:17 PM by JB. Defined TraceLevel locally.
August 17, 1981 2:55 PM by JB. Added NoticeNewFonts and FreeDecomposeObject.
12-Mar-82 16:11:27 by JB: Added UnloadOldFonts.
29-Mar-82 15:53:55 by JB: Added SetPaperSize
8-Sep-82 17:12:43 - JB: Added fontSpacePages to Init.
19-Oct-82 11:38:38 - JB: Added extra size to SetPaperSize.
16-Sep-83 15:30:26 - Jacks - Converted to Klamath (Pilot 11.0).
23-Nov-83 11:43:12 - JB: Removed Decompose.Handle; trimmed Init's args.
1-Dec-83 17:38:07 - Jacks - Added currentEngine and NotifyNoDefaultFont parms to Init; added CanceledWhileDecomposing parm to Stop.
16-Dec-83 16:08:58 - Jacks - Added putAsyncMsgFromKey parm to Init.
20-Dec-83 8:41:49 - Jacks - Added fontDirectory and markerProcs to Init.
26-Jan-84 22:31:40 - Jacks - Added errorThreshold and maxMediaSize to Init; added Cleanup.
23-Feb-84 14:13:59 - Jacks - Added psName parm to Init.
15-Sep-84 14:26:15 - Jacks - Generalized NotifyNoDefaultFontProc to be NotifyProc; renamed fontSpacePages parm to Init to be maxVMPages; deleted old maxVMPages parm; removed SetPaperSize proc.
16-Oct-84 11:17:10 - Jacks - Removed Pause and Cleanup procs because we have no plans to ever implement them; changed disposeQ parm to status for Stop proc.
13-Jun-85 11:42:06 - Jacks - Added copyright notice; updated to PS Euclid interfaces.
16-Jul-85 8:15:01 - Jacks - PSAsyncMsg interface change.
5-Aug-85 16:30:25 - Jacks - Changed FreeDecomposeObject parm from LONG POINTER to UniversalID; removed return value from FreeDecomposeObject.
13-Aug-85 10:05:49 - Jacks - Added DocumentInProgress error.
4-Nov-85 9:53:16 - Jacks - Added Expunge.