TerminalSender.mesa
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Last tweaked by Mike Spreitzer on July 6, 1992 7:42 am PDT
Willie-s, April 22, 1992 4:04 pm PDT
TerminalSender:
CEDAR
DEFINITIONS = {
ROPE: TYPE ~ Rope.ROPE;
EventTime: TYPE ~ RemoteEventTime.EventTime;
Milliseconds: TYPE ~ INT;
KeyCode: TYPE ~ [0..255];
Sender: TYPE ~ REF SenderPrivate;
SenderPrivate: TYPE;
StartSending:
PROC
[et1: EventTime,
xlateKC: KeyCodeTranslation,
hostDescr: ROPE, --for presentation to users in messages
sourceData: REF ANY,
GetAction: GetActionProc,
initialState: ActionBodyList,
consumer: IO.STREAM,
Finish: PROC [sender: Sender, sourceData: REF ANY, consumer, pushStream: IO.STREAM] ¬ NIL, --called at the end of the sending process
Push: PROC [IO.STREAM] ¬ NIL,
pushStream: IO.STREAM ¬ NIL,
Other: PROC [Sender]]
RETURNS [Sender];
KeyCodeTranslation: TYPE ~ REF KeyCodeTranslationRep;
KeyCodeTranslationRep: TYPE ~ PACKED ARRAY KeyTypes.KeyCode OF KeyCode;
GetActionProc: TYPE ~ PROC [sourceData: REF ANY, waitMode: UserInputTypes.WaitMode, waitInterval: Milliseconds, acceptance: UserInputTypes.Acceptance] RETURNS [ActionBody];
ActionBodyList: TYPE ~ LIST OF ActionBody;
ActionBody: TYPE ~ UserInputGetActions.InputActionBody;
FromUihToDcedar: PROC [UserInput.Handle] RETURNS [KeyCodeTranslation];
StateOfIncreek: PROC [UserInput.Handle] RETURNS [ActionBodyList, RelativeTimes.TimeStamp];
UserInputGetAction: GetActionProc;
StopSending:
PROC [Sender];
Notes that the sending process should cease; this proc may return before cessation.
WithSender: PROC [Sender, PROC [IO.STREAM]];
SendTimeReply:
PROC [sr: Sender, org, mid: EventTime, descToo:
BOOL, desc: EventDesc];
Must be called from within WithSender. No stream errors caught inside.
EventDesc:
TYPE ~
RECORD [
--carefully packed for wiring
mousePosition: RemoteImagerDataTypes.MousePosition,
action: RemoteImagerDataTypes.ActionBody];
SendCutBuffer: PROC [sr: Sender, buffer: ATOM, key: CARD, data: ROPE];
Close:
PROC [Sender];
Closes consumer.
}.