-- JaMTypeScript.mesa
-- Last edit by Paxton, October 4, 1982 2:34 pm

DIRECTORY
  TypeScript USING [TS],
  JaMInternal USING [Frame],
  Rope USING [ROPE];
  
JaMTypeScript: DEFINITIONS = {

InitTool: PROC [viewerName: Rope.ROPE,
	frame: JaMInternal.Frame ← NIL,
	param: Rope.ROPE ← NIL,
	initFrame: BOOLEAN ← FALSE]
	RETURNS [tool: TypeScript.TS, already: BOOLEAN];
	-- create JaM typescript viewer
	-- returns true if viewer already existed for given frame

GetTypeScript: PROC [frame: JaMInternal.Frame] RETURNS [TypeScript.TS];
	-- return the ts associated with frame
	-- returns NIL if no association exists

NotifyBeforeDestroy: PROC [ts: TypeScript.TS, proc: PROC [JaMInternal.Frame]];
	-- before destroy ts, call proc with frame for ts as arg

DoButton: PROC[tool: TypeScript.TS, atom: ATOM, x,y: REAL];

DoAtom: PROC[tool: TypeScript.TS, atom: ATOM];

MouseProc: TYPE = PROC[JaMInternal.Frame,REAL,REAL];

SetMouseProc: PROC[MouseProc] RETURNS[MouseProc];

}.