#ifndef LIBRARIES_ASL_H
#define LIBRARIES_ASL_H

/*******************************************************************
 pOS / Amiga adapt
*******************************************************************/

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif
#ifndef EXEC_NODES_H
#include <exec/nodes.h>
#endif
#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif
#ifndef WORKBENCH_STARTUP_H
#include <workbench/startup.h>
#endif
#ifndef GRAPHICS_TEXT_H
#include <graphics/text.h>
#endif
#ifndef GRAPHICS_DISPLAYINFO_H
#include <graphics/displayinfo.h>
#endif

#ifndef __INC_POS_PSL_FILEREQ_H
#include <pSL/FileReq.h>
#endif
#ifndef __INC_POS_PSL_FONTREQ_H
#include <pSL/FontReq.h>
#endif
#ifndef __INC_POS_PSL_PSLTAGS_H
#include <pSL/pSLTags.h>
#endif
#ifndef __INC_POS_PINTUI_EASYTAGS_H
#include <pIntui/EasyTags.h>
#endif


/*****************************************************************************/


#define AslName "psl.library"


/*****************************************************************************/


#define ASL_FileRequest  PSLREQTYP_FileRequest
#define ASL_FontRequest  PSLREQTYP_FontRequest

/*#define       ASL_ScreenModeRequest 2 */


/*----------------------------------
-----------------------------------*/
struct FileRequester
{
  UBYTE    fr_Type;
  UBYTE    fr_Pad;
  struct pOS_MemPool fr_MP;
  ULONG    fr_UserData[2];
  SLONG    fr_LeftEdge;
  SLONG    fr_TopEdge;
  SLONG    fr_Width;
  SLONG    fr_Height;
  ULONG    fr_CrtFlags;
  ULONG    fr_IFlags;
  UBYTE    fr_Reserved1[64];

  CHAR    *fr_Drawer;
  CHAR    *fr_File;
  CHAR    *fr_Pattern;
  CHAR    *fr_PositiveTxt;
  CHAR    *fr_NegativeTxt;

  UBYTE   pfr_Reserved2[64];

  struct WBArg *fr_ArgList;
  UWORD         fr_NumArgs;
};


#define ASLFR_Window           _PxA_IGNORE
#define ASLFR_Screen          EASYTAG_Screen
#define ASLFR_PubScreenName   SCRTAG_PubName
#define ASLFR_PrivateIDCMP     _PxA_IGNORE
#define ASLFR_IntuiMsgFunc     _PxA_IGNORE
#define ASLFR_SleepWindow     EASYTAG_WindowBusy
#define ASLFR_UserData         _PxA_IGNORE

#define ASLFR_TextAttr         _PxA_IGNORE
#define ASLFR_Locale           _PxA_IGNORE
#define ASLFR_TitleText       PSLFRTAG_Title
#define ASLFR_PositiveText    PSLFRTAG_PositiveText
#define ASLFR_NegativeText    PSLFRTAG_NegativeText

#define ASLFR_InitialLeftEdge PSLFRTAG_LeftEdge
#define ASLFR_InitialTopEdge  PSLFRTAG_TopEdge
#define ASLFR_InitialWidth    PSLFRTAG_Width
#define ASLFR_InitialHeight   PSLFRTAG_Height
#define ASLFR_InitialFile     PSLFRTAG_FilePart
#define ASLFR_InitialDrawer   PSLFRTAG_PathPart
#define ASLFR_InitialPattern  PSLFRTAG_Pattern

#define ASLFR_Flags1           _PxA_IGNORE
#define ASLFR_Flags2           _PxA_IGNORE
#define ASLFR_DoSaveMode      PSLFRTAG_SaveMode
#define ASLFR_DoMultiSelect   PSLFRTAG_MultiSelect
#define ASLFR_DoPatterns      PSLFRTAG_PatternGad

#define ASLFR_DrawersOnly     PSLFRTAG_OnlyDirs
#define ASLFR_FilterFunc       _PxA_IGNORE
#define ASLFR_RejectIcons     PSLFRTAG_FilterInfos
#define ASLFR_RejectPattern    _PxA_IGNORE
#define ASLFR_AcceptPattern    _PxA_IGNORE
#define ASLFR_FilterDrawers   PSLFRTAG_MatchDirs
#define ASLFR_HookFunc         _PxA_IGNORE

#define ASL_Hail    PSLFRTAG_Title
#define ASL_Pattern PSLFRTAG_Pattern
#define ASL_OKText  PSLFRTAG_PositiveText


/*****************************************************************************/

