(*$M-*)
DEFINITION MODULE Workbench;

FROM SYSTEM IMPORT
 ADDRESS;
FROM Dos IMPORT
 FileLockPtr;
FROM Intuition IMPORT
 Gadget,GadgetFlags,GadgetFlagSet,NewWindow;
FROM Exec IMPORT
 Message,MsgPortPtr,List;

CONST
 diskMagic=0E310H;
 diskVersion=1;
 gadgetBackFill=GadgetFlagSet{gadgHBox};
 noIconPosition=MIN(LONGINT);
 
TYPE
 WBObjectType=(
  wb0,disk,drawer,tool,project,garbage,device,kick
 );
 MType=(mt0,pstd,toolExit,diskChange,timer,closeDown,ioProc);
 DiskObjectPtr=POINTER TO DiskObject;
 DrawerDataPtr=POINTER TO DrawerData;
 FreeListPtr=POINTER TO FreeList;
 WBArgPtr=POINTER TO WBArg;
 WBStartupPtr=POINTER TO WBStartup;
 WBArg=RECORD
  lock:FileLockPtr;
  name:ADDRESS
 END;
 WBArgumentsPtr=POINTER TO ARRAY [0..255] OF WBArg;
 WBStartup=RECORD
  message:Message;
  process:MsgPortPtr;
  segment:ADDRESS;
  numArgs:LONGINT;
  toolWindow:ADDRESS;
  argList:WBArgumentsPtr;
 END;
 FreeList=RECORD
  numFree:INTEGER;
  memList:List
 END;
 DiskObject=RECORD
  magic:CARDINAL;
  version:CARDINAL;
  gadget:Gadget;
  type:WBObjectType;
  defaultTool:ADDRESS;
  toolTypes:ADDRESS;
  currentX:LONGINT;
  currentY:LONGINT;
  drawerData:DrawerDataPtr;
  toolWindow:ADDRESS;
  stackSize:LONGINT
 END;
 DrawerData=RECORD
  newWindow:NewWindow;
  currentX:LONGINT;
  currentY:LONGINT;
 END;

CONST
 drawerDataFileSize=SIZE(DrawerData);

END Workbench.
