CursoryImpl.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Crow, July 8, 1986 11:53:37 am PDT
DIRECTORY
Terminal USING [ Position, SetMousePosition, Virtual],
Cursory USING [ SetMousePositionProc ];
Cursoryimpl: CEDAR MONITOR
IMPORTS Terminal
EXPORTS Cursory
~ BEGIN
mouseChangeList: LIST OF Cursory.SetMousePositionProc ← NIL;
SetMousePosition: PUBLIC PROC [vt: Terminal.Virtual, position: Terminal.Position] ~ {
FOR l: LIST OF Cursory.SetMousePositionProc ← mouseChangeList, l.rest UNTIL l = NIL DO
l.first[position]
ENDLOOP;
Terminal.SetMousePosition[vt, position];
};
CallWhenMousePositionChanges: PUBLIC PROC[proc: Cursory.SetMousePositionProc] ~ {
mouseChangeList ← CONS[ proc, mouseChangeList];
};
END.