home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / dev / oberon-a-1.4ß.lha / Oberon-A / source / amiga / ASL.mod < prev    next >
Text File  |  1994-08-08  |  18KB  |  495 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: ASL.mod $
  4.   Description: Interface to asl.library
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.2 $
  8.       $Author: fjc $
  9.         $Date: 1994/08/08 01:12:29 $
  10.  
  11.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1989-1993 Commodore-Amiga Inc.
  14.   (C) Copyright 1989-1990 Charlie Heath
  15.       All Rights Reserved
  16.  
  17.   Oberon-A interface Copyright © 1994, Frank Copeland.
  18.   This file is part of the Oberon-A Interface.
  19.   See Oberon-A.doc for conditions of use and distribution.
  20.  
  21. ***************************************************************************)
  22.  
  23. MODULE ASL;
  24.  
  25. (*
  26. ** $C- CaseChk       $I- IndexChk  $L+ LongAdr   $N- NilChk
  27. ** $P- PortableCode  $R- RangeChk  $S- StackChk  $T- TypeChk
  28. ** $V- OvflChk       $Z- ZeroVars
  29. *)
  30.  
  31. IMPORT
  32.   E := Exec, U := Utility, G := Graphics, W := Workbench, SYS := SYSTEM;
  33.  
  34. (*
  35. **      $VER: asl.h 38.5 (5.1.93)
  36. **
  37. **      ASL library structures and constants
  38. *)
  39.  
  40. (*****************************************************************************)
  41.  
  42. CONST
  43.  
  44.   name * = "asl.library";
  45.   tb *   = U.tagUser+080000H;
  46.  
  47.  
  48. (*****************************************************************************)
  49.  
  50. CONST
  51.  
  52. (* Types of requesters known to ASL, used as arguments to AllocAslRequest() *)
  53.   fileRequest * = 0;
  54.   fontRequest * = 1;
  55.   screenModeRequest * = 2;
  56.  
  57. (*
  58. ** Requester base type, for type compatibility between requester
  59. ** structures
  60. *)
  61.  
  62. TYPE
  63.  
  64.   RequesterBasePtr * = CPOINTER TO RequesterBase;
  65.   RequesterBase * = RECORD END;
  66.  
  67. (*****************************************************************************
  68.  *
  69.  * ASL File Requester data structures and constants
  70.  *
  71.  * This structure must only be allocated by asl.library amd is READ-ONLY!
  72.  * Control of the various fields is provided via tags when the requester
  73.  * is created with AllocAslRequest() and when it is displayed via
  74.  * AslRequest()
  75.  *)
  76.  
  77. TYPE
  78.  
  79.   FileRequesterPtr * = CPOINTER TO FileRequester;
  80.   FileRequester * = RECORD (RequesterBase)
  81.     reserved0 - : ARRAY 4 OF E.UBYTE;
  82.     file -      : E.STRPTR;             (* Contents of File gadget on exit    *)
  83.     drawer -    : E.STRPTR;             (* Contents of Drawer gadget on exit  *)
  84.     reserved1 - : ARRAY 10 OF E.UBYTE;
  85.     leftEdge -  : INTEGER;              (* Coordinates of requester on exit   *)
  86.     topEdge -   : INTEGER;
  87.     width -     : INTEGER;
  88.     height -    : INTEGER;
  89.     reserved2 - : ARRAY 2 OF E.UBYTE;
  90.     numArgs -   : LONGINT;              (* Number of files selected           *)
  91.     argList -   : W.WBArgPtr;           (* List of files selected     *)
  92.     userData -  : E.APTR;               (* You can store your own data here   *)
  93.     reserved3 - : ARRAY 8 OF E.UBYTE;
  94.     pattern -   : E.STRPTR;             (* Contents of Pattern gadget on exit *)
  95.   END;
  96.  
  97. CONST
  98.  
  99. (* File requester tag values, used by AllocAslRequest() and AslRequest() *)
  100.  
  101. (* Window control *)
  102.   frWindow *          = tb+2;   (* Parent window                    *)
  103.   frScreen *          = tb+40;  (* Screen to open on if no window   *)
  104.   frPubScreenName *   = tb+41;  (* Name of public screen            *)
  105.   frPrivateIDCMP *    = tb+42;  (* Allocate private IDCMP?          *)
  106.   frIntuiMsgFunc *    = tb+70;  (* Function to handle IntuiMessages *)
  107.   frSleepWindow *     = tb+43;  (* Block input in FR_Window?     *)
  108.   frUserData *        = tb+52;  (* What to put in userData       *)
  109.  
  110. (* Text display *)
  111.   frTextAttr *        = tb+51;  (* Text font to use for gadget text *)
  112.   frLocale *          = tb+50;  (* Locale  should use for text   *)
  113.   frTitleText *       = tb+1;   (* Title of requester               *)
  114.   frPositiveText *    = tb+18;  (* Positive gadget text             *)
  115.   frNegativeText *    = tb+19;  (* Negative gadget text             *)
  116.  
  117. (* Initial settings *)
  118.   frInitialLeftEdge * = tb+3;   (* Initial requester coordinates    *)
  119.   frInitialTopEdge *  = tb+4;
  120.   frInitialWidth *    = tb+5;   (* Initial requester dimensions     *)
  121.   frInitialHeight *   = tb+6;
  122.   frInitialFile *     = tb+8;   (* Initial contents of File gadget  *)
  123.   frInitialDrawer *   = tb+9;   (* Initial contents of Drawer gadg. *)
  124.   frInitialPattern *  = tb+10;  (* Initial contents of Pattern gadg.*)
  125.  
  126. (* Options *)
  127.   frFlags1 *          = tb+20;  (* Option flags                     *)
  128.   frFlags2 *          = tb+22;  (* Additional option flags          *)
  129.   frDoSaveMode *      = tb+44;  (* Being used for saving?           *)
  130.   frDoMultiSelect *   = tb+45;  (* Do multi-select?                 *)
  131.   frDoPatterns *      = tb+46;  (* Display a Pattern gadget?        *)
  132.  
  133. (* Filtering *)
  134.   frDrawersOnly *     = tb+47;  (* Don't display files?             *)
  135.   frFilterFunc *      = tb+49;  (* Function to filter files         *)
  136.   frRejectIcons *     = tb+60;  (* Display .info files?             *)
  137.   frRejectPattern *   = tb+61;  (* Don't display files matching pat *)
  138.   frAcceptPattern *   = tb+62;  (* Accept only files matching pat   *)
  139.   frFilterDrawers *   = tb+63;  (* Also filter drawers with patterns*)
  140.   frHookFunc *        = tb+7;   (* Combined callback function       *)
  141.  
  142. (* Flag bits for the frFlags1 tag *)
  143.   frbFilterFunc *      = 7;
  144.   frbIntuiFunc *       = 6;
  145.   frbDoSaveMode *      = 5;
  146.   frbPrivateIDCMP *    = 4;
  147.   frbDoMultiSelect *   = 3;
  148.   frbDoPatterns *      = 0;
  149.  
  150. (* Flag bits for the frFlags2 tag *)
  151.   frbDrawersOnly *     = 0;
  152.   frbFilterDrawers *   = 1;
  153.   frbRejectIcons *     = 2;
  154.  
  155.  
  156. (*****************************************************************************
  157.  *
  158.  * ASL Font Requester data structures and constants
  159.  *
  160.  * This structure must only be allocated by asl.library amd is READ-ONLY!
  161.  * Control of the various fields is provided via tags when the requester
  162.  * is created with AllocAslRequest() and when it is displayed via
  163.  * AslRequest()
  164.  *)
  165.  
  166. TYPE
  167.  
  168.   FontRequesterPtr * = CPOINTER TO FontRequester;
  169.   FontRequester * = RECORD (RequesterBase)
  170.     reserved0 - : ARRAY 8 OF E.UBYTE;
  171.     attr -      : G.TextAttr;           (* Returned TextAttr                *)
  172.     frontPen -  : E.UBYTE;              (* Returned front pen               *)
  173.     backPen -   : E.UBYTE;              (* Returned back pen                *)
  174.     drawMode -  : E.UBYTE;              (* Returned drawing mode            *)
  175.     reserved1 - : E.UBYTE;
  176.     userData -  : E.APTR;               (* You can store your own data here *)
  177.     leftEdge -  : INTEGER;              (* Coordinates of requester on exit *)
  178.     topEdge -   : INTEGER;
  179.     width -     : INTEGER;
  180.     height -    : INTEGER;
  181.     tAttr -     : G.TTextAttr;          (* Returned TTextAttr               *)
  182.   END;
  183.  
  184. CONST
  185.  
  186. (* Font requester tag values, used by AllocAslRequest() and AslRequest() *)
  187.  
  188. (* Window control *)
  189.   foWindow *          = tb+2;   (* Parent window                    *)
  190.   foScreen *          = tb+40;  (* Screen to open on if no window   *)
  191.   foPubScreenName *   = tb+41;  (* Name of public screen            *)
  192.   foPrivateIDCMP *    = tb+42;  (* Allocate private IDCMP?          *)
  193.   foIntuiMsgFunc *    = tb+70;  (* Function to handle IntuiMessages *)
  194.   foSleepWindow *     = tb+43;  (* Block input in FO_Window?     *)
  195.   foUserData *        = tb+52;  (* What to put in fo_UserData       *)
  196.  
  197. (* Text display *)
  198.   foTextAttr *        = tb+51;  (* Text font to use for gadget text *)
  199.   foLocale *          = tb+50;  (* Locale ASL should use for text   *)
  200.   foTitleText *       = tb+1;   (* Title of requester               *)
  201.   foPositiveText *    = tb+18;  (* Positive gadget text             *)
  202.   foNegativeText *    = tb+19;  (* Negative gadget text             *)
  203.  
  204. (* Initial settings *)
  205.   foInitialLeftEdge * = tb+3;   (* Initial requester coordinates    *)
  206.   foInitialTopEdge *  = tb+4;
  207.   foInitialWidth *    = tb+5;   (* Initial requester dimensions     *)
  208.   foInitialHeight *   = tb+6;
  209.   foInitialName *     = tb+10;  (* Initial contents of Name gadget  *)
  210.   foInitialSize *     = tb+11;  (* Initial contents of Size gadget  *)
  211.   foInitialStyle *    = tb+12;  (* Initial font style               *)
  212.   foInitialFlags *    = tb+13;  (* Initial font flags for TextAttr  *)
  213.   foInitialFrontPen * = tb+14;  (* Initial front pen                *)
  214.   foInitialBackPen *  = t