home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / libs / reqtools.lha / ReqTools / Glue / Oberon / ReqTools.mod < prev    next >
Encoding:
Text File  |  1992-06-29  |  23.3 KB  |  651 lines

  1. (* ------------------------------------------------------------------------
  2.   :Program.       ReqTools
  3.   :Contents.      Interface to Nico Franτois' reqtools.library
  4.   :Author.        Kai Bolay [kai] (C-Version by Nico Franτois)
  5.   :Address.       Hoffmannstra▀e 168
  6.   :Address.       D-7250 Leonberg 1 (Germany)
  7.   :Address.       UUCP: ...!cbmvax!cbmehq!cbmger!depot1!amokle!kai
  8.   :Address.       FIDO: 2:247/706.3
  9.   :History.       v1.0  [kai] 22-Nov-91 (translated from C)
  10.   :History.       v2.0  [kai] 31-Jan-92 (fixed bug in ReqToolsBase)
  11.   :History.       v2.0n [Nico] 7-Mar-92 (comment added about ta.name bug)
  12.   :History.       v2.0  [kai] 14-May-92 (updated for V38)
  13.   :History.       v2.0n [Nico] 3-Jun-92 (cleanup, added V38 functions)
  14.   :Copyright.     Freeware
  15.   :Language.      Oberon
  16.   :Translator.    AMIGA OBERON v2.25e, A+L AG
  17.   :Remark.        Thanks to Nico for his great library
  18.   :Remark.        Thanks to Christian Stiens for finding a bug
  19.   :Bugs.          ReqTools/Arq should support each other
  20.   :Bugs.          Font-Hook: ta.name can contain odd pointer :-(
  21.                   <odd Pointer is fault of AvailFonts function> - Nico
  22. ------------------------------------------------------------------------ *)
  23.  
  24. (*
  25. **  Filename: reqtools.mod
  26. **  Release: 2.0
  27. **
  28. **  Oberon interface.
  29. **
  30. **  (C) Copyright 1991/1992 Nico Franτois
  31. **  All Rights Reserved
  32. *)
  33.  
  34. MODULE ReqTools;
  35.  
  36. IMPORT
  37.   e: Exec, d: Dos, I: Intuition, g: Graphics, u: Utility;
  38.  
  39. CONST
  40.   ReqToolsName* = "reqtools.library";
  41.   ReqToolsVersion* = 38;
  42.  
  43. TYPE
  44.   ReqToolsBasePtr* = UNTRACED POINTER TO ReqToolsBase;
  45.   ReqToolsBase* = STRUCT (libNode*: e.Library)
  46.     flags-: SHORTSET;
  47.     pad0, pad1, pad2: SHORTINT;
  48.     segList-: e.BPTR;
  49.     (* The following library bases may be read and used by your program *)
  50.     intuitionBase-: I.IntuitionBasePtr;
  51.     gfxBase-: g.GfxBasePtr;
  52.     dosBase-: d.DosLibraryPtr;
  53.     (* Next two library bases are only (and always) valid on Kickstart 2.0!
  54.        (1.3 version of reqtools also initializes these when run on 2.0) *)
  55.     gadToolsBase-: e.LibraryPtr;
  56.     utilityBase-: e.LibraryPtr;
  57.   END;
  58.  
  59. CONST
  60.   (* types of requesters, for AllocRequestA() *)
  61.   TypeFileReq*       = 0;
  62.   TypeReqInfo*       = 1;
  63.   TypeFontReq*       = 2;
  64.   TypeScreenModeReq* = 3;
  65.  
  66. TYPE
  67.   ReqToolsReqPtr * = UNTRACED POINTER TO ReqToolsReq;
  68.   ReqToolsReq * = STRUCT END; (* make them compatible.. *)
  69.  
  70.  
  71. (***********************
  72. *                      *
  73. *    File requester    *
  74. *                      *
  75. ***********************)
  76.  
  77. (* structure _MUST_ be allocated with AllocRequest() *)
  78.  
  79. TYPE
  80.   FileRequesterPtr* = UNTRACED POINTER TO FileRequester;
  81.   FileRequester* = STRUCT (dummy: ReqToolsReq)
  82.     reqPos*: LONGINT;
  83.     leftOffset*: INTEGER;
  84.     topOffset*: INTEGER;
  85.     flags*: LONGSET;
  86.     (* OBSOLETE IN V38! DON'T USE! *) hook*: u.HookPtr;
  87.     dir-: e.STRPTR;              (* READ ONLY! Change with ChangeReqAttrA()! *)
  88.     matchPat-: e.STRPTR;         (* READ ONLY! Change with ChangeReqAttrA()! *)
  89.     defaultFont*: g.TextFontPtr;
  90.     waitPointer*: e.ADDRESS;
  91.     (* V38 *)
  92.     lockWindow*: LONGINT;
  93.     shareIDCMP*: LONGINT;
  94.     intuiMsgFunc*: u.HookPtr;
  95.     reserved1*: INTEGER;
  96.     reserved2*: INTEGER;
  97.     reserved3*: INTEGER;
  98.     reqHeight-: INTEGER;         (* READ ONLY!  Use RTFI_Height tag! *)
  99.     (* Private data follows! HANDS OFF :-) *)
  100.   END;
  101.  
  102. (* returned by FileRequestA() if multiselect is enabled,
  103.    free list with FreeFileList() *)
  104.  
  105.   FileListPtr* = UNTRACED POINTER TO FileList;
  106.   FileList* = STRUCT
  107.     next*: FileListPtr;
  108.     strLen*: LONGINT;  (* -1 for directories *)
  109.     name*: e.STRPTR;
  110.   END;
  111.  
  112. (* structure passed to RTFI_FilterFunc callback hook by
  113.    volume requester (see RTFI_VolumeRequest tag) *)
  114.  
  115.   VolumeEntryPtr* = UNTRACED POINTER TO VolumeEntry;
  116.   VolumeEntry* = STRUCT
  117.     type*: LONGINT;    (* DLT_DEVICE or DLT_DIRECTORY *)
  118.     name*: e.STRPTR;
  119.   END;
  120.  
  121. (***********************
  122. *                      *
  123. *    Font requester    *
  124. *                      *
  125. ***********************)
  126.  
  127. (* structure _MUST_ be allocated with AllocRequest() *)
  128.  
  129.   FontRequesterPtr* = UNTRACED POINTER TO FontRequester;
  130.   FontRequester* = STRUCT (dummy: ReqToolsReq)
  131.     reqPos*: LONGINT;
  132.     leftOffset*: INTEGER;
  133.     topOffset*: INTEGER;
  134.     flags*: LONGSET;
  135.     (* OBSOLETE IN V38! DON'T USE! *) hook*: u.HookPtr;
  136.     attr-: g.TextAttr;           (* READ ONLY! *)
  137.     defaultFont*: g.TextFontPtr;
  138.     waitPointer*: e.ADDRESS;
  139.     (* V38 *)
  140.     lockWindow*: LONGINT;
  141.     shareIDCMP*: LONGINT;
  142.     intuiMsgFunc*: u.HookPtr;
  143.     reserved1*: INTEGER;
  144.     reserved2*: INTEGER;
  145.     reserved3*: INTEGER;
  146.     reqHeight-: INTEGER;         (* READ ONLY!  Use RTFI_Height tag! *)
  147.     (* Private data follows! HANDS OFF :-) *)
  148.   END;
  149.  
  150.  
  151. (*************************
  152. *                        *
  153. *  ScreenMode requester  *
  154. *                        *
  155. *************************)
  156.  
  157. (* structure _MUST_ be allocated with rtAllocRequest() *)
  158.  
  159.   ScreenModeRequesterPtr = UNTRACED POINTER TO ScreenModeRequester;
  160.   ScreenModeRequester = STRUCT (dummy: ReqToolsReq)
  161.     reqPos*: LONGINT;
  162.     leftOffset*: INTEGER;
  163.     topOffset*: INTEGER;
  164.     flags*: LONGSET;
  165.     private1*: LONGINT;
  166.     displayID-: LONGINT;         (* READ ONLY! *)
  167.     displayWidth-: INTEGER;      (* READ ONLY! *)
  168.     displayHeight-: INTEGER;     (* READ ONLY! *)
  169.     defaultFont*: g.TextFontPtr;
  170.     waitPointer*: e.ADDRESS;
  171.     lockWindow*: LONGINT;
  172.     shareIDCMP*: LONGINT;
  173.     intuiMsgFunc*: u.HookPtr;
  174.     reserved1*: INTEGER;
  175.     reserved2*: INTEGER;
  176.     reserved3*: INTEGER;
  177.     reqHeight-: INTEGER;         (* READ ONLY!  Use RTFI_Height tag! *)
  178.     displayDepth*: INTEGER;
  179.     overscanType*: INTEGER;
  180.     autoScroll*: LONGINT;
  181.     (* Private data follows! HANDS OFF :-) *)
  182.   END;
  183.  
  184. (***********************
  185. *                      *
  186. *    Requester Info    *
  187. *                      *
  188. ***********************)
  189.  
  190.   (* for EZRequestA(), GetLongA(), GetStringA() and PaletteRequestA(),
  191.    _MUST_ be allocated with AllocRequest() *)
  192.  
  193.   ReqInfoPtr* = UNTRACED POINTER TO ReqInfo;
  194.   ReqInfo* = STRUCT (dummy: ReqToolsReq)
  195.     reqPos*: LONGINT;
  196.     leftOffset*: INTEGER;
  197.     topOffset*: INTEGER;
  198.     width*: LONGINT;             (* not for EZRequestA() *)
  199.     reqTitle*: e.STRPTR;         (* currently only for EZRequestA() *)
  200.     flags*: LONGSET;
  201.     defaultFont*: g.TextFontPtr; (* currently only for PaletteRequestA() *)
  202.     waitPointer*: e.ADDRESS;
  203.     (* V38 *)
  204.     lockWindow: LONGINT;
  205.     shareIDCMP: LONGINT;
  206.     intuiMsgFunc: u.HookPtr;
  207.     (* structure may be extended in future *)
  208.   END;
  209.  
  210. (***********************
  211. *                      *
  212. *     Handler Info     *
  213. *                      *
  214. ***********************)
  215.  
  216. (* for ReqHandlerA(), will be allocated for you when you use
  217.    the ReqHandler tag, never try to allocate this yourself! *)
  218.  
  219.   HandlerInfoPtr* = UNTRACED POINTER TO HandlerInfo;
  220.   HandlerInfo* = STRUCT
  221.     private1: LONGINT;
  222.     waitMask*: LONGSET;
  223.     doNotWait*: I.LONGBOOL; (* ? *)
  224.     (* Private data follows, HANDS OFF :-) *)
  225.   END;
  226.  
  227. (* possible return codes from ReqHandlerA() *)
  228. CONST
  229.   CallHandler* = 080000000H;
  230.  
  231.  
  232. (*************************************
  233. *                                    *
  234. *                TAGS                *
  235. *                                    *
  236. *************************************)
  237.  
  238.   TagBase* = u.user;
  239.  
  240.   (*** tags understood by most requester functions ***)
  241.   (* optional pointer to window *)
  242.   Window* = TagBase+1;
  243.   (* idcmp flags requester should abort on (useful for IDCMP_DISKINSERTED) *)
  244.   IDCMPFlags* = TagBase+2;
  245.   (* position of requester window (see below) - default REQPOS_POINTER *)
  246.   ReqPos* = TagBase+3;
  247.   (* signal mask to wait for abort signal *)
  248.   LeftOffset* = TagBase+4;
  249.   (* topedge offset of requester relative to position specified by ReqPos *)
  250.   TopOffset* = TagBase+5;
  251.   (* name of public screen to put requester on (Kickstart 2.0 only!) *)
  252.   PubScrName* = TagBase+6;
  253.   (* address of screen to put requester on *)
  254.   Screen* = TagBase+7;
  255.   (* tagdata must hold the address of (!) an APTR variable *)
  256.   DoReqHandler* = TagBase+8;
  257.   (* font to use when screen font is rejected, _MUST_ be fixed-width font!
  258.    (struct TextFont *, not struct TextAttr *!)
  259.    - default GfxBase->DefaultFont *)
  260.   DefaultFont* = TagBase+9;
  261.   (* boolean to set the standard wait pointer in window - default FALSE *)
  262.   WaitPointer* = TagBase+10;
  263.   (* (V38) char preceding keyboard shortcut characters (will be underlined) *)
  264.   Underscore* = TagBase+11;
  265.   (* (V38) share IDCMP port with window - default FALSE *)
  266.   ShareIDCMP* = TagBase+12;
  267.   (* (V38) lock window and set standard wait pointer - default FALSE *)
  268.   LockWindow* = TagBase+13;
  269.   (* (V38) boolean to make requester's screen pop to front - default TRUE *)
  270.   ScreenToFron* = TagBase+14;
  271.   (* (V38) Requester should use this font - default: screen font *)
  272.   TextAttr* = TagBase+15;
  273.   (* (V38) call this hook for every IDCMP message not for requester *)
  274.   IntuiMsgFunc* = TagBase+16;
  275.   (* (V38) Locale ReqTools should use for text *)
  276.   Locale* = TagBase+17;
  277.  
  278.   (*** tags specific to EZRequestA ***
  279.   *)
  280.   (* title of requester window - default "Request" or "Information" *)
  281.   ezReqTitle* = TagBase+20;
  282.   (* TagBase+21 reserved *)
  283.   (* various flags (see below) *)
  284.   ezFlags* = TagBase+22;
  285.   (* default response (activated by pressing RETURN) - default TRUE *)
  286.   ezDefaultResponse* = TagBase+23;
  287.  
  288. (*** tags specific to GetLongA ***
  289. *)
  290.   (* minimum allowed value - default MININT *)
  291.   glMin* = TagBase+30;
  292.   (* maximum allowed value - default MAXINT *)
  293.   glMax* = TagBase+31;
  294.   (* suggested width of requester window (in pixels) *)
  295.   glWidth* = TagBase+32;
  296.   (* boolean to show the default value - default TRUE *)
  297.   glShowDefault* = TagBase+33;
  298.   (* (V38) string with possible responses - default " _Ok |_Cancel" *)
  299.   glGadFmt * = TagBase+34;
  300.   (* (V38) optional arguments for RTGL_GadFmt *)
  301.   glGadFmtArgs* = TagBase+35;
  302.   (* (V38) invisible typing - default FALSE *)
  303.   glInvisible* = TagBase+36;
  304.   (* (V38) window backfill - default TRUE *)
  305.   glBackfill* = TagBase+37;
  306.   (* (V38) optional text above gadget *)
  307.   glTextFmt* = TagBase+38;
  308.   (* (V38) optional arguments for RTGS_TextFmt *)
  309.   glTextFmtArgs* = TagBase+39;
  310.   (* (V38) various flags (see below) *)
  311.   glFlags* = ezFlags;
  312.  
  313. (*** tags specfic to GetStringA ***
  314. *)
  315.   (* suggested width of requester window (in pixels) *)
  316.   gsWidth* = glWidth;
  317.   (* allow empty string to be accepted - default FALSE *)
  318.   gsAllowEmpty* = TagBase+80;
  319.   (* (V38) string with possible responses - default " _Ok |_Cancel" *)
  320.   gsGadFmt * = glGadFmt;
  321.   (* (V38) optional arguments for RTGS_GadFmt *)
  322.   gsGadFmtArgs* = glGadFmtArgs;
  323.   (* (V38) invisible typing - default FALSE *)
  324.   gsInvisible* = glInvisible;
  325.   (* (V38) window backfill - default TRUE *)
  326.   gsBackfill* = glBackfill*;
  327.   (* (V38) optional text above gadget *)
  328.   gsTextFmt* = glTextFmt*;
  329.   (* (V38) optional arguments for RTGS_TextFmt *)
  330.   gsTextFmtArgs* = glTextFmtArgs*;
  331.   (* (V38) various flags (see below) *)
  332.   gsFlags* = ezFlags;
  333.  
  334. (*** tags specific to FileRequestA ***
  335. *)
  336.   (* various flags (see below) *)
  337.   fiFlags* = TagBase+40;
  338.   (* suggested height of file requester *)
  339.   fiHeight* = TagBase+41;
  340.   (* replacement text for 'Ok' gadget (max 6 chars) *)
  341.   fiOkText* = TagBase+42;
  342.   (* (V38) bring up volume requester, tag data holds flags (see below) *)
  343.   fiVolumeRequest* = TagBase+43;
  344.   (* (V38) call this hook for every file in the directory *)
  345.   fiFilterFunc* = TagBase+44;
  346.   (* (V38) allow empty file to be accepted - default FALSE *)
  347.   fiAllowEmpty* = TagBase+45;
  348.  
  349. (*** tags specific to FontRequestA ***
  350. *)
  351.   (* various flags (see below) *)
  352.   foflags* = fiFlags;
  353.   (* suggested height of font requester *)
  354.   foHeight* = fiHeight;
  355.   (* replacement text for 'Ok' gadget (max 6 chars) *)
  356.   foOkText* = fiOkText;
  357.   (* suggested height of font sample display - default 24 *)
  358.   foSampleHeight= TagBase+60;
  359.   (* minimum height of font displayed *)
  360.   foMinHeight* = TagBase+61;
  361.   (* maximum height of font displayed *)
  362.   foMaxHeight* = TagBase+62;
  363.   (* [TagBase+63 to TagBase+66 used below] *)
  364.   (* (V38) call this hook for every font *)
  365.   foFilterFunc* = fiFilterFunc;
  366.  
  367.   (*** (V38) tags for rtScreenModeRequestA ***
  368. *)
  369.   (* various flags (see below) *)
  370.   scFlags* = fiFlags;
  371.   (* suggested height of screenmode requester *)
  372.   scHeight* = fiHeight;
  373.   (* replacement text for 'Ok' gadget (max 6 chars) *)
  374.   scOkText* = fiOkText;
  375.   (* property flags (see also RTSC_PropertyMask) *)
  376.   scPropertyFlags* = TagBase+90;
  377.   (* property mask - default all bits in RTSC_PropertyFlags considered *)
  378.   scPropertyMask* = TagBase+91;
  379.   (* minimum display width allowed *)
  380.   scMinWidth* = TagBase+92;
  381.   (* maximum display width allowed *)
  382.   scMaxWidth* = TagBase+93;
  383.   (* minimum display height allowed *)
  384.   scMinHeight* = TagBase+94;
  385.   (* maximum display height allowed *)
  386.   scMaxHeight* = TagBase+95;
  387.   (* minimum display depth allowed *)
  388.   scMinDepth* = TagBase+96;
  389.   (* maximum display depth allowed *)
  390.   scMaxDepth* = TagBase+97;
  391.   (* call this hook for every display mode id *)
  392.   scFilterFunc* = fiFilterFunc;
  393.  
  394. (*** tags for ChangeReqAttrA ***
  395. *)
  396.   (* file requester - set directory *)
  397.   fiDir* = TagBase+50;
  398.   (* file requester - set wildcard pattern *)
  399.   fiMatchPat* = TagBase+51;
  400.   (* file requester - add a file or directory to the buffer *)
  401.   fiAddEntry* = TagBase+52;
  402.   (* file requester - remove a file or directory from the buffer *)
  403.   fiRemoveEntry* = TagBase+53;
  404.   (* font requester - set font name of selected font *)
  405.   foFontName* = TagBase+63;
  406.   (* font requester - set font size *)
  407.   foFontHeight* = TagBase+64;
  408.   (* font requester - set font style *)
  409.   foFontStyle* = TagBase+65;
  410.   (* font requester - set font flags *)
  411.   foFontFlags* = TagBase+66;
  412.   (* (V38) screenmode requester - get display attributes from screen *)
  413.   scModeFromScreen* = TagBase+80;
  414.   (* (V38) screenmode requester - set display mode id (32-bit extended) *)
  415.   scDisplayID* = TagBase+81;
  416.   (* (V38) screenmode requester - set display width *)
  417.   scDisplayWidth* = TagBase+82;
  418.   (* (V38) screenmode requester - set display height *)
  419.   scDisplayHeight* = TagBase+83;
  420.   (* (V38) screenmode requester - set display depth *)
  421.   scDisplayDepth* = TagBase+84;
  422.   (* (V38) screenmode requester - set overscan type, 0 for regular size *)
  423.   scOverscanType* = TagBase+85;
  424.   (* (V38) screenmode requester - set autoscroll *)
  425.   scAutoScroll* = TagBase+86;
  426.  
  427. (*** tags for PaletteRequestA ***
  428. *)
  429.   (* initially selected color - default 1 *)
  430.   paColor* = TagBase+70;
  431.  
  432. (*** tags for ReqHandlerA ***
  433. *)
  434.   (* end requester by software control, set tagdata to REQ_CANCEL, REQ_OK or
  435.    in case of EZRequest to the return value *)
  436.   rhEndRequest* = TagBase+60;
  437.  
  438. (*** tags for AllocRequestA ***)
  439.   (* no tags defined yet *)
  440.  
  441.  
  442. (************
  443. * ReqPos    *
  444. ************)
  445.   ReqPosPointer* = 0;
  446.   ReqPosCenterWin* = 1;
  447.   ReqPosCenterScr* = 2;
  448.   ReqPosTopLeftWin* = 3;
  449.   ReqPosTopLeftScr* = 4;
  450.  
  451. (******************
  452. * RTRH_EndRequest *
  453. ******************)
  454.   ReqCancel* = 0;
  455.   ReqOK* = 1;
  456.  
  457. (***************************************
  458. * flags for RTFI_Flags and RTFO_Flags  *
  459. * or filereq->Flags and fontreq->Flags *
  460. ***************************************)
  461.   fReqNoBuffer* = 2;
  462.  
  463. (*****************************************
  464. * flags for RTFI_Flags or filereq->Flags *
  465. *****************************************)
  466.   fReqMultiSelect* = 0;
  467.   fReqSave* = 1;
  468.   fReqNoFiles* = 3;
  469.   fReqPatGad* = 4;
  470.   fReqSelectDirs* = 12;
  471.  
  472. (*****************************************
  473. * flags for RTFO_Flags or fontreq->Flags *
  474. *****************************************)
  475.   fReqFixedWidth* = 5;
  476.   fReqColorFonts* = 6;
  477.   fReqChangePalette* = 7;
  478.   fReqLeavePalette* = 8;
  479.   fReqScale* = 9;
  480.   fReqStyle* = 10;
  481.  
  482. (*****************************************************
  483. * (V38) flags for RTSC_Flags or screenmodereq->Flags *
  484. *****************************************************)
  485.   scReqSizeGads* = 13;
  486.   scReqDepthGad* = 14;
  487.   scReqNonStdModes* =15;
  488.   scReqGuiModes* = 16;
  489.   scReqAutoscrollGad* =18;
  490.   scReqOverscanGad* =19;
  491.  
  492. (*****************************************
  493. * flags for RTEZ_Flags or reqinfo->Flags *
  494. *****************************************)
  495.   ezReqNoReturnKey* = 0;
  496.   ezReqLamigaQual* = 1;
  497.   ezReqCenterText* = 2;
  498.  
  499. (***********************************************
  500. * (V38) flags for RTGL_Flags or reqinfo->Flags *
  501. ***********************************************)
  502.   glReqCenterText* = ezReqCenterText*;
  503.   glReqHighlightText* = 3;
  504.  
  505. (***********************************************
  506. * (V38) flags for RTGS_Flags or reqinfo->Flags *
  507. ***********************************************)
  508.   gsReqCenterText* = ezReqCenterText*;
  509.   gsReqHighlightText* = glReqHighlightText*;
  510.  
  511. (*****************************************
  512. * (V38) flags for RTFI_VolumeRequest tag *
  513. *****************************************)
  514.   vReqNoAssigns* = 0;
  515.   vReqNoDisks* = 1;
  516.   vReqAllDisks* = 2;
  517.  
  518. (*
  519.    Following things are obsolete in ReqTools V38.
  520.    Don't use them in new code!
  521. *)
  522.   fReqDoWildFunc* = 11;
  523.   ReqHookWildFile* = 0;
  524.   ReqHookWildFont* = 1;
  525.  
  526. VAR
  527.   req*: ReqToolsBasePtr;
  528.  
  529. PROCEDURE AllocRequestA* {req, -30} (type{0}: LONGINT;
  530.                                      tagList{8}: ARRAY OF u.TagItem): ReqToolsReqPtr;
  531. PROCEDURE AllocRequest* {req, -30} (type{0}: LONGINT;
  532.                                     tag1{8}..: u.Tag): ReqToolsReqPtr;
  533. PROCEDURE FreeRequest* {req, -36} (req{9}: ReqToolsReqPtr);
  534. PROCEDURE FreeReqBuffer* {req, -42} (req{9}: ReqToolsReqPtr);
  535. PROCEDURE ChangeReqAttrA* {req, -48} (req{9}: ReqToolsReqPtr;
  536.                                       tagList{8}: ARRAY OF u.TagItem);
  537. PROCEDURE ChangeReqAttr* {req, -48} (req{9}: ReqToolsReqPtr;
  538.                                      tag1{8}..: u.Tag);
  539. PROCEDURE FileRequestA* {req, -54} (fileReq{9}: FileRequesterPtr;
  540.                                     VAR fileName{10}: ARRAY OF CHAR;
  541.                                     title{11}: ARRAY OF CHAR;
  542.                                     tagList{8}: ARRAY OF u.TagItem): BOOLEAN;
  543. PROCEDURE FileRequest* {req, -54} (fileReq{9}: FileRequesterPtr;
  544.                                    VAR fileName{10}: ARRAY OF CHAR;
  545.                                    title{11}: ARRAY OF CHAR;
  546.                                    tag1{8}..: u.Tag): BOOLEAN;
  547. PROCEDURE FreeFileList* {req, -60} (fileList{8}: FileListPtr);
  548. PROCEDURE EZRequestA* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  549.                                   reqInfo{11}: ReqInfoPtr;
  550.                                   argarray{12}: e.ADDRESS;
  551.                                   tagList{8}: ARRAY OF u.TagItem): LONGINT;
  552. PROCEDURE EZRequestTags* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  553.                                      reqInfo{11}: ReqInfoPtr;
  554.                                      argarray{12}: e.ADDRESS;
  555.                                      tag1{8}..: u.Tag):LONGINT;
  556. PROCEDURE EZRequest* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  557.                                  reqInfo{11}: ReqInfoPtr;
  558.                                  tagList{8}: ARRAY OF u.TagItem;
  559.                                  argarray{12}..: LONGINT): LONGINT;
  560. (* Without result.... *)
  561. PROCEDURE vEZRequestA* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  562.                                    reqInfo{11}: ReqInfoPtr;
  563.                                    argarray{12}: e.ADDRESS;
  564.                                    tagList{8}: ARRAY OF u.TagItem);
  565. PROCEDURE vEZRequestTags* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  566.                                       reqInfo{11}: ReqInfoPtr;
  567.                                       argarray{12}: e.ADDRESS;
  568.                                       tag1{8}..: u.Tag);
  569. PROCEDURE vEZRequest* {req, -66} (bodyfmt{9}, gadfmt{10}: ARRAY OF CHAR;
  570.                                   reqInfo{11}: ReqInfoPtr;
  571.                                   tagList{8}: ARRAY OF u.TagItem;
  572.                                   argarray{12}..: LONGINT);
  573. PROCEDURE GetStringA* {req, -72} (VAR buffer{9}: ARRAY OF CHAR;
  574.                                   maxchars{0}: LONGINT;
  575.                                   title{10}: ARRAY OF CHAR;
  576.                                   reqInfo{11}: ReqInfoPtr;
  577.                                   tagList{8}: ARRAY OF u.TagItem): BOOLEAN;
  578. PROCEDURE GetString* {req, -72} (VAR buffer{9}: ARRAY OF CHAR;
  579.                                  maxchars{0}: LONGINT;
  580.                                  title{10}: ARRAY OF CHAR;
  581.                                  reqInfo{11}: ReqInfoPtr;
  582.                                  tag1{8}..: u.Tag): BOOLEAN;
  583. PROCEDURE GetLongA* {req, -78} (VAR long{9}: LONGINT; title{10}: ARRAY OF CHAR;
  584.                                 reqInfo{11}: ReqInfoPtr;
  585.                                 tagList{8}: ARRAY OF u.TagItem): BOOLEAN;
  586. PROCEDURE GetLong* {req, -78} (VAR long{9}: LONGINT; title{10}: ARRAY OF CHAR;
  587.                                reqInfo{11}: ReqInfoPtr;
  588.                                tag1{8}..: u.Tag): BOOLEAN;
  589. PROCEDURE FontRequestA* {req, -96} (fontReq{9}: FontRequesterPtr;
  590.                                     title{11}: ARRAY OF CHAR;
  591.                                     tagList{8}: ARRAY OF u.TagItem): BOOLEAN;
  592. PROCEDURE FontRequest* {req, -96} (fontReq{9}: FontRequesterPtr;
  593.                                    title{11}: ARRAY OF CHAR;
  594.                                    tag1{8}..: u.Tag):BOOLEAN;
  595. PROCEDURE PaletteRequestA* {req, -102} (title{10}: ARRAY OF CHAR;
  596.                                         reqInfo{11}: ReqInfoPtr;
  597.                                         tagList{8}: ARRAY OF u.TagItem): LONGINT;
  598. PROCEDURE PaletteRequest* {req, -102} (title{10}: ARRAY OF CHAR;
  599.                                        reqInfo{11}: ReqInfoPtr;
  600.                                        tag1{8}..: u.Tag): LONGINT;
  601. PROCEDURE ReqHandlerA* {req, -108} (hinfo{9}: HandlerInfoPtr;
  602.                                     sigs{0}: LONGSET;
  603.                                     tagList{8}: ARRAY OF u.TagItem): LONGINT;
  604. PROCEDURE ReqHandler* {req, -108} (hinfo{9}: HandlerInfoPtr;
  605.                                    sigs{0}: LONGSET;
  606.                                    tag1{8}..: u.Tag): LONGINT;
  607. PROCEDURE SetWaitPointer* {req, -114} (window{8}: I.WindowPtr);
  608. PROCEDURE GetVScreenSize* {req, -120} (screen{8}: I.ScreenPtr;
  609.                                        VAR width{9},height{10}: LONGINT);
  610. PROCEDURE SetReqPosition* {req, -126} (reqpos{0}: LONGINT;
  611.                                        VAR nw{8}: I.NewWindow;
  612.                                        screen{9}: I.ScreenPtr;
  613.                                        window{10}: I.WindowPtr);
  614. PROCEDURE Spread* {req, -132} (VAR posarray{8}: ARRAY OF LONGINT;
  615.                                sizearray{9}: ARRAY OF LONGINT;
  616.                                totalsize{0}, min{1}, max{2}, num{3}: LONGINT);
  617. PROCEDURE ScreenToFrontSafely* {req, -138} (screen{8}: I.ScreenPtr);
  618.  
  619. (*--- functions in V38 or higher (distributed as Release 2.0) ---*)
  620. PROCEDURE ScreenModeRequestA* (screenmodeReq{9}: ScreenModeRequestPtr;
  621.                                title{11}: ARRAY OF CHAR;
  622.                                tagList{8}: ARRAY OF u.TagItem): BOOLEAN;
  623. PROCEDURE ScreenModeRequest* (screenmodeReq{9}: ScreenModeRequestPtr;
  624.                               title{11}: ARRAY OF CHAR;
  625.                               tag1{8}..: u.Tag): BOOLEAN;
  626. PROCEDURE CloseWindowSafely* (window{8}: I.WindowPtr);
  627. PROCEDURE LockWindow* (window{8}: I.WindowPtr): LONGINT;
  628. PROCEDURE UnlockWindow* (window{8}: I.WindowPtr, winlock{9}: LONGINT);
  629.  
  630. PROCEDURE Assert* (c: BOOLEAN; txt: ARRAY OF CHAR);
  631. BEGIN
  632.   IF NOT c THEN
  633.     vEZRequest (txt, "Abort", NIL, NIL);
  634.     HALT (20);
  635.   END;
  636. END Assert;
  637.  
  638. BEGIN
  639.   req := e.OpenLibrary (ReqToolsName, ReqToolsVersion);
  640.   IF req = NIL THEN
  641.     IF I.DisplayAlert (I.recoveryAlert,
  642.          "\x00\x64\x14missing reqtools.library V38\o\o", 50) THEN END;
  643.     HALT (20)
  644.   END; (* IF *)
  645. CLOSE
  646.   IF req # NIL THEN
  647.     e.CloseLibrary (req);
  648.     req := NIL;
  649.   END; (* IF *)
  650. END ReqTools.
  651.