File: WalnutVoiceImpl.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Contents: operations for dealing with voice in Walnut messages
Willie-Sue, March 20, 1985 12:11:22 pm PST
Swinehart, May 24, 1985 6:49:08 pm PDT
This version expects to find actual implementations on the property list of the atom $WalnutVoice, under their procedure names. The calls are forwarded to the actual implementations, if they exist.
DIRECTORY
Atom USING [ GetProp ],
Rope USING [ ROPE ],
ViewerClasses USING [ Viewer ],
WalnutVoice;
WalnutVoiceImpl: CEDAR PROGRAM
IMPORTS Atom
EXPORTS WalnutVoice = {
CheckForWalnuthatch: PUBLIC PROC RETURNS[ra: REF ANY] = {
proc: REF PROC RETURNS[ra: REF ANY] =
NARROW[Atom.GetProp[$WalnutVoice, $CheckForWalnuthatch]];
RETURN[IF proc=NIL THEN NIL ELSE proc[]];
};
AddNuthatchHandleToViewer: PUBLIC PROC[v: ViewerClasses.Viewer] = {
proc: REF PROC[v: ViewerClasses.Viewer] =
NARROW[Atom.GetProp[$WalnutVoice, $AddNuthatchHandleToViewer]];
IF proc#NIL THEN proc[v];
};
MakeInterestEntry: PUBLIC PROC[voiceID, gvID: Rope.ROPE] = {
proc: REF PROC[voiceID, gvID: Rope.ROPE] =
NARROW[Atom.GetProp[$WalnutVoice, $MakeInterestEntry]];
IF proc#NIL THEN proc[voiceID, gvID];
};
VoiceMoveTo: PUBLIC PROC[msgSetName, msgName: Rope.ROPE] = {
proc: REF PROC[msgSetName, msgName: Rope.ROPE] =
NARROW[Atom.GetProp[$WalnutVoice, $VoiceMoveTo]];
IF proc#NIL THEN proc[msgSetName, msgName];
};
RemoveInterestEntry: PUBLIC PROC[voiceID, gvID: Rope.ROPE] = {
proc: REF PROC[voiceID, gvID: Rope.ROPE] =
NARROW[Atom.GetProp[$WalnutVoice, $RemoveInterestEntry]];
IF proc#NIL THEN proc[voiceID, gvID];
};
}.
Swinehart, May 24, 1985 6:45:11 pm PDT
This version of WalnutVoiceImpl lives in Walnut and forwards calls to the real one if it's registered in.
changes to: DIRECTORY, WalnutVoiceImpl, CheckForWalnuthatch, AddNuthatchHandleToViewer, MakeInterestEntry, VoiceMoveTo, RemoveInterestEntry, }