DIRECTORY CD USING [DesignRect, Design]; CDDraw: CEDAR DEFINITIONS = BEGIN CommandTable: TYPE = REF CTableRep; CTableRep: TYPE; CommType: TYPE = {none, rect, all, ref, sel, alldone, disapearforever}; Comm: TYPE = RECORD [ cmd: CommType, erase: BOOLEAN, rect: CD.DesignRect, ref: REF]; CreateCommandTable: PROC [design: CD.Design, clip: CD.DesignRect, cleanStopFlag: REF BOOLEAN] RETURNS [CommandTable]; ModifyCommandTable: PROC [design: CD.Design, ct: CommandTable, clip: CD.DesignRect]; DestroyCommandTable: PROC [ct: CommandTable]; InsertCommand: PROC [ct: CommandTable, c: Comm]; InsertCommandAll: PROC [design: CD.Design, c: Comm]; FetchCommand: PROC [ct: CommandTable] RETURNS [c: Comm]; FlushCommands: PROC [ct: CommandTable]; END. CDDraw.mesa (a Chipndale module) Copyright c 1983, 1984 by Xerox Corporation. All rights reserved. by Christian Jacobi May 3, 1983 10:40 am last edited by Christian Jacobi November 21, 1983 3:08 pm --one commandtable is executed (emptied) by max one process --but arbitrary (typically only one) processes may fill the commandtable --Do not "InsertCommand" alldone and disapearforever; they are generated implicitely --alldone: hint that temporary marks should be redrawn now --disapearforever: hint that no further commands will arrive --cleanStopFlag^ tells any drawing process to stop volunterly and to fetch the next --command. --cleanStopFlag^ must not be modified any more outside this monitor!! --until DeleteCommandTable is called --Users may request a stop by calling FlushCommands. --changes the clipping aera --no more calls of InsertCommand on ct allowed!! --draw process must disapear from itself, --when draw process dispears and contains nomore --reference of ct, it is subject for garbage collection --The cleanStopFlag is immediately set to TRUE and later --reset to FALSE when the draw --process stopped the current command, if it then fetches another --command it gets the disapearforever command. --waits till command is available or CommandTable deleted --the drawing may stop after some time only, --and NOT immediately with procedure return --The stop-mechanism must still be improved: It should allow introduction --of an in-between process which "zusammenlegt" some rects to cause --less real drawing. Ê=˜šœ"™"Jšœ Ïmœ7™BJšœ+™+Jšœ;™;—J˜šÏk ˜ Jšžœžœ˜J˜—JšÏnœžœž œ˜Jšž˜J˜šœžœžœ ˜$Jšœ;™;JšœH™HJ˜—Jšœ žœ˜J˜šœ žœ:˜HJšœT™TJšœ:™:Jšœ<™