struct FontRequester
{
  UBYTE        pfn_Type;
  UBYTE        pfn_Pad;
  pOS_MemPool  pfn_MP;
  ULONG        pfn_UserData[2];
  SLONG        fo_LeftEdge;
  SLONG        fo_TopEdge;
  SLONG        fo_Width;
  SLONG        fo_Height;
  ULONG        pfn_CrtFlags;
  ULONG        pfn_IFlags;
  UBYTE        pfn_Reserved1[64];

  pOS_TextAttr fo_Attr;
  UBYTE        fo_FrontPen;
  UBYTE        fo_BackPen;
  UBYTE        fo_DrawMode;
  UBYTE        pfn_Pad1;
  const CHAR  *pfn_PositiveTxt;
  const CHAR  *pfn_NegativeTxt;

  UBYTE        pfn_Reserved2[64];
};

#define fo_TAttr fo_Attr


#define ASLFO_Window           _PxA_IGNORE
#define ASLFO_Screen          EASYTAG_Screen
#define ASLFO_PubScreenName   SCRTAG_PubName
#define ASLFO_PrivateIDCMP     _PxA_IGNORE
#define ASLFO_IntuiMsgFunc     _PxA_IGNORE
#define ASLFO_SleepWindow     EASYTAG_WindowBusy
#define ASLFO_UserData         _PxA_IGNORE

#define ASLFO_TextAttr        PSLFNTAG_TextAttr
#define ASLFO_Locale           _PxA_IGNORE
#define ASLFO_TitleText       PSLFNTAG_Title
#define ASLFO_PositiveText    PSLFNTAG_PositiveText
#define ASLFO_NegativeText    PSLFNTAG_NegativeText

#define ASLFO_InitialLeftEdge PSLFNTAG_LeftEdge
#define ASLFO_InitialTopEdge  PSLFNTAG_TopEdge
#define ASLFO_InitialWidth    PSLFNTAG_Width
#define ASLFO_InitialHeight   PSLFNTAG_Height
#define ASLFO_InitialName     PSLFNTAG_Name
#define ASLFO_InitialSize     PSLFNTAG_YSize

#define ASLFO_InitialStyle     _PxA_IGNORE
#define ASLFO_InitialFlags     _PxA_IGNORE
#define ASLFO_InitialFrontPen  _PxA_IGNORE
#define ASLFO_InitialBackPen   _PxA_IGNORE
#define ASLFO_InitialDrawMode  _PxA_IGNORE

#define ASLFO_Flags            _PxA_IGNORE
#define ASLFO_DoFrontPen       _PxA_IGNORE
#define ASLFO_DoBackPen        _PxA_IGNORE
#define ASLFO_DoStyle          _PxA_IGNORE
#define ASLFO_DoDrawMode       _PxA_IGNORE

#define ASLFO_FixedWidthOnly   _PxA_IGNORE
#define ASLFO_MinHeight        _PxA_IGNORE
#define ASLFO_MaxHeight        _PxA_IGNORE
#define ASLFO_FilterFunc       _PxA_IGNORE
#define ASLFO_HookFunc         _PxA_IGNORE
#define ASLFO_MaxFrontPen      _PxA_IGNORE
#define ASLFO_MaxBackPen       _PxA_IGNORE

#define ASLFO_ModeList         _PxA_IGNORE
#define ASLFO_FrontPens        _PxA_IGNORE
#define ASLFO_BackPens         _PxA_IGNORE



#if 0

struct ScreenModeRequester
{
    ULONG sm_DisplayID;
    ULONG sm_DisplayWidth;
    ULONG sm_DisplayHeight;
    UWORD sm_DisplayDepth;
    UWORD sm_OverscanType;
    BOOL  sm_AutoScroll;

    ULONG sm_BitMapWidth;
    ULONG sm_BitMapHeight;

    WORD  sm_LeftEdge;
    WORD  sm_TopEdge;
    WORD  sm_Width;
    WORD  sm_Height;

    BOOL  sm_InfoOpened;
    WORD  sm_InfoLeftEdge;
    WORD  sm_InfoTopEdge;
    WORD  sm_InfoWidth;
    WORD  sm_InfoHeight;

    APTR  sm_UserData;
};

struct DisplayMode
{
    struct Node  dm_Node;
    struct DimensionInfo dm_DimensionInfo;
    ULONG                dm_PropertyFlags;
};

#define ASLSM_Window          ASL_TB+2   /* Parent window                    */
#define ASLSM_Screen          ASL_TB+40  /* Screen to open on if no window   */
#define ASLSM_PubScreenName   ASL_TB+41  /* Name of public screen            */
#define ASLSM_PrivateIDCMP    ASL_TB+42  /* Allocate private IDCMP?          */
#define ASLSM_IntuiMsgFunc    ASL_TB+70  /* Function to handle IntuiMessages */
#define ASLSM_SleepWindow     ASL_TB+43  /* Block input in ASLSM_Window?     */
#define ASLSM_UserData        ASL_TB+52  /* What to put in sm_UserData       */

