home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / m2 / CycloneModules.lha / modules / txt / AslD.def < prev    next >
Text File  |  1996-07-28  |  13KB  |  337 lines

  1. (*
  2. **    Cyclone Modula-2 Interface module:
  3. **    $VER: asl.h 38.5 (5.1.93)
  4. **    Includes Release 40.15
  5. **
  6. **    ASL library structures and constants
  7. **
  8. **    (C) Copyright 1989-1993 Commodore-Amiga Inc.
  9. **    (C) Copyright 1989-1990 Charlie Heath
  10. **    All Rights Reserved
  11. **
  12. **      Interface module by Marcel Timmermans
  13. **      (C) Copyright 1995-1996 Marcel Timmermans
  14. **      All Rights Reserved
  15. *)
  16.  
  17. (*$ Implementation- *)
  18. DEFINITION MODULE AslD;
  19.  
  20. FROM SYSTEM IMPORT ADDRESS;
  21. FROM ExecD  IMPORT Node;
  22. FROM GraphicsD IMPORT TextAttr,TTextAttr,DrawModeSet,DimensionInfo,PropertyFlagSet;
  23. FROM UtilityD IMPORT tagUser;
  24. FROM Workbench IMPORT WBArgumentsPtr;
  25.  
  26. CONST
  27.  aslName="asl.library";
  28.  aslTB=tagUser+80000H;
  29.  
  30. TYPE
  31.  StrPtr=POINTER TO ARRAY [0..511] OF CHAR;
  32.  
  33.  FileRequester=RECORD
  34.   reserved1:ADDRESS;
  35.   file:StrPtr;
  36.   dir:StrPtr;
  37.   reserved2:ADDRESS;
  38.   reserved3:SHORTCARD;
  39.   reserved4:SHORTCARD;
  40.   reserved5:ADDRESS;
  41.   leftEdge,topEdge:INTEGER;
  42.   width,height:INTEGER;
  43.   reserved6:INTEGER;
  44.   numArgs:LONGINT;
  45.   argList:WBArgumentsPtr;
  46.   userData:ADDRESS;
  47.   reserved7:ADDRESS;
  48.   reserved8:ADDRESS;
  49.   pat:StrPtr;
  50.  END;
  51.  FileRequesterPtr=POINTER TO FileRequester;
  52.  
  53. (*****************************************************************************)
  54.  
  55. CONST
  56.  
  57. (* Types of requesters known to ASL, used as arguments to AllocAslRequest() *)
  58.   fileRequest       = 0;
  59.   fontRequest       = 1;
  60.   screenModeRequest = 2;
  61.  
  62.  
  63. (************************************************************************)
  64. CONST
  65. (*
  66.  * common tag arguments
  67.  *)
  68.  
  69.  
  70. (* Window control *)
  71.   window         = aslTB+2;   (* Parent window                    *)
  72.   screen         = aslTB+40;  (* Screen to open on if no window   *)
  73.   pubScreenName  = aslTB+41;  (* Name of public screen            *)
  74.   privateIDCMP   = aslTB+42;  (* Allocate private IDCMP?          *)
  75.   intuiMsgFunc   = aslTB+70;  (* Function to handle IntuiMessages *)
  76.   sleepWindow    = aslTB+43;  (* Block input in ASLFO_WindoU?     *)
  77.   userData       = aslTB+52;  (* What to put in fo_UserData       *)
  78.  
  79. (* Text display *)
  80.   textAttr       = aslTB+51;  (* Text font to use for gadget text *)
  81.   locale         = aslTB+50;  (* Locale ASL should use for text   *)
  82.   titleText      = aslTB+1;   (* Title of requester               *)
  83.   positiveText   = aslTB+18;  (* Positive gadget text             *)
  84.   negativeText   = aslTB+19;  (* Negative gadget text             *)
  85.  
  86. (* Initial settings *)
  87.   initialLeftEdge = aslTB+3;   (* Initial requester coordinates    *)
  88.   initialTopEdge  = aslTB+4;
  89.   initialWidth    = aslTB+5;   (* Initial requester dimensions     *)
  90.   initialHeight   = aslTB+6;
  91.   initialFile     = aslTB+8;     (* Initial contents of File gadget  *)
  92.   initialDrawer   = aslTB+9;     (* Initial contents of Drawer gadg. *)
  93.   initialPattern  = aslTB+10;  (* Initial contents of Pattern gadg.*)
  94.  
  95. (* Options *)
  96.   flags1            = aslTB+20;  (* Option flags             *)
  97.   flags2            = aslTB+22;  (* Additional option flags         *)
  98.   doSaveMode      = aslTB+44;  (* Being used for saving?         *)
  99.   doMultiSelect   = aslTB+45;  (* Do multi-select?             *)
  100.   doPatterns      = aslTB+46;  (* Display a Pattern gadget?         *)
  101.  
  102. (* Filtering *)
  103.   drawersOnly     = aslTB+47;  (* Don't display files?         *)
  104.   filterFunc      = aslTB+49;  (* Function to filter files         *) 
  105.   rejectIcons     = aslTB+60;  (* Display .info files?         *)
  106.   rejectPattern   = aslTB+61;  (* Don't display files matching pat *)
  107.   acceptPattern   = aslTB+62;  (* Accept only files matching pat   *)
  108.   filterDrawers   = aslTB+63;  (* Also filter drawers with patterns*)
  109.   hookFunc          = aslTB+7;  (* Combined callback function         *)
  110.  
  111. (* Flag bits for the ASLFR_Flags1 tag *)
  112.   frbFilterFunc    = 7;
  113.   frbIntuiFunc     = 6;
  114.   frbDoSaveMode    = 5;
  115.   frbPrivateIDCMP  = 4;
  116.   frbDoMultiSelect = 3;
  117.   frbDoPatterns    = 0;
  118.  
  119. (* Flag bits for the ASLFR_Flags2 tag *)
  120.   frbDrawersOnly   = 0; (* Do not want a file gadget, no files shown      *)
  121.   frbFilterDrawers = 1; (* filter drawers by matching pattern             *)
  122.   frbRejectIcons   = 2;
  123.  
  124. (*****************************************************************************
  125.  *
  126.  * ASL Font Requester data structures and constants
  127.  *
  128.  * This structure must only be allocated by asl.library amd is READ-ONLY!
  129.  * Control of the various fields is provided via tags when the requester
  130.  * is created with AllocAslRequest() and when it is displayed via
  131.  * AslRequest()
  132.  *)
  133. TYPE
  134.  FontRequester=RECORD
  135.   reserved0:ARRAY [0..1] OF ADDRESS;
  136.   attr:TextAttr;        (* Returned TextAttr                *)
  137.   frontPen:SHORTCARD;   (* Returned front pen               *)
  138.   backPen:SHORTCARD;    (* Returned back pen                *)
  139.   drawMode:DrawModeSet; (* Returned drawing mode            *)  
  140.   reserved1:SHORTCARD;   
  141.   userData:ADDRESS;     (* You can store your own data here *)
  142.   leftEdge:INTEGER;     (* Coordinates of requester on exit *)
  143.   topEdge:INTEGER; 
  144.   width:INTEGER;   
  145.   height:INTEGER;  
  146.   tAttr:TTextAttr;      (* Returned TTextAttr               *)
  147.  END;
  148.  FontRequesterPtr=POINTER TO FontRequester;
  149.  
  150. CONST
  151. (* Font requester tag values, used by AllocAslRequest() and AslRequest() *)
  152.  
  153. (* Window control *)
  154.   (* see common tags above *)
  155.  
  156. (* Text display *)
  157.   (* see common tags above *)
  158.  
  159. (* Initial settings *)
  160.   (* see common tags above *)
  161.   initialName     = aslTB+10;  (* Initial contents of Name gadget  *)
  162.   initialSize     = aslTB+11;  (* Initial contents of Size gadget  *)
  163.   initialStyle    = aslTB+12;  (* Initial font style               *)
  164.   initialFlags    = aslTB+13;  (* Initial font flags for TextAttr  *)
  165.   initialFrontPen = aslTB+14;  (* Initial front pen                *)
  166.   initialBackPen  = aslTB+15;  (* Initial back pen                 *)
  167.   initialDrawMode = aslTB+59;  (* Initial draw mode                *)
  168.  
  169. (* Options *)
  170.   flags          = aslTB+20;  (* Option flags                     *)
  171.   doFrontPen     = aslTB+44;  (* Display Front color selector?    *)
  172.   doBackPen      = aslTB+45;  (* Display Back color selector?     *)
  173.   doStyle        = aslTB+46;  (* Display Style checkboxes?        *)
  174.   doDrawMode     = aslTB+47;  (* Display DrawMode cycle gadget?   *)
  175.  
  176. (* Filtering *)
  177.   fixedWidthOnly = aslTB+48;  (* Only allow fixed-width fonts?    *)
  178.   minHeight      = aslTB+16;  (* Minimum font height to display   *)
  179.   maxHeight      = aslTB+17;  (* Maximum font height to display   *)
  180.  
  181. (* Custom additions *)
  182.   modeList       = aslTB+21;  (* Substitute list for drawmodes    *)
  183.  
  184.  
  185. (* Flag bits for ASLFO_Flags tag *)
  186.   foDoFrontPen     = 0;
  187.   foDoBackPen      = 1;
  188.   foDoStyle        = 2;
  189.   foDoDrawMode     = 3;
  190.   foFixedWidthOnly = 4;
  191.   foPrivateIDCMP   = 5;
  192.   foIntuiFunc      = 6;
  193.   foFilterFunc     = 7;
  194.  
  195. TYPE
  196. (*****************************************************************************
  197.  *
  198.  * ASL Screen Mode Requester data structures and constants
  199.  *
  200.  * This structure must only be allocated by asl.library and is READ-ONLY!
  201.  * Control of the various fields is provided via tags when the requester
  202.  * is created with AllocAslRequest() and when it is displayed via
  203.  * AslRequest()
  204.  *)
  205.  
  206.  ScreenModeRequester=RECORD 
  207.   displayID:LONGCARD;         (* Display mode ID                  *)  
  208.   displayWidth:LONGCARD;      (* Width of display in pixels       *)
  209.   displayHeight:LONGCARD;     (* Height of display in pixels      *)
  210.   displayDepth:CARDINAL;      (* Number of bit-planes of display  *)
  211.   overscanType:CARDINAL;      (* Type of overscan of display      *)
  212.   autoScroll:INTEGER;         (* Display should auto-scroll?      *)
  213.   bitMapWidth:LONGCARD;       (* Used to create your own BitMap   *)
  214.   bitMapHeight:LONGCARD;      
  215.   leftEdge:INTEGER;           (* Coordinates of requester on exit *)
  216.   topEdge:INTEGER;          
  217.   width:INTEGER;            
  218.   height:INTEGER;             
  219.   infoOpened:INTEGER;         (* Info window opened on exit?      *)  
  220.   infoLeftEdge:INTEGER;       (* Last coordinates of Info window  *)  
  221.   infoTopEdge:INTEGER;      
  222.   infoWidth:INTEGER;        
  223.   infoHeight:INTEGER;         
  224.   userData:ADDRESS;           (* You can store your own data here *)
  225.  END;
  226.  ScreenModeRequesterPtr=POINTER TO ScreenModeRequester;
  227.  
  228. (* An Exec list of custom modes can be added to the list of available modes.
  229.  * The DimensionInfo structure must be completely initialized, including the
  230.  * Header. See <graphics/displayinfo.h>. Custom mode ID's must be in the range
  231.  * 0xFFFF0000..0xFFFFFFFF. Regular properties which apply to your custom modes
  232.  * can be added in the dn_PropertyFlags field. Custom properties are not
  233.  * allowed.
  234.  *)
  235.  
  236.  DisplayMode=RECORD
  237.   node:Node;
  238.   dimensionInfo:DimensionInfo;    (* mode description      *)
  239.   propertyFlags:PropertyFlagSet;  (* applicable properties *)
  240.  END;
  241.  DisplayModePtr=POINTER TO DisplayMode;
  242.  
  243. CONST
  244. CONST
  245. (* ScreenMode requester tag values, used by AllocAslRequest() and AslRequest() *)
  246.  
  247. (* Window control *)
  248.   (* see common tags above *)
  249.  
  250. (* Text display *)
  251.   (* see common tags above *)
  252.  
  253. (* Initial settings *)
  254.   (* see common tags above *)
  255.   initialDisplayID    = aslTB+100; (* Initial display mode id     *)
  256.   initialDisplayWidth = aslTB+101; (* Initial display width       *)
  257.   initialDisplayHeight= aslTB+102; (* Initial display height      *)
  258.   initialDisplayDepth = aslTB+103; (* Initial display depth       *)
  259.   initialOverscanType = aslTB+104; (* Initial type of overscan    *)
  260.   initialAutoScroll   = aslTB+105; (* Initial autoscroll setting  *)
  261.   initialInfoOpened   = aslTB+106; (* Info wndw initially opened? *)
  262.   initialInfoLeftEdge = aslTB+107; (* Initial Info window coords. *)
  263.   initialInfoTopEdge  = aslTB+108;
  264.  
  265. (* Initial settings *)
  266.   doWidth        = aslTB+109;  (* Display Width gadget?           *)
  267.   doHeight       = aslTB+110;  (* Display Height gadget?          *)
  268.   doDepth        = aslTB+111;  (* Display Depth gadget?           *)
  269.   doOverscanType = aslTB+112;  (* Display Overscan Type gadget?   *)
  270.   doAutoScroll   = aslTB+113;  (* Display AutoScroll gadget?      *)
  271.  
  272. (* Filtering *)
  273.   smPropertyFlags= aslTB+114;  (* Must have these Property flags  *)
  274.   smPropertyMask = aslTB+115;  (* Only these should be looked at  *)
  275.   smMinWidth     = aslTB+116;  (* Minimum display width to allow  *)
  276.   smMaxWidth     = aslTB+117;  (* Maximum display width to allow  *)
  277.   smMinHeight    = aslTB+118;  (* Minimum display height to allow *)
  278.   smMaxHeight    = aslTB+119;  (* Maximum display height to allow *)
  279.   smMinDepth     = aslTB+120;  (* Minimum display depth           *)
  280.   smMaxDepth     = aslTB+121;  (* Maximum display depth           *)
  281.   smFilterFunc   = aslTB+122;  (* Function to filter mode id's    *)
  282.  
  283. (* Custom additions *)
  284.   customSMList   = aslTB+123;  (* Exec list of struct DisplayMode *)
  285.  
  286. (***********************************************************************
  287.  *
  288.  * Obsolete ASL definitions, here for source code compatibility only.
  289.  * Please do NOT use in new code.
  290.  *
  291.  *)
  292.   fonFrontColor = 0;
  293.   fonBackColor  = 1;
  294.   fonStyles     = 2;
  295.   fonDrawMode   = 3;
  296.   fonFixedWidth = 4;
  297.   fonNewIDCMP   = 5;
  298.   fonDoMsgFunc  = 6;
  299.   fonDoWildFunc = 7;
  300.  
  301.   doWildFunc   = frbFilterFunc;
  302.   doMsgFunc    = frbIntuiFunc;
  303.   save         = frbDoSaveMode;
  304.   newIDCMP     = frbPrivateIDCMP;
  305.   multiSelect  = frbDoMultiSelect;
  306.   patGad       = frbDoPatterns;
  307.   noFiles      = frbDrawersOnly;
  308.  
  309.   aslDummy      = aslTB;
  310.  
  311.   hail        = aslDummy+1;    (* Hailing text follows              *)
  312.   leftEdge    = aslDummy+3;    (* Initialize LeftEdge               *)
  313.   topEdge     = aslDummy+4;    (* Initialize TopEdge                *)
  314.   width       = aslDummy+5;
  315.   height      = aslDummy+6;
  316.  
  317. (* Tags specific to file request                                             *)
  318.   file        = aslDummy+8;    (* Initial name of file follows      *)
  319.   dir         = aslDummy+9;    (* Initial string of filerequest dir *)
  320.  
  321. (* Tags specific to font request                                             *)
  322.   fontName    = aslDummy+10;   (* Initial font name                 *)
  323.   fontHeight  = aslDummy+11;   (* Initial font height               *)
  324.   fontStyles  = aslDummy+12;   (* Initial font styles               *)
  325.   fontFlags   = aslDummy+13;   (* Initial font flags for textattr   *)
  326.   frontPen    = aslDummy+14;   (* Initial frontpen color            *)
  327.   backPen     = aslDummy+15;   (* Initial backpen color             *)
  328.  
  329.   okText      = aslDummy+18;   (* Text displayed in OK gadget       *)
  330.   cancelText  = aslDummy+19;   (* Text displayed in CANCEL gadget   *)
  331.   funcFlags   = aslDummy+20;   (* Function flags, depend on request *)
  332.  
  333.   extFlags1   = aslDummy+22;   (* For passing extended FIL1F flags   *)
  334.   pattern     = fontName;      (* File requester pattern string     *)
  335.  
  336. END AslD.
  337.