DEFINITION MODULE AslD;(*$Implementation:=FALSE*)
(* 04-Aug-1992/bp *)

FROM SYSTEM IMPORT ADDRESS,LONGSET;

FROM ExecD IMPORT
 Node;

FROM GraphicsD IMPORT
 DimensionInfo,DrawModeSet,PropertyFlagSet,TextAttr,TTextAttr;

FROM UtilityD IMPORT
 TagItemPtr,tagUser;

FROM WorkbenchD IMPORT
 WBArgumentsPtr;


CONST
 aslName="asl.library";
 aslTB=tagUser+80000H;

 aslFileRequest=0;
 aslFontRequest=1;
 aslScreenModeRequest=2;(*38*)


(*
 * Die Tags aslHookFunk(nicht mehr benutzen!), tfrHookFunc, tfoHookFunc
 * erwarten eine Prozeduradresse. Die Prozedur muss in M2Amiga
 * deklariert werden als
 *
 * PROCEDURE FileFunction(
 *  req:FileRequesterPtr; obj:ADDRESS; mask:LONGSET):LONGINT;
 *
 * bzw.
 *
 * PROCEDURE FontFunction(
 *  req:FontRequesterPtr; obj:ADDRESS; mask:LONGSET):LONGINT;
 *
 * Wichtig ist, dass die Funktionen mit den Compileroptionen
 * (*$
 *   LoadA4:=TRUE ParDealloc:=FALSE CaseChk:=FALSE NilChk:=FALSE
 *   OverflowChk:=FALSE RangeChk:=FALSE ReturnChk:=FALSE StackChk:=FALSE
 * *)
 * übersetzt werden.
 *
 *)


TYPE

(*=============================================================*)
 StrPtr=POINTER TO ARRAY [0..511] OF CHAR;

 FileRequester=RECORD
  reserved1:ADDRESS;
  file:StrPtr;
  dir:StrPtr;
  reserved2:ADDRESS;
  reserved3:SHORTCARD;
  reserved4:SHORTCARD;
  reserved5:ADDRESS;
  leftEdge,topEdge:INTEGER;
  width,height:INTEGER;
  reserved6:INTEGER;
  numArgs:LONGINT;
  argList:WBArgumentsPtr;
  userData:ADDRESS;
  reserved7:ADDRESS;
  reserved8:ADDRESS;
  pat:StrPtr;
 END;
 FileRequesterPtr=POINTER TO FileRequester;

CONST (* t steht für TagItem, fr für FileRequester *)
 tfrWindow          =aslTB+2;
 tfrScreen          =aslTB+40;(*38*)
 tfrPubScreenName   =aslTB+41;(*38*)
 tfrPrivateIDCMP    =aslTB+42;(*38*)
 tfrIntuiMsgFunc    =aslTB+70;(*38*)
 tfrSleepWindow     =aslTB+43;(*38*)
 tfrUserData        =aslTB+52;(*38*)

 tfrTextAttr        =aslTB+51;(*38*)
 tfrLocale          =aslTB+50;(*38*)
 tfrTitleText       =aslTB+1;
 tfrPositiveText    =aslTB+18;
 tfrNegativeText    =aslTB+19;

 tfrInitialLeftEdge =aslTB+3;
 tfrInitialTopEdge  =aslTB+4;
 tfrInitialWidth    =aslTB+5;
 tfrInitialHeight   =aslTB+6;
 tfrInitialFile     =aslTB+8;
 tfrInitialDrawer   =aslTB+9;
 tfrInitialPattern  =aslTB+10;

 tfrFlags1          =aslTB+20;
 tfrFlags2          =aslTB+22;
 tfrDoSaveMode      =aslTB+44;(*38*)
 tfrDoMultiSelect   =aslTB+45;(*38*)
 tfrDoPatterns      =aslTB+46;(*38*)

 tfrDrawersOnly     =aslTB+47;(*38*)
 tfrFilterFunc      =aslTB+49;(*38*)
 tfrRejectIcons     =aslTB+60;(*38*)
 tfrRejectPattern   =aslTB+61;(*38*)
 tfrAcceptPattern   =aslTB+62;(*38*)
 tfrFilterDrawers   =aslTB+63;(*38*)
 tfrHookFunc        =aslTB+7;

