home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Modula / Source / SFPACKAGE.DEF < prev    next >
Text File  |  1985-04-25  |  3KB  |  68 lines

  1. (*===================================================================*)
  2. DEFINITION MODULE SFpackage;    (* Franz Kronseder 17.12.84 *)
  3.                                 (* last modification 10.01.85 *)
  4.  
  5. FROM    SYSTEM IMPORT ADDRESS,WORD;
  6. FROM QuickDraw IMPORT Point,Str255;
  7. EXPORT QUALIFIED  putDlgID,getDlgID,
  8.                   SFReply,ProcPtr,SFTypeList,
  9.                   SFPutFile,SFPPutFile, SFGetFile,SFPGetFile,
  10.                   putSave ,putCancel,putEject ,putDrive ,putName,
  11.                   getOpen,getCancel,getEject,getDrive,getScroll , getNmList;
  12.  
  13. (* constants for Standard File package *)
  14.   CONST
  15.   putDlgID = -3999;    (*   SFPutFile dialog template ID} *)
  16.   getDlgID = -4000;    (*   SFGetFile dialog template ID} *)
  17.  
  18.   putSave = 1;         (*   save button} *)
  19.   putCancel = 2;       (*   cancel button} *)
  20.   putEject = 5;        (*   eject button} *)
  21.   putDrive = 6;        (*   drive button} *)
  22.   putName = 7;         (*   editTExt item for file name} *)
  23.  
  24.   getOpen = 1;         (*   open button} *)
  25.   getCancel = 3;       (*  cancel button} *)
  26.   getEject = 5;        (*   eject button} *)
  27.   getDrive = 6;        (*   drive button} *)
  28.   getNmList = 7;       (*   userItem for file name list} *)
  29.   getScroll = 8;        (*  userItem for scroll bar} *)
  30.  
  31. TYPE
  32.   ProcPtr  = ADDRESS;   OsType   = ARRAY[0..3] OF CHAR;  (*String63 = ARRAY[0..63] OF CHAR;*)
  33.   SFReply = RECORD
  34.               good:    BOOLEAN;  (*   ignore command if FALSE} *)
  35.               copy:    BOOLEAN;  (*  not used} *)
  36.               fType:   OsType;   (*   file type or not used} *)
  37.               vRefNum: INTEGER;  (*   volume reference number} *)
  38.               version: INTEGER;  (*   file's version number} *)
  39.               fName:   Str255    (* actually a String[63];    file name} *)
  40.             END; (* SFReply *)
  41.   SFTypeList = ARRAY[0..3] OF OsType;
  42.  
  43.  
  44. PROCEDURE SFPutFile(left,top:INTEGER;
  45.                     VAR prompt: Str255; VAR origName: Str255;
  46.                     dlgHook: ProcPtr; VAR reply: SFReply);
  47.  
  48. PROCEDURE SFPPutFile(left,top:INTEGER;
  49.                      VAR prompt: Str255; VAR origName: Str255;
  50.                      dlgHook: ProcPtr; VAR reply: SFReply; dlgID: INTEGER;
  51.                      filterProc: ProcPtr);
  52.  
  53. PROCEDURE SFGetFile(left,top:INTEGER;
  54.                     VAR prompt: Str255;    fileFilter: ProcPtr;
  55.                       numTypes: INTEGER; VAR typeList: SFTypeList;
  56.                        dlgHook: ProcPtr; VAR    reply: SFReply);
  57.  
  58. PROCEDURE SFPGetFile(left,top:INTEGER;
  59.                      VAR prompt: Str255;    fileFilter: ProcPtr;
  60.                        numTypes: INTEGER; VAR typeList: SFTypeList;
  61.                         dlgHook: ProcPtr; VAR    reply: SFReply;
  62.                           dlgID: INTEGER;   filterProc: ProcPtr);
  63. END  SFpackage.
  64. (*======================================================================*)
  65.  
  66.  
  67.  
  68.