-- Gf.mesa  last edit, Bruce  September 4, 1980  4:25 PM

DIRECTORY
  DebugFormat USING [CodeObject],
  Frames USING [CheckGF, DisplayGF, DisplayLocalsGF, DisplayParametersGF, DisplayResultsGF, GetMainBody, ValidateGF],
  MachineDefs USING [ControlLink, FHandle, FileHandle, GFHandle, GFTIndex],
  PrincOps USING [ControlLink, FrameCodeBase, ProcDesc],
  Symbols USING [HTIndex, HTNull];

Gf: DEFINITIONS IMPORTS Frames =
  BEGIN OPEN Frames;

  Handle: TYPE = MachineDefs.GFHandle;

  Enumerate: PROCEDURE [proc: PROCEDURE [Handle] RETURNS [BOOLEAN]]
    RETURNS [gf: Handle];
  Validate: PROCEDURE [gf: Handle] RETURNS [BOOLEAN] =
    INLINE {RETURN[ValidateGF[gf]]};
  Check: PROCEDURE [gf: Handle] = INLINE {CheckGF[gf]};

  Name: PROCEDURE [name: STRING, gf: Handle ← NIL];
  Frame: PROCEDURE [name: STRING ← NIL] RETURNS [f: Handle];
  FrameHti: PROCEDURE [hti: Symbols.HTIndex ← Symbols.HTNull]
    RETURNS [f: Handle];

  CodeBase: PROCEDURE [Handle] RETURNS [PrincOps.FrameCodeBase];
  CheckStarted: PROCEDURE [Handle] RETURNS [BOOLEAN];
  Started: PROCEDURE [Handle] RETURNS [BOOLEAN];
  Shared: PROCEDURE [Handle] RETURNS [BOOLEAN];
  Copied: PROCEDURE [Handle] RETURNS [BOOLEAN];
  Original: PROCEDURE [new: Handle] RETURNS [old: Handle];
  SameModule: PROCEDURE [gf1, gf2: Handle] RETURNS [BOOLEAN];
  Deleted: PROCEDURE [MachineDefs.GFTIndex] RETURNS [BOOLEAN];
  MainBody: PROC [gf: Handle] RETURNS [MachineDefs.FHandle] =
    INLINE {RETURN[GetMainBody[gf]]};
  Links: PROCEDURE [Handle] RETURNS [BOOLEAN];

  NewLink: PROC [MachineDefs.ControlLink] RETURNS [PrincOps.ControlLink];
  OldLink: PROC [PrincOps.ControlLink] RETURNS [MachineDefs.ControlLink];
  GFI: PROCEDURE [Handle] RETURNS [MachineDefs.GFTIndex];
  FrameGfi: PROCEDURE [MachineDefs.GFTIndex] RETURNS [Handle];
  AddGfi: PROCEDURE [gf: Handle, cl: PrincOps.ControlLink]
    RETURNS [pd: PrincOps.ProcDesc];
  MakeDesc: PROCEDURE [gf: Handle, ep: CARDINAL]
    RETURNS [pd: PrincOps.ProcDesc];

  Display: PROCEDURE [gf: Handle, delim: STRING] =
    INLINE {DisplayGF[gf,delim]};
  DisplayInMsg: PROCEDURE [gf: Handle, delim: STRING];
  DisplayGFTEntry: PROC [MachineDefs.GFTIndex];
  DisplayGFT: PROCEDURE;
  DisplayLocals: PROCEDURE [gf: Handle] =
    INLINE {Frames.DisplayLocalsGF[gf]};
  DisplayParameters: PROCEDURE [gf: Handle] =
    INLINE {Frames.DisplayParametersGF[gf]};
  DisplayResults: PROCEDURE [gf: Handle] =
    INLINE {Frames.DisplayResultsGF[gf]};

  CopiedFrame: SIGNAL [name: STRING];

  -- these are really Drum related, but used GFHandles
  Code: PROCEDURE [Handle] RETURNS [DebugFormat.CodeObject];
  File: PROCEDURE [gf: Handle] RETURNS [MachineDefs.FileHandle];

  END.