1 #ifndef LIBRARIES_ASL_H
    2 #define LIBRARIES_ASL_H
    3 
    4 /*
    5 	asl.library include (V45)
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef EXEC_TYPES_H
   11 # include <exec/types.h>
   12 #endif
   13 
   14 #ifndef EXEC_NODES_H
   15 # include <exec/nodes.h>
   16 #endif
   17 
   18 #ifndef EXEC_SEMAPHORES_H
   19 # include <exec/semaphores.h>
   20 #endif
   21 
   22 #ifndef UTILITY_TAGITEM_H
   23 # include <utility/tagitem.h>
   24 #endif
   25 
   26 #ifndef WORKBENCH_STARTUP_H
   27 # include <workbench/startup.h>
   28 #endif
   29 
   30 #ifndef GRAPHICS_TEXT_H
   31 # include <graphics/text.h>
   32 #endif
   33 
   34 #ifndef GRAPHICS_DISPLAYINFO_H
   35 # include <graphics/displayinfo.h>
   36 #endif
   37 
   38 #pragma pack(2)
   39 
   40 
   41 #define AslName  "asl.library"
   42 #define ASL_TB  (TAG_USER + 0x80000)
   43 
   44 
   45 #define ASL_FileRequest        0
   46 #define ASL_FontRequest        1
   47 #define ASL_ScreenModeRequest  2
   48 
   49 
   50 struct FileRequester
   51 {
   52 	UBYTE         fr_Reserved0[4];
   53 	STRPTR        fr_File;
   54 	STRPTR        fr_Drawer;
   55 	UBYTE         fr_Reserved1[10];
   56 	WORD          fr_LeftEdge;
   57 	WORD          fr_TopEdge;
   58 	WORD          fr_Width;
   59 	WORD          fr_Height;
   60 	UBYTE         fr_Reserved2[2];
   61 	LONG          fr_NumArgs;
   62 	struct WBArg *fr_ArgList;
   63 	APTR          fr_UserData;
   64 	UBYTE         fr_Reserved3[8];
   65 	STRPTR        fr_Pattern;
   66 };
   67 
   68 
   69 #define ASLFR_TitleText           (ASL_TB + 1)
   70 #define ASLFR_Window              (ASL_TB + 2)
   71 
   72 #define ASLFR_InitialLeftEdge     (ASL_TB + 3)
   73 #define ASLFR_InitialTopEdge      (ASL_TB + 4)
   74 #define ASLFR_InitialWidth        (ASL_TB + 5)
   75 #define ASLFR_InitialHeight       (ASL_TB + 6)
   76 
   77 #define ASLFR_HookFunc            (ASL_TB + 7)
   78 
   79 #define ASLFR_InitialFile         (ASL_TB + 8)
   80 #define ASLFR_InitialDrawer       (ASL_TB + 9)
   81 #define ASLFR_InitialPattern      (ASL_TB + 10)
   82 
   83 #define ASLFR_PositiveText        (ASL_TB + 18)
   84 #define ASLFR_NegativeText        (ASL_TB + 19)
   85 
   86 #define ASLFR_Flags1              (ASL_TB + 20)
   87 #define ASLFR_Flags2              (ASL_TB + 22)
   88 
   89 #define ASLFR_Screen              (ASL_TB + 40)
   90 #define ASLFR_PubScreenName       (ASL_TB + 41)
   91 #define ASLFR_PrivateIDCMP        (ASL_TB + 42)
   92 #define ASLFR_SleepWindow         (ASL_TB + 43)
   93 
   94 #define ASLFR_DoSaveMode          (ASL_TB + 44)
   95 #define ASLFR_DoMultiSelect       (ASL_TB + 45)
   96 #define ASLFR_DoPatterns          (ASL_TB + 46)
   97 
   98 #define ASLFR_DrawersOnly         (ASL_TB + 47)
   99 #define ASLFR_FilterFunc          (ASL_TB + 49)
  100 
  101 #define ASLFR_Locale              (ASL_TB + 50)
  102 #define ASLFR_TextAttr            (ASL_TB + 51)
  103 #define ASLFR_UserData            (ASL_TB + 52)
  104 
  105 #define ASLFR_RejectIcons         (ASL_TB + 60)
  106 #define ASLFR_RejectPattern       (ASL_TB + 61)
  107 #define ASLFR_AcceptPattern       (ASL_TB + 62)
  108 #define ASLFR_FilterDrawers       (ASL_TB + 63)
  109 
  110 #define ASLFR_IntuiMsgFunc        (ASL_TB + 70)
  111 
  112 #define ASLFR_SetSortBy           (ASL_TB + 124)
  113 #define ASLFR_GetSortBy           (ASL_TB + 125)
  114 #define ASLFR_SetSortDrawers      (ASL_TB + 126)
  115 #define ASLFR_GetSortDrawers      (ASL_TB + 127)
  116 #define ASLFR_SetSortOrder        (ASL_TB + 128)
  117 #define ASLFR_GetSortOrder        (ASL_TB + 129)
  118 
  119 /*** V44 ***/
  120 
  121 #define ASLFR_InitialShowVolumes  (ASL_TB + 130)
  122 #define ASLFR_PopToFront          (ASL_TB + 131)
  123 
  124 /*** V45 ***/
  125 
  126 #define ASLFR_Activate            (ASL_TB + 132)
  127 
  128 
  129 #define FRB_FILTERFUNC     7
  130 #define FRB_INTUIFUNC      6
  131 #define FRB_DOSAVEMODE     5
  132 #define FRB_PRIVATEIDCMP   4
  133 #define FRB_DOMULTISELECT  3
  134 #define FRB_DOPATTERNS     0
  135 
  136 #define FRF_FILTERFUNC     (1<<FRB_FILTERFUNC)
  137 #define FRF_INTUIFUNC      (1<<FRB_INTUIFUNC)
  138 #define FRF_DOSAVEMODE     (1<<FRB_DOSAVEMODE)
  139 #define FRF_PRIVATEIDCMP   (1<<FRB_PRIVATEIDCMP)
  140 #define FRF_DOMULTISELECT  (1<<FRB_DOMULTISELECT)
  141 #define FRF_DOPATTERNS     (1<<FRB_DOPATTERNS)
  142 
  143 
  144 #define FRB_DRAWERSONLY    0
  145 #define FRB_FILTERDRAWERS  1
  146 #define FRB_REJECTICONS    2
  147 
  148 #define FRF_DRAWERSONLY    (1<<FRB_DRAWERSONLY)
  149 #define FRF_FILTERDRAWERS  (1<<FRB_FILTERDRAWERS)
  150 #define FRF_REJECTICONS    (1<<FRB_REJECTICONS)
  151 
  152 
  153 #define ASLFRSORTBY_Name   0
  154 #define ASLFRSORTBY_Date   1
  155 #define ASLFRSORTBY_Size   2
  156 
  157 
  158 #define ASLFRSORTDRAWERS_First  0
  159 #define ASLFRSORTDRAWERS_Mix    1
  160 #define ASLFRSORTDRAWERS_Last   2
  161 
  162 
  163 #define ASLFRSORTORDER_Ascend   0
  164 #define ASLFRSORTORDER_Descend  1
  165 
  166 
  167 struct FontRequester
  168 {
  169 	UBYTE            fo_Reserved0[8];
  170 	struct TextAttr  fo_Attr;
  171 	UBYTE            fo_FrontPen;
  172 	UBYTE            fo_BackPen;
  173 	UBYTE            fo_DrawMode;
  174 	UBYTE            fo_Reserved1;
  175 	APTR             fo_UserData;
  176 	WORD             fo_LeftEdge;
  177 	WORD             fo_TopEdge;
  178 	WORD             fo_Width;
  179 	WORD             fo_Height;
  180 	struct TTextAttr fo_TAttr;
  181 };
  182 
  183 
  184 #define ASLFO_TitleText        (ASL_TB + 1)
  185 #define ASLFO_Window           (ASL_TB + 2)
  186 
  187 #define ASLFO_InitialLeftEdge  (ASL_TB + 3)
  188 #define ASLFO_InitialTopEdge   (ASL_TB + 4)
  189 #define ASLFO_InitialWidth     (ASL_TB + 5)
  190 #define ASLFO_InitialHeight    (ASL_TB + 6)
  191 
  192 #define ASLFO_HookFunc         (ASL_TB + 7)
  193 
  194 #define ASLFO_InitialName      (ASL_TB + 10)
  195 #define ASLFO_InitialSize      (ASL_TB + 11)
  196 #define ASLFO_InitialStyle     (ASL_TB + 12)
  197 #define ASLFO_InitialFlags     (ASL_TB + 13)
  198 #define ASLFO_InitialFrontPen  (ASL_TB + 14)
  199 #define ASLFO_InitialBackPen   (ASL_TB + 15)
  200 
  201 #define ASLFO_MinHeight        (ASL_TB + 16)
  202 #define ASLFO_MaxHeight        (ASL_TB + 17)
  203 
  204 #define ASLFO_PositiveText     (ASL_TB + 18)
  205 #define ASLFO_NegativeText     (ASL_TB + 19)
  206 
  207 #define ASLFO_Flags            (ASL_TB + 20)
  208 
  209 #define ASLFO_ModeList         (ASL_TB + 21)
  210 
  211 #define ASLFO_Screen           (ASL_TB + 40)
  212 #define ASLFO_PubScreenName    (ASL_TB + 41)
  213 #define ASLFO_PrivateIDCMP     (ASL_TB + 42)
  214 #define ASLFO_SleepWindow      (ASL_TB + 43)
  215 
  216 #define ASLFO_DoFrontPen       (ASL_TB + 44)
  217 #define ASLFO_DoBackPen        (ASL_TB + 45)
  218 #define ASLFO_DoStyle          (ASL_TB + 46)
  219 #define ASLFO_DoDrawMode       (ASL_TB + 47)
  220 
  221 #define ASLFO_FixedWidthOnly   (ASL_TB + 48)
  222 
  223 #define ASLFO_FilterFunc       (ASL_TB + 49)
  224 
  225 #define ASLFO_Locale           (ASL_TB + 50)
  226 #define ASLFO_TextAttr         (ASL_TB + 51)
  227 #define ASLFO_UserData         (ASL_TB + 52)
  228 
  229 #define ASLFO_InitialDrawMode  (ASL_TB + 59)
  230 
  231 #define ASLFO_FrontPens        (ASL_TB + 64)
  232 #define ASLFO_BackPens         (ASL_TB + 65)
  233 
  234 #define ASLFO_MaxFrontPen      (ASL_TB + 66)
  235 #define ASLFO_MaxBackPen       (ASL_TB + 67)
  236 
  237 #define ASLFO_IntuiMsgFunc     (ASL_TB + 70)
  238 
  239 /*** V44 ***/
  240 
  241 #define ASLFO_PopToFront       (ASL_TB + 131)
  242 
  243 /*** V45 ***/
  244 
  245 #define ASLFO_Activate         (ASL_TB + 132)
  246 #define ASLFO_SampleText       (ASL_TB + 133)
  247 
  248 
  249 #define FOB_DOFRONTPEN      0
  250 #define FOB_DOBACKPEN       1
  251 #define FOB_DOSTYLE         2
  252 #define FOB_DODRAWMODE      3
  253 #define FOB_FIXEDWIDTHONLY  4
  254 #define FOB_PRIVATEIDCMP    5
  255 #define FOB_INTUIFUNC       6
  256 #define FOB_FILTERFUNC      7
  257 
  258 #define FOF_DOFRONTPEN      (1<<FOB_DOFRONTPEN)
  259 #define FOF_DOBACKPEN       (1<<FOB_DOBACKPEN)
  260 #define FOF_DOSTYLE         (1<<FOB_DOSTYLE)
  261 #define FOF_DODRAWMODE      (1<<FOB_DODRAWMODE)
  262 #define FOF_FIXEDWIDTHONLY  (1<<FOB_FIXEDWIDTHONLY)
  263 #define FOF_PRIVATEIDCMP    (1<<FOB_PRIVATEIDCMP)
  264 #define FOF_INTUIFUNC       (1<<FOB_INTUIFUNC)
  265 #define FOF_FILTERFUNC      (1<<FOB_FILTERFUNC)
  266 
  267 
  268 struct ScreenModeRequester
  269 {
  270 	ULONG sm_DisplayID;
  271 	ULONG sm_DisplayWidth;
  272 	ULONG sm_DisplayHeight;
  273 	UWORD sm_DisplayDepth;
  274 	UWORD sm_OverscanType;
  275 	BOOL  sm_AutoScroll;
  276 
  277 	ULONG sm_BitMapWidth;
  278 	ULONG sm_BitMapHeight;
  279 
  280 	WORD  sm_LeftEdge;
  281 	WORD  sm_TopEdge;
  282 	WORD  sm_Width;
  283 	WORD  sm_Height;
  284 
  285 	BOOL  sm_InfoOpened;
  286 	WORD  sm_InfoLeftEdge;
  287 	WORD  sm_InfoTopEdge;
  288 	WORD  sm_InfoWidth;
  289 	WORD  sm_InfoHeight;
  290 
  291 	APTR  sm_UserData;
  292 
  293 	/* fields below are available from asl.library V51 */
  294 
  295 	/* Name of the monitor this sm_DisplayID is tied to
  296 	** To be passed as SA_MonitorName */
  297 	STRPTR sm_MonitorName; 
  298 
  299 	/* sm_DisplayID resolution, to be passed as
  300 	** SA_DisplayWidth/Height in OpenScreen*/
  301 	ULONG sm_DisplayIDWidth;
  302 	ULONG sm_DisplayIDHeight;
  303 };
  304 
  305 
  306 struct DisplayMode
  307 {
  308 	struct Node          dm_Node;
  309 	struct DimensionInfo dm_DimensionInfo;
  310 	ULONG                dm_PropertyFlags;
  311 };
  312 
  313 
  314 #define ASLSM_TitleText             (ASL_TB + 1)
  315 #define ASLSM_Window                (ASL_TB + 2)
  316 
  317 #define ASLSM_InitialLeftEdge       (ASL_TB + 3)
  318 #define ASLSM_InitialTopEdge        (ASL_TB + 4)
  319 #define ASLSM_InitialWidth          (ASL_TB + 5)
  320 #define ASLSM_InitialHeight         (ASL_TB + 6)
  321 
  322 #define ASLSM_PositiveText          (ASL_TB + 18)
  323 #define ASLSM_NegativeText          (ASL_TB + 19)
  324 
  325 #define ASLSM_Screen                (ASL_TB + 40)
  326 #define ASLSM_PubScreenName         (ASL_TB + 41)
  327 #define ASLSM_PrivateIDCMP          (ASL_TB + 42)
  328 #define ASLSM_SleepWindow           (ASL_TB + 43)
  329 
  330 #define ASLSM_Locale                (ASL_TB + 50)
  331 #define ASLSM_TextAttr              (ASL_TB + 51)
  332 #define ASLSM_UserData              (ASL_TB + 52)
  333 
  334 #define ASLSM_IntuiMsgFunc          (ASL_TB + 70)
  335 
  336 #define ASLSM_InitialDisplayID      (ASL_TB + 100)
  337 #define ASLSM_InitialDisplayWidth   (ASL_TB + 101)
  338 #define ASLSM_InitialDisplayHeight  (ASL_TB + 102)
  339 #define ASLSM_InitialDisplayDepth   (ASL_TB + 103)
  340 #define ASLSM_InitialOverscanType   (ASL_TB + 104)
  341 #define ASLSM_InitialAutoScroll     (ASL_TB + 105)
  342 #define ASLSM_InitialInfoOpened     (ASL_TB + 106)
  343 #define ASLSM_InitialInfoLeftEdge   (ASL_TB + 107)
  344 #define ASLSM_InitialInfoTopEdge    (ASL_TB + 108)
  345 
  346 #define ASLSM_DoWidth               (ASL_TB + 109)
  347 #define ASLSM_DoHeight              (ASL_TB + 110)
  348 #define ASLSM_DoDepth               (ASL_TB + 111)
  349 #define ASLSM_DoOverscanType        (ASL_TB + 112)
  350 #define ASLSM_DoAutoScroll          (ASL_TB + 113)
  351 
  352 #define ASLSM_PropertyFlags         (ASL_TB + 114)
  353 #define ASLSM_PropertyMask          (ASL_TB + 115)
  354 #define ASLSM_MinWidth              (ASL_TB + 116)
  355 #define ASLSM_MaxWidth              (ASL_TB + 117)
  356 #define ASLSM_MinHeight             (ASL_TB + 118)
  357 #define ASLSM_MaxHeight             (ASL_TB + 119)
  358 /* Old MinDepth obsolete due to a compatibility issue */
  359 /* #define ASLSM_MinDepth              (ASL_TB + 120) */
  360 #define ASLSM_MaxDepth              (ASL_TB + 121)
  361 #define ASLSM_FilterFunc            (ASL_TB + 122)
  362 
  363 #define ASLSM_CustomSMList          (ASL_TB + 123)
  364 
  365 /*** V44 ***/
  366 
  367 #define ASLSM_PopToFront            (ASL_TB + 131)
  368 
  369 /*** V45 ***/
  370 
  371 #define ASLSM_Activate              (ASL_TB + 132)
  372 
  373 
  374 /*** V51 ***/
  375 #define ASLSM_MinDepth              (ASL_TB + 133)
  376 
  377 #define ASL_LAST_TAG  (ASL_TB + 134)
  378 
  379 
  380 /*** V45 ***/
  381 
  382 #define ASL_SEMAPHORE_NAME  "asl.library"
  383 
  384 struct AslSemaphore
  385 {
  386 	struct SignalSemaphore as_Semaphore;
  387 
  388 	UWORD                  as_Version;
  389 	ULONG                  as_Size;
  390 
  391 	UBYTE                  as_SortBy;
  392 	UBYTE                  as_SortDrawers;
  393 	UBYTE                  as_SortOrder;
  394 
  395 	UBYTE                  as_SizePosition;
  396 
  397 	WORD                   as_RelativeLeft;
  398 	WORD                   as_RelativeTop;
  399 
  400 	UBYTE                  as_RelativeWidth;
  401 	UBYTE                  as_RelativeHeight;
  402 };
  403 
  404 
  405 #define ASLPOS_DefaultPosition  0
  406 #define ASLPOS_CenterWindow     1
  407 #define ASLPOS_CenterScreen     2
  408 #define ASLPOS_WindowPosition   3
  409 #define ASLPOS_ScreenPosition   4
  410 #define ASLPOS_CenterMouse      5
  411 
  412 #define ASLPOS_MASK             0x0F
  413 
  414 
  415 #define ASLSIZE_DefaultSize   (0<<4)
  416 #define ASLSIZE_RelativeSize  (1<<4)
  417 
  418 #define ASLSIZE_MASK          0x30
  419 
  420 
  421 #define ASLOPTION_ASLOverrides  (1<<6)
  422 
  423 
  424 /*** OBSOLETE ***/
  425 
  426 #ifndef ASL_V38_NAMES_ONLY
  427 
  428 #define rf_File      fr_File
  429 #define rf_Dir       fr_Drawer
  430 #define rf_LeftEdge  fr_LeftEdge
  431 #define rf_TopEdge   fr_TopEdge
  432 #define rf_Width     fr_Width
  433 #define rf_Height    fr_Height
  434 #define rf_NumArgs   fr_NumArgs
  435 #define rf_ArgList   fr_ArgList
  436 #define rf_UserData  fr_UserData
  437 #define rf_Pat       fr_Pattern
  438 
  439 #define ASL_Dummy       (TAG_USER + 0x80000)
  440 #define ASL_Hail        (ASL_Dummy + 1)
  441 #define ASL_Window      (ASL_Dummy + 2)
  442 #define ASL_LeftEdge    (ASL_Dummy + 3)
  443 #define ASL_TopEdge     (ASL_Dummy + 4)
  444 #define ASL_Width       (ASL_Dummy + 5)
  445 #define ASL_Height      (ASL_Dummy + 6)
  446 #define ASL_HookFunc    (ASL_Dummy + 7)
  447 #define ASL_File        (ASL_Dummy + 8)
  448 #define ASL_Dir         (ASL_Dummy + 9)
  449 #define ASL_FontName    (ASL_Dummy + 10)
  450 #define ASL_FontHeight  (ASL_Dummy + 11)
  451 #define ASL_FontStyles  (ASL_Dummy + 12)
  452 #define ASL_FontFlags   (ASL_Dummy + 13)
  453 #define ASL_FrontPen    (ASL_Dummy + 14)
  454 #define ASL_BackPen     (ASL_Dummy + 15)
  455 #define ASL_MinHeight   (ASL_Dummy + 16)
  456 #define ASL_MaxHeight   (ASL_Dummy + 17)
  457 #define ASL_OKText      (ASL_Dummy + 18)
  458 #define ASL_CancelText  (ASL_Dummy + 19)
  459 #define ASL_FuncFlags   (ASL_Dummy + 20)
  460 #define ASL_ModeList    (ASL_Dummy + 21)
  461 #define ASL_ExtFlags1   (ASL_Dummy + 22)
  462 #define ASL_Pattern     (ASL_FontName)
  463 
  464 #define FILB_DOWILDFUNC   7
  465 #define FILB_DOMSGFUNC    6
  466 #define FILB_SAVE         5
  467 #define FILB_NEWIDCMP     4
  468 #define FILB_MULTISELECT  3
  469 #define FILB_PATGAD       0
  470 #define FILF_DOWILDFUNC   (1<<FILB_DOWILDFUNC)
  471 #define FILF_DOMSGFUNC    (1<<FILB_DOMSGFUNC)
  472 #define FILF_SAVE         (1<<FILB_SAVE)
  473 #define FILF_NEWIDCMP     (1<<FILB_NEWIDCMP)
  474 #define FILF_MULTISELECT  (1<<FILB_MULTISELECT)
  475 #define FILF_PATGAD       (1<<FILB_PATGAD)
  476 
  477 #define FIL1B_NOFILES    0
  478 #define FIL1B_MATCHDIRS  1
  479 #define FIL1F_NOFILES    (1<<FIL1B_NOFILES)
  480 #define FIL1F_MATCHDIRS  (1<<FIL1B_MATCHDIRS)
  481 
  482 #define FONB_FRONTCOLOR  0
  483 #define FONB_BACKCOLOR   1
  484 #define FONB_STYLES      2
  485 #define FONB_DRAWMODE    3
  486 #define FONB_FIXEDWIDTH  4
  487 #define FONB_NEWIDCMP    5
  488 #define FONB_DOMSGFUNC   6
  489 #define FONB_DOWILDFUNC  7
  490 #define FONF_FRONTCOLOR  (1<<FONB_FRONTCOLOR)
  491 #define FONF_BACKCOLOR   (1<<FONB_BACKCOLOR)
  492 #define FONF_STYLES      (1<<FONB_STYLES)
  493 #define FONF_DRAWMODE    (1<<FONB_DRAWMODE)
  494 #define FONF_FIXEDWIDTH  (1<<FONB_FIXEDWIDTH)
  495 #define FONF_NEWIDCMP    (1<<FONB_NEWIDCMP)
  496 #define FONF_DOMSGFUNC   (1<<FONB_DOMSGFUNC)
  497 #define FONF_DOWILDFUNC  (1<<FONB_DOWILDFUNC)
  498 
  499 #endif /* ASL_V38_NAMES_ONLY */
  500 
  501 
  502 #pragma pack()
  503 
  504 #endif /* LIBRARIES_ASL_H */