/* Text display */
#define ASLSM_TextAttr        ASL_TB+51  /* Text font to use for gadget text */
#define ASLSM_Locale          ASL_TB+50  /* Locale ASL should use for text   */
#define ASLSM_TitleText       ASL_TB+1   /* Title of requester               */
#define ASLSM_PositiveText    ASL_TB+18  /* Positive gadget text             */
#define ASLSM_NegativeText    ASL_TB+19  /* Negative gadget text             */

/* Initial settings */
#define ASLSM_InitialLeftEdge ASL_TB+3   /* Initial requester coordinates    */
#define ASLSM_InitialTopEdge  ASL_TB+4
#define ASLSM_InitialWidth    ASL_TB+5   /* Initial requester dimensions     */
#define ASLSM_InitialHeight   ASL_TB+6
#define ASLSM_InitialDisplayID     ASL_TB+100 /* Initial display mode id     */
#define ASLSM_InitialDisplayWidth  ASL_TB+101 /* Initial display width       */
#define ASLSM_InitialDisplayHeight ASL_TB+102 /* Initial display height      */
#define ASLSM_InitialDisplayDepth  ASL_TB+103 /* Initial display depth       */
#define ASLSM_InitialOverscanType  ASL_TB+104 /* Initial type of overscan    */
#define ASLSM_InitialAutoScroll    ASL_TB+105 /* Initial autoscroll setting  */
#define ASLSM_InitialInfoOpened    ASL_TB+106 /* Info wndw initially opened? */
#define ASLSM_InitialInfoLeftEdge  ASL_TB+107 /* Initial Info window coords. */
#define ASLSM_InitialInfoTopEdge   ASL_TB+108

/* Options */
#define ASLSM_DoWidth         ASL_TB+109  /* Display Width gadget?           */
#define ASLSM_DoHeight        ASL_TB+110  /* Display Height gadget?          */
#define ASLSM_DoDepth         ASL_TB+111  /* Display Depth gadget?           */
#define ASLSM_DoOverscanType  ASL_TB+112  /* Display Overscan Type gadget?   */
#define ASLSM_DoAutoScroll    ASL_TB+113  /* Display AutoScroll gadget?      */

/* Filtering */
#define ASLSM_PropertyFlags   ASL_TB+114  /* Must have these Property flags  */
#define ASLSM_PropertyMask    ASL_TB+115  /* Only these should be looked at  */
#define ASLSM_MinWidth        ASL_TB+116  /* Minimum display width to allow  */
#define ASLSM_MaxWidth        ASL_TB+117  /* Maximum display width to allow  */
#define ASLSM_MinHeight       ASL_TB+118  /* Minimum display height to allow */
#define ASLSM_MaxHeight       ASL_TB+119  /* Maximum display height to allow */
#define ASLSM_MinDepth        ASL_TB+120  /* Minimum display depth           */
#define ASLSM_MaxDepth        ASL_TB+121  /* Maximum display depth           */
#define ASLSM_FilterFunc      ASL_TB+122  /* Function to filter mode id's    */

/* Custom additions */
#define ASLSM_CustomSMList    ASL_TB+123  /* Exec list of struct DisplayMode */

#endif