TYPE
 FRFlag1=(frDoPatterns,fr1,fr2,frDoMultiSelect,
          frPrivateIDCMP,frDoSaveMode,frIntuiFunc,frFilterFunc);
 FRFlag1Set=SET OF FRFlag1;
 FRFlag2=(frDrawersOnly,frFilterDrawers,(*38*)frRejectIcons,fr3,
          fr4,fr5,fr6,fr7);
 FRFlag2Set=SET OF FRFlag2;
CONST
 frfIntuiFunc =LONGSET{ORD(frIntuiFunc)};
 frfFilterFunc=LONGSET{ORD(frFilterFunc)};



(*=============================================================*)
TYPE
 FontRequester=RECORD
  reserved1:ARRAY [0..1] OF ADDRESS;
  attr:TextAttr;
  frontPen:SHORTCARD;
  backPen:SHORTCARD;
  drawMode:DrawModeSet;
  userData:ADDRESS;
  leftEdge:INTEGER;(*38*)
  topEdge:INTEGER; (*38*)
  width:INTEGER;   (*38*)
  height:INTEGER;  (*38*)
  tAttr:TTextAttr; (*38*)
 END;
 FontRequesterPtr=POINTER TO FontRequester;

CONST (* t steht für TagItem, fo für FontRequester *)
 tfoWindow          =aslTB+2;
 tfoScreen          =aslTB+40;(*38*)
 tfoPubScreenName   =aslTB+41;(*38*)
 tfoPrivateIDCMP    =aslTB+42;(*38*)
 tfoIntuiMsgFunc    =aslTB+70;(*38*)
 tfoSleepWindow     =aslTB+43;(*38*)
 tfoUserData        =aslTB+52;(*38*)

 tfoTextAttr        =aslTB+51;(*38*)
 tfoLocale          =aslTB+50;(*38*)
 tfoTitleText       =aslTB+1;
 tfoPositiveText    =aslTB+18;
 tfoNegativeText    =aslTB+19;

 tfoInitialLeftEdge =aslTB+3;
 tfoInitialTopEdge  =aslTB+4;
 tfoInitialWidth    =aslTB+5;
 tfoInitialHeight   =aslTB+6;
 tfoInitialName     =aslTB+10;
 tfoInitialSize     =aslTB+11;
 tfoInitialStyle    =aslTB+12;
 tfoInitialFlags    =aslTB+13;
 tfoInitialFrontPen =aslTB+14;
 tfoInitialBackPen  =aslTB+15;
 tfoInitialDrawMode =aslTB+59;(*38*)

 tfoFlags           =aslTB+20;
 tfoDoFrontPen      =aslTB+44;(*38*)
 tfoDoBackPen       =aslTB+45;(*38*)
 tfoDoStyle         =aslTB+46;(*38*)
 tfoDoDrawMode      =aslTB+47;(*38*)

 tfoFixedWidthOnly  =aslTB+48;(*38*)
 tfoMinHeight       =aslTB+16;
 tfoMaxHeight       =aslTB+17;
 tfoFilterFunc      =aslTB+49;(*38*)
 tfoHookFunc        =aslTB+7;

 tfoModeList        =aslTB+21;

TYPE
 FOFlag=(foDoFrontPen,foDoBackPen,foDoStyle,foDoDrawMode,
         foFixedWidthOnly,foPrivateIDCMP,foIntuiFunc,foFilterFunc);
 FOFlagSet=SET OF FOFlag;

CONST
 fofIntuiFunc =LONGSET{ORD(foIntuiFunc)};
 fofFilterFunc=LONGSET{ORD(foFilterFunc)};



(*=============================================================*)
TYPE
 ScreenModeRequester=RECORD (*38*)
  displayID:LONGCARD;
  displayWidth:LONGCARD;
  displayHeight:LONGCARD;
  displayDepth:CARDINAL;
  overscanType:CARDINAL;
  autoScroll:INTEGER; (* BOOL *)
  bitMapWidth:LONGCARD;
  bitMapHeight:LONGCARD;
  leftEdge:INTEGER;
  topEdge:INTEGER;
  width:INTEGER;
  height:INTEGER;
  infoOpened:INTEGER; (* BOOL *)
  infoLeftEdge:INTEGER;
  infoTopEdge:INTEGER;
  infoWidth:INTEGER;
  infoHeight:INTEGER;
  userData:ADDRESS;
 END;
 ScreenModeRequesterPtr=POINTER TO ScreenModeRequester;(*38*)

 DisplayMode=RECORD(*38*)
  node:Node;
  dimensionInfo:DimensionInfo;
  propertyFlags:PropertyFlagSet;
 END;
 DisplayModePtr=POINTER TO DisplayMode;(*38*)

