(*===================================================================*)
DEFINITION MODULE SFpackage;    (* Franz Kronseder 17.12.84 *)
                                (* last modification 10.01.85 *)

FROM    SYSTEM IMPORT ADDRESS,WORD;
FROM QuickDraw IMPORT Point,Str255;
EXPORT QUALIFIED  putDlgID,getDlgID,
                  SFReply,ProcPtr,SFTypeList,
                  SFPutFile,SFPPutFile, SFGetFile,SFPGetFile,
                  putSave ,putCancel,putEject ,putDrive ,putName,
                  getOpen,getCancel,getEject,getDrive,getScroll , getNmList;

(* constants for Standard File package *)
  CONST
  putDlgID = -3999;    (*   SFPutFile dialog template ID} *)
  getDlgID = -4000;    (*   SFGetFile dialog template ID} *)

  putSave = 1;         (*   save button} *)
  putCancel = 2;       (*   cancel button} *)
  putEject = 5;        (*   eject button} *)
  putDrive = 6;        (*   drive button} *)
  putName = 7;         (*   editTExt item for file name} *)

  getOpen = 1;         (*   open button} *)
  getCancel = 3;       (*  cancel button} *)
  getEject = 5;        (*   eject button} *)
  getDrive = 6;        (*   drive button} *)
  getNmList = 7;       (*   userItem for file name list} *)
  getScroll = 8;        (*  userItem for scroll bar} *)

TYPE
  ProcPtr  = ADDRESS;   OsType   = ARRAY[0..3] OF CHAR;  (*String63 = ARRAY[0..63] OF CHAR;*)
  SFReply = RECORD
              good:    BOOLEAN;  (*   ignore command if FALSE} *)
              copy:    BOOLEAN;  (*  not used} *)
              fType:   OsType;   (*   file type or not used} *)
              vRefNum: INTEGER;  (*   volume reference number} *)
              version: INTEGER;  (*   file's version number} *)
              fName:   Str255    (* actually a String[63];    file name} *)
            END; (* SFReply *)
  SFTypeList = ARRAY[0..3] OF OsType;


PROCEDURE SFPutFile(left,top:INTEGER;
                    VAR prompt: Str255; VAR origName: Str255;
                    dlgHook: ProcPtr; VAR reply: SFReply);

PROCEDURE SFPPutFile(left,top:INTEGER;
                     VAR prompt: Str255; VAR origName: Str255;
                     dlgHook: ProcPtr; VAR reply: SFReply; dlgID: INTEGER;
                     filterProc: ProcPtr);

PROCEDURE SFGetFile(left,top:INTEGER;
                    VAR prompt: Str255;    fileFilter: ProcPtr;
                      numTypes: INTEGER; VAR typeList: SFTypeList;
                       dlgHook: ProcPtr; VAR    reply: SFReply);

PROCEDURE SFPGetFile(left,top:INTEGER;
                     VAR prompt: Str255;    fileFilter: ProcPtr;
                       numTypes: INTEGER; VAR typeList: SFTypeList;
                        dlgHook: ProcPtr; VAR    reply: SFReply;
                          dlgID: INTEGER;   filterProc: ProcPtr);
END  SFpackage.
(*======================================================================*)



