<Release>Rosemary.DF>> <> <> <<>> <> DIRECTORY List, Rope, OrderedSymbolTableRef, VFonts; Rosemary: CEDAR DEFINITIONS = BEGIN <> ROPE: TYPE = Rope.ROPE; AList: TYPE = List.AList; SymbolTable: TYPE = OrderedSymbolTableRef.Table; <> Warning: SIGNAL [msg: ROPE, data: REF ANY _ NIL]; Error: ERROR [msg: ROPE, data: REF ANY _ NIL]; InterfaceMismatch: ERROR [cell: Cell, index: CARDINAL, expected, got: SignalType]; Stop: SIGNAL [msg: ROPE _ NIL, data: REF ANY _ NIL]; <> <> <<>> RegisterCellClass: PROCEDURE [className: ROPE, expandProc: ExpandProc _ NIL, ioCreator: IOCreator _ NIL, initializer: Initializer _ NIL, evalProc, testProc: EvalProc _ NIL, ports: Ports, ioTemplate: REF ANY _ Unspecified]; <> <> <> <> <> <> <> <<>> <> <> <<>> <> <> ExpandProc: TYPE = PROCEDURE [thisCell: Cell, initData: REF ANY]; IOCreator: TYPE = PROC [cell: Cell, initData: REF ANY]; <<>> Initializer: TYPE = PROCEDURE [cell: Cell, initData: REF ANY, leafily: BOOLEAN]; EvalProc: TYPE = PROCEDURE [cell: Cell]; Unspecified: REF ANY; CreateTopCell: PROC [instanceName, className: ROPE, initData: REF ANY _ NIL, decider: ExpandDeciderClosure] RETURNS [cell: Cell]; <> ExpandDeciderClosure: TYPE = REF ExpandDeciderClosureRep; ExpandDeciderClosureRep: TYPE = RECORD [ Decide: ExpandDecider, otherData: REF ANY]; ExpandDecider: TYPE = PROC [cell: Cell, otherData: REF ANY] RETURNS [ExpandDecision]; ExpandDecision: TYPE = {Leaf, Inline, Nested}; Possible: PROC [cell: Cell, whatToDo: ExpandDecision] RETURNS [possible: BOOLEAN]; CreateNode: PROCEDURE [within: Cell, name: ROPE, type: SignalType _ NIL --means unspecified--] RETURNS [node: Node]; CreateCell: PROCEDURE [within: Cell, instanceName, className, interfaceNodes: ROPE, initData: REF ANY _ NIL] RETURNS [cell: Cell]; <> AddNodeWatcher: PROC [node: Node, watcher: NodeWatcher, priority: Priority _ 0]; RemoveNodeWatcher: PROC [node: Node, watcher: NodeWatcher, priority: Priority _ 0]; NodeWatcher: TYPE = RECORD [ notify: NodeNotifyProc, clientData: REF ANY _ NIL]; NodeNotifyProc: TYPE = PROC [node: Node, clientData: REF ANY]; Priority: TYPE = [0..1]; <<0 is for ordinary mortals, like breakpoints>> <<1 is for things like the display, which should be updated first>> AddCellEventWatcher: PROC [cell: Cell, event: ATOM, watcher: CellWatcher]; RemoveCellEventWatcher: PROC [cell: Cell, event: ATOM, watcher: CellWatcher]; CellWatcher: TYPE = RECORD [ notify: CellNotifyProc, clientData: REF ANY _ NIL]; CellNotifyProc: TYPE = PROC [cell: Cell, clientData: REF ANY]; <> <<$Schedule when cell comes off or goes on or moves to head of schedule>> <<$Eval after EvalProc called>> AddGlobalEventWatcher: PROC [event: ATOM, watcher: GlobalWatcher]; RemoveGlobalEventWatcher: PROC [event: ATOM, watcher: GlobalWatcher]; GlobalWatcher: TYPE = RECORD [ notify: GlobalNotifyProc, clientData: REF ANY _ NIL]; GlobalNotifyProc: TYPE = PROC [clientData: REF ANY]; <> <<$Stop End of long user-initiated activity>> <<$Start Begin of long user-initiated activity>> <> <<>> ScheduleCell: PROCEDURE [cell: Cell]; <> <> <> Run: PROCEDURE [str: Structure]; <> stop: BOOLEAN; <> SingleStep: PROCEDURE [str: Structure]; <> Eval: PROC [cell: Cell]; <> AllowToModify: PROC [cell: Cell, modifier: ModifyProc, blindly: BOOLEAN _ FALSE]; <> <> <> ModifyProc: TYPE = PROC [cell: Cell] RETURNS [subtle: BOOLEAN _ FALSE]; <> <> <> CleanUpAfterModify: PROC [cell: Cell]; <> Test: PROC [subject: Cell, parms: TestParms]; <> TestParms: TYPE = REF TestParmsRep; TestParmsRep: TYPE = RECORD [ stopBefore, stopAfter: BOOLEAN _ FALSE]; CellToStr: PROCEDURE [cell: Cell] RETURNS [str: Structure]; <> <> UpToReal: PROCEDURE [cell: Cell] RETURNS [realCell: Cell]; <> NotifyCellEvent: PROCEDURE [cell: Cell, event: ATOM]; NotifyGlobalEvent: PROCEDURE [event: ATOM]; <> <<>> Cell: TYPE = REF CellRep; CellRep: TYPE = RECORD [ name: ROPE, class: CellClass, nextInstance: Cell, parent, leftChild, rightSibling: Cell, firstInternalNode: Node, internalNodes, components: SymbolTable, interfaceNodes: NodeS, other: AList, type: CellType, expansion: ExpandDecision, realCellStuff: RealCellStuff -- non-NIL only for Real Cells ]; CellType: TYPE = {Real, Shadow}; RealCellStuff: TYPE = REF RealCellStuffRep; RealCellStuffRep: TYPE = RECORD [ schedNext: Cell, newIO, oldIO: REF ANY, newIOAsWP, oldIOAsWP: WordPtr, locked: BOOLEAN _ FALSE, initData: REF ANY _ NIL, state: REF ANY, eval: EvalProc, schedWatchers, evalWatchers: CellWatcherList _ NIL]; notInSchedule: Cell; <> CellWatcherList: TYPE = LIST OF CellWatcher; Structure: TYPE = REF StructureRep; StructureRep: TYPE = RECORD [ container, mirror: Cell, schedFirst, schedLast: Cell, locked: BOOLEAN _ FALSE, insideNodes: NodeS]; NodeS: TYPE = REF NodeSR; NodeSR: TYPE = RECORD [nodes: SEQUENCE length: CARDINAL OF Node]; CellClass: TYPE = REF CellClassRep; CellClassRep: TYPE = RECORD [ name: ROPE, expand: ExpandProc, ioCreator: IOCreator, initializer: Initializer, eval: EvalProc, test: EvalProc, ports: Ports, ioWordCount: CARDINAL, ioTemplate: REF ANY, firstInstance: Cell]; Ports: TYPE = REF PortsRep; PortsRep: TYPE = RECORD [ ports: SEQUENCE length: CARDINAL OF Port]; Port: TYPE = RECORD [ firstWord, wordCount: CARDINAL, name: ROPE, type: SignalType, input, output: BOOLEAN _ FALSE]; Node: TYPE = REF NodeRep; NodeRep: TYPE = RECORD [ name: ROPE, type: SignalType _ NIL, visible: Socket _ [NIL, LAST[CARDINAL]], unwriteability: INTEGER _ 0, readers: SocketList _ NIL, watchers: ARRAY Priority OF NodeWatcherList _ ALL[NIL], next: Node _ NIL, other: AList _ NIL]; SocketList: TYPE = LIST OF Socket; Socket: TYPE = RECORD [cell: Cell, index: CARDINAL]; NodeWatcherList: TYPE = LIST OF NodeWatcher; SignalType: TYPE = REF SignalTypeRep; SignalTypeRep: TYPE = RECORD [ toRope: ToRopeProc, fromRope: FromRopeProc, init: TypeInitProc, maxWidth: MaxWidthProc, parseTest: TestParseProc, unParseTest: TestUnParseProc, typeData: REF ANY]; ToRopeProc: TYPE = PROCEDURE [where: WordPtr, typeData: REF ANY] RETURNS [rope: ROPE]; FromRopeProc: TYPE = PROCEDURE [rope: ROPE, where: WordPtr, typeData: REF ANY] RETURNS [success: BOOLEAN]; TypeInitProc: TYPE = PROC [where: WordPtr, typeData: REF ANY]; MaxWidthProc: TYPE = PROC [typeData: REF ANY, font: VFonts.Font] RETURNS [INTEGER]; TestParseProc: TYPE = PROC [rope: ROPE, typeData: REF ANY] RETURNS [success: BOOLEAN, testProc: TestProc, testData: REF ANY _ NIL]; TestUnParseProc: TYPE = PROC [testProc: TestProc, testData: REF ANY, typeData: REF ANY, subject: ROPE] RETURNS [rope: ROPE]; TestProc: TYPE = PROC [testData: REF ANY, where: WordPtr, typeData: REF ANY] RETURNS [passes: BOOLEAN]; WordPtr: TYPE = LONG POINTER TO CARDINAL; cellClasses: SymbolTable; roots: SymbolTable; <<>> <> <<>> LongCellName: PROC [cell: Cell] RETURNS [ln: ROPE]; LookupCell: PROC [ path: LIST OF ROPE, from: Cell _ NIL --NIL means first name names root--] RETURNS [cell: Cell]; RootStructure: PROC [cell: Cell] RETURNS [str: Structure]; SocketToWP: PROC [s: Socket] RETURNS [wp: WordPtr]; GetIndex: PROC [ports: Ports, key: ROPE] RETURNS [index: CARDINAL]; notFound: CARDINAL = LAST[CARDINAL]; END.