CONST (* t steht für TagItem, sm für ScreenModeRequester *)
 tsmWindow               =aslTB+2;  (*38*)
 tsmScreen               =aslTB+40; (*38*)
 tsmPubScreenName        =aslTB+41; (*38*)
 tsmPrivateIDCMP         =aslTB+42; (*38*)
 tsmIntuiMsgFunc         =aslTB+70; (*38*)
 tsmSleepWindow          =aslTB+43; (*38*)
 tsmUserData             =aslTB+52; (*38*)

 tsmTextAttr             =aslTB+51; (*38*)
 tsmLocale               =aslTB+50; (*38*)
 tsmTitleText            =aslTB+1;  (*38*)
 tsmPositiveText         =aslTB+18; (*38*)
 tsmNegativeText         =aslTB+19; (*38*)

 tsmInitialLeftEdge      =aslTB+3;  (*38*)
 tsmInitialTopEdge       =aslTB+4;  (*38*)
 tsmInitialWidth         =aslTB+5;  (*38*)
 tsmInitialHeight        =aslTB+6;  (*38*)
 tsmInitialDisplayID     =aslTB+100;(*38*)
 tsmInitialDisplayWidth  =aslTB+101;(*38*)
 tsmInitialDisplayHeight =aslTB+102;(*38*)
 tsmInitialDisplayDepth  =aslTB+103;(*38*)
 tsmInitialOverscanType  =aslTB+104;(*38*)
 tsmInitialAutoScroll    =aslTB+105;(*38*)
 tsmInitialInfoOpened    =aslTB+106;(*38*)
 tsmInitialInfoLeftEdge  =aslTB+107;(*38*)
 tsmInitialInfoTopEdge   =aslTB+108;(*38*)

 tsmDoWidth              =aslTB+109;(*38*)
 tsmDoHeight             =aslTB+110;(*38*)
 tsmDoDepth              =aslTB+111;(*38*)
 tsmDoOverscanType       =aslTB+112;(*38*)
 tsmDoAutoScroll         =aslTB+113;(*38*)

 tsmPropertyFlags        =aslTB+114;(*38*)
 tsmPropertyMask         =aslTB+115;(*38*)
 tsmMinWidth             =aslTB+116;(*38*)
 tsmMaxWidth             =aslTB+117;(*38*)
 tsmMinHeight            =aslTB+118;(*38*)
 tsmMaxHeight            =aslTB+119;(*38*)
 tsmMinDepth             =aslTB+120;(*38*)
 tsmMaxDepth             =aslTB+121;(*38*)
 tsmFilterFunc           =aslTB+122;(*38*)

 tsmCustomSMList         =aslTB+123;(*38*)



(*
 * ------------------------------------------------------------------ *
 * !!!!!!!! OBSOLET !!!!!!!
 * Die folgenden Deklarationen sind aus Kompatibilitätsgründen noch
 * vorhanden. Bitte nicht mehr benutzen! Sie werden in der nächsten
 * Revision dieses Moduls entfernt.
 *)
   TYPE
    FileReqFlags=(
     filPatGad,fil1,fil2,filMultiSelect,filNewIDCMP,filSave,filDoMsgFunc
     ,filDoWildFunc
    );
    FileReqFlagSet=SET OF FileReqFlags;
    Fil1Flags=(
     fil1NoFiles,fil1MatchDirs,fil12,fil13,fil14,fil15,fil16,fil17);
    Fil1FlagSet=SET OF Fil1Flags;
    FontReqFlags=(
     fonFrontColor,fonBackColor,fonStyles,fonDrawMode,fonFixedWidth
     ,fonNewIDCMP,fonDoMsgFunc,fonDoWildFunc);
    FontReqFlagSet=SET OF FontReqFlags;
    AslTags=(aslDummy:=tagUser+080000H,
     aslHail,aslWindow,aslLeftEdge,aslTopEdge,aslWidth,aslHeight,
     aslHookFunc,aslFile,aslDir,aslFontName,aslFontHeight,aslFontStyles,
     aslFontFlags,aslFrontPen,aslBackPen,aslMinHeight,aslMaxHeight,
     aslOKText,aslCancelText,aslFuncFlags,aslModeList,aslExtFlags1
    );
   CONST
    aslPattern=aslFontName;

END AslD.noimp