#ifndef ASL_V38_NAMES_ONLY
#define rf_File          fr_File
#define rf_Dir           fr_Drawer
#define rf_LeftEdge      fr_LeftEdge
#define rf_TopEdge       fr_TopEdge
#define rf_Width         fr_Width
#define rf_Height        fr_Height
#define rf_NumArgs       fr_NumArgs
#define rf_ArgList       fr_ArgList
#define rf_UserData      fr_UserData
#define rf_Pat           fr_Pattern
#define ASL_Dummy        (TAG_USER + 0x80000)
/*#define ASL_Hail       ASL_Dummy+1 */
#define ASL_Window        _PxA_IGNORE
#define ASL_LeftEdge     PSLFRTAG_LeftEdge
#define ASL_TopEdge      PSLFRTAG_TopEdge
#define ASL_Width        PSLFRTAG_Width
#define ASL_Height       PSLFRTAG_Height
#define ASL_HookFunc      _PxA_IGNORE
#define ASL_File         PSLFRTAG_FilePart
#define ASL_Dir          PSLFRTAG_PathPart
#define ASL_FontName     PSLFNTAG_Name
#define ASL_FontHeight   PSLFNTAG_YSize
#define ASL_FontStyles    _PxA_IGNORE
#define ASL_FontFlags     _PxA_IGNORE
#define ASL_FrontPen      _PxA_IGNORE
#define ASL_BackPen       _PxA_IGNORE
#define ASL_MinHeight     _PxA_IGNORE
#define ASL_MaxHeight     _PxA_IGNORE
#define ASL_OKText       PSLFRTAG_PositiveText
#define ASL_CancelText   PSLFRTAG_NegativeText
#define ASL_FuncFlags     _PxA_IGNORE
#define ASL_ModeList      _PxA_IGNORE
#define ASL_ExtFlags1     _PxA_IGNORE
#define ASL_Pattern      PSLFRTAG_Pattern
/* remember what I said up there? Do not use these anymore! */
#define FILB_DOWILDFUNC  7L
#define FILB_DOMSGFUNC   6L
#define FILB_SAVE        5L
#define FILB_NEWIDCMP    4L
#define FILB_MULTISELECT 3L
#define FILB_PATGAD      0L
#define FILF_DOWILDFUNC  (1L << FILB_DOWILDFUNC)
#define FILF_DOMSGFUNC   (1L << FILB_DOMSGFUNC)
#define FILF_SAVE        (1L << FILB_SAVE)
#define FILF_NEWIDCMP    (1L << FILB_NEWIDCMP)
#define FILF_MULTISELECT (1L << FILB_MULTISELECT)
#define FILF_PATGAD      (1L << FILB_PATGAD)
#define FIL1B_NOFILES    0L
#define FIL1B_MATCHDIRS  1L
#define FIL1F_NOFILES    (1L << FIL1B_NOFILES)
#define FIL1F_MATCHDIRS  (1L << FIL1B_MATCHDIRS)
#define FONB_FRONTCOLOR 0
#define FONB_BACKCOLOR  1
#define FONB_STYLES     2
#define FONB_DRAWMODE   3
#define FONB_FIXEDWIDTH 4
#define FONB_NEWIDCMP   5
#define FONB_DOMSGFUNC  6
#define FONB_DOWILDFUNC 7
#define FONF_FRONTCOLOR (1L << FONB_FRONTCOLOR)
#define FONF_BACKCOLOR  (1L << FONB_BACKCOLOR)
#define FONF_STYLES     (1L << FONB_STYLES)
#define FONF_DRAWMODE   (1L << FONB_DRAWMODE)
#define FONF_FIXEDWIDTH (1L << FONB_FIXEDWIDTH)
#define FONF_NEWIDCMP   (1L << FONB_NEWIDCMP)
#define FONF_DOMSGFUNC  (1L << FONB_DOMSGFUNC)
#define FONF_DOWILDFUNC (1L << FONB_DOWILDFUNC)
#endif








#ifdef __IGNORE_NOT_SUPPORTED__

 #define FRB_FILTERFUNC     0
 #define FRB_INTUIFUNC      0
 #define FRB_DOSAVEMODE     0
 #define FRB_PRIVATEIDCMP   0
 #define FRB_DOMULTISELECT  0
 #define FRB_DOPATTERNS     0
 #define FRF_FILTERFUNC     0
 #define FRF_INTUIFUNC      0
 #define FRF_DOSAVEMODE     0
 #define FRF_PRIVATEIDCMP   0
 #define FRF_DOMULTISELECT  0
 #define FRF_DOPATTERNS     0

 #define FRB_DRAWERSONLY    0
 #define FRB_FILTERDRAWERS  0
 #define FRB_REJECTICONS    0
 #define FRF_DRAWERSONLY    0
 #define FRF_FILTERDRAWERS  0
 #define FRF_REJECTICONS    0

 #define FOB_DOFRONTPEN     0
 #define FOB_DOBACKPEN      0
 #define FOB_DOSTYLE        0
 #define FOB_DODRAWMODE     0
 #define FOB_FIXEDWIDTHONLY 0
 #define FOB_PRIVATEIDCMP   0
 #define FOB_INTUIFUNC      0
 #define FOB_FILTERFUNC     0

 #define FOF_DOFRONTPEN     0
 #define FOF_DOBACKPEN      0
 #define FOF_DOSTYLE        0
 #define FOF_DODRAWMODE     0
 #define FOF_FIXEDWIDTHONLY 0
 #define FOF_PRIVATEIDCMP   0
 #define FOF_INTUIFUNC      0
 #define FOF_FILTERFUNC     0


#endif /** __IGNORE_NOT_SUPPORTED__ **/







#endif /* LIBRARIES_ASL_H */
