home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / os-include / libraries / asl.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  18KB  |  436 lines

  1. #ifndef    LIBRARIES_ASL_H
  2. #define    LIBRARIES_ASL_H
  3. /*
  4. **    $VER: asl.h 38.5 (5.1.93)
  5. **    Includes Release 40.15
  6. **
  7. **    ASL library structures and constants
  8. **
  9. **    (C) Copyright 1989-1993 Commodore-Amiga Inc.
  10. **    (C) Copyright 1989-1990 Charlie Heath
  11. **    All Rights Reserved
  12. */
  13.  
  14. /*****************************************************************************/
  15.  
  16.  
  17. #ifndef    EXEC_TYPES_H
  18. #include <exec/types.h>
  19. #endif
  20.  
  21. #ifndef    EXEC_NODES_H
  22. #include <exec/nodes.h>
  23. #endif
  24.  
  25. #ifndef UTILITY_TAGITEM_H
  26. #include <utility/tagitem.h>
  27. #endif
  28.  
  29. #ifndef WORKBENCH_STARTUP_H
  30. #include <workbench/startup.h>
  31. #endif
  32.  
  33. #ifndef GRAPHICS_TEXT_H
  34. #include <graphics/text.h>
  35. #endif
  36.  
  37. #ifndef GRAPHICS_DISPLAYINFO_H
  38. #include <graphics/displayinfo.h>
  39. #endif
  40.  
  41.  
  42. /*****************************************************************************/
  43.  
  44.  
  45. #define    AslName "asl.library"
  46. #define ASL_TB    (TAG_USER+0x80000)
  47.  
  48.  
  49. /*****************************************************************************/
  50.  
  51.  
  52. /* Types of requesters known to ASL, used as arguments to AllocAslRequest() */
  53. #define    ASL_FileRequest          0
  54. #define    ASL_FontRequest          1
  55. #define    ASL_ScreenModeRequest 2
  56.  
  57.  
  58. /*****************************************************************************
  59.  *
  60.  * ASL File Requester data structures and constants
  61.  *
  62.  * This structure must only be allocated by asl.library amd is READ-ONLY!
  63.  * Control of the various fields is provided via tags when the requester
  64.  * is created with AllocAslRequest() and when it is displayed via
  65.  * AslRequest()
  66.  */
  67. struct FileRequester
  68. {
  69.     UBYTE      fr_Reserved0[4];
  70.     STRPTR      fr_File;          /* Contents of File gadget on exit    */
  71.     STRPTR      fr_Drawer;          /* Contents of Drawer gadget on exit  */
  72.     UBYTE      fr_Reserved1[10];
  73.     WORD      fr_LeftEdge;          /* Coordinates of requester on exit   */
  74.     WORD      fr_TopEdge;
  75.     WORD      fr_Width;
  76.     WORD      fr_Height;
  77.     UBYTE      fr_Reserved2[2];
  78.     LONG      fr_NumArgs;          /* Number of files selected        */
  79.     struct WBArg *fr_ArgList;          /* List of files selected        */
  80.     APTR      fr_UserData;          /* You can store your own data here   */
  81.     UBYTE      fr_Reserved3[8];
  82.     STRPTR      fr_Pattern;          /* Contents of Pattern gadget on exit */
  83. };
  84.  
  85. /* File requester tag values, used by AllocAslRequest() and AslRequest() */
  86.  
  87. /* Window control */
  88. #define ASLFR_Window          ASL_TB+2     /* Parent window             */
  89. #define ASLFR_Screen          ASL_TB+40  /* Screen to open on if no window   */
  90. #define ASLFR_PubScreenName   ASL_TB+41  /* Name of public screen         */
  91. #define ASLFR_PrivateIDCMP    ASL_TB+42  /* Allocate private IDCMP?         */
  92. #define ASLFR_IntuiMsgFunc    ASL_TB+70  /* Function to handle IntuiMessages */
  93. #define ASLFR_SleepWindow     ASL_TB+43  /* Block input in ASLFR_Window?     */
  94. #define ASLFR_UserData          ASL_TB+52  /* What to put in fr_UserData         */
  95.  
  96. /* Text display */
  97. #define ASLFR_TextAttr          ASL_TB+51  /* Text font to use for gadget text */
  98. #define ASLFR_Locale          ASL_TB+50  /* Locale ASL should use for text   */
  99. #define ASLFR_TitleText       ASL_TB+1     /* Title of requester             */
  100. #define ASLFR_PositiveText    ASL_TB+18  /* Positive gadget text         */
  101. #define ASLFR_NegativeText    ASL_TB+19  /* Negative gadget text         */
  102.  
  103. /* Initial settings */
  104. #define ASLFR_InitialLeftEdge ASL_TB+3     /* Initial requester coordinates    */
  105. #define ASLFR_InitialTopEdge  ASL_TB+4
  106. #define ASLFR_InitialWidth    ASL_TB+5     /* Initial requester dimensions     */
  107. #define ASLFR_InitialHeight   ASL_TB+6
  108. #define ASLFR_InitialFile     ASL_TB+8     /* Initial contents of File gadget  */
  109. #define ASLFR_InitialDrawer   ASL_TB+9     /* Initial contents of Drawer gadg. */
  110. #define ASLFR_InitialPattern  ASL_TB+10  /* Initial contents of Pattern gadg.*/
  111.  
  112. /* Options */
  113. #define ASLFR_Flags1          ASL_TB+20  /* Option flags             */
  114. #define ASLFR_Flags2          ASL_TB+22  /* Additional option flags         */
  115. #define ASLFR_DoSaveMode      ASL_TB+44  /* Being used for saving?         */
  116. #define ASLFR_DoMultiSelect   ASL_TB+45  /* Do multi-select?             */
  117. #define ASLFR_DoPatterns      ASL_TB+46  /* Display a Pattern gadget?         */
  118.  
  119. /* Filtering */
  120. #define ASLFR_DrawersOnly     ASL_TB+47  /* Don't display files?         */
  121. #define ASLFR_FilterFunc      ASL_TB+49  /* Function to filter files         */
  122. #define ASLFR_RejectIcons     ASL_TB+60  /* Display .info files?         */
  123. #define ASLFR_RejectPattern   ASL_TB+61  /* Don't display files matching pat */
  124. #define ASLFR_AcceptPattern   ASL_TB+62  /* Accept only files matching pat   */
  125. #define ASLFR_FilterDrawers   ASL_TB+63  /* Also filter drawers with patterns*/
  126. #define    ASLFR_HookFunc          ASL_TB+7     /* Combined callback function         */
  127.  
  128. /* Flag bits for the ASLFR_Flags1 tag */
  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       (1L << FRB_FILTERFUNC)
  137. #define    FRF_INTUIFUNC       (1L << FRB_INTUIFUNC)
  138. #define    FRF_DOSAVEMODE       (1L << FRB_DOSAVEMODE)
  139. #define    FRF_PRIVATEIDCMP   (1L << FRB_PRIVATEIDCMP)
  140. #define    FRF_DOMULTISELECT  (1L << FRB_DOMULTISELECT)
  141. #define    FRF_DOPATTERNS       (1L << FRB_DOPATTERNS)
  142.  
  143. /* Flag bits for the ASLFR_Flags2 tag */
  144. #define    FRB_DRAWERSONLY    0
  145. #define    FRB_FILTERDRAWERS  1
  146. #define    FRB_REJECTICONS    2
  147.  
  148. #define    FRF_DRAWERSONLY    (1L << FRB_DRAWERSONLY)
  149. #define    FRF_FILTERDRAWERS  (1L << FRB_FILTERDRAWERS)
  150. #define    FRF_REJECTICONS    (1L << FRB_REJECTICONS)
  151.  
  152.  
  153. /*****************************************************************************
  154.  *
  155.  * ASL Font Requester data structures and constants
  156.  *
  157.  * This structure must only be allocated by asl.library amd is READ-ONLY!
  158.  * Control of the various fields is provided via tags when the requester
  159.  * is created with AllocAslRequest() and when it is displayed via
  160.  * AslRequest()
  161.  */
  162. struct FontRequester
  163. {
  164.     UBYTE         fo_Reserved0[8];
  165.     struct TextAttr  fo_Attr;        /* Returned TextAttr            */
  166.     UBYTE         fo_FrontPen;    /* Returned front pen            */
  167.     UBYTE         fo_BackPen;    /* Returned back pen            */
  168.     UBYTE         fo_DrawMode;    /* Returned drawing mode        */
  169.     UBYTE         fo_Reserved1;
  170.     APTR         fo_UserData;    /* You can store your own data here */
  171.     WORD         fo_LeftEdge;    /* Coordinates of requester on exit */
  172.     WORD         fo_TopEdge;
  173.     WORD         fo_Width;
  174.     WORD         fo_Height;
  175.     struct TTextAttr fo_TAttr;        /* Returned TTextAttr            */
  176. };
  177.  
  178. /* Font requester tag values, used by AllocAslRequest() and AslRequest() */
  179.  
  180. /* Window control */
  181. #define ASLFO_Window          ASL_TB+2     /* Parent window             */
  182. #define ASLFO_Screen          ASL_TB+40  /* Screen to open on if no window   */
  183. #define ASLFO_PubScreenName   ASL_TB+41  /* Name of public screen         */
  184. #define ASLFO_PrivateIDCMP    ASL_TB+42  /* Allocate private IDCMP?         */
  185. #define ASLFO_IntuiMsgFunc    ASL_TB+70  /* Function to handle IntuiMessages */
  186. #define ASLFO_SleepWindow     ASL_TB+43  /* Block input in ASLFO_Window?     */
  187. #define ASLFO_UserData          ASL_TB+52  /* What to put in fo_UserData         */
  188.  
  189. /* Text display */
  190. #define ASLFO_TextAttr          ASL_TB+51  /* Text font to use for gadget text */
  191. #define ASLFO_Locale          ASL_TB+50  /* Locale ASL should use for text   */
  192. #define ASLFO_TitleText       ASL_TB+1     /* Title of requester             */
  193. #define ASLFO_PositiveText    ASL_TB+18  /* Positive gadget text         */
  194. #define ASLFO_NegativeText    ASL_TB+19  /* Negative gadget text         */
  195.  
  196. /* Initial settings */
  197. #define ASLFO_InitialLeftEdge ASL_TB+3     /* Initial requester coordinates    */
  198. #define ASLFO_InitialTopEdge  ASL_TB+4
  199. #define ASLFO_InitialWidth    ASL_TB+5     /* Initial requester dimensions     */
  200. #define ASLFO_InitialHeight   ASL_TB+6
  201. #define ASLFO_InitialName     ASL_TB+10  /* Initial contents of Name gadget  */
  202. #define ASLFO_InitialSize     ASL_TB+11  /* Initial contents of Size gadget  */
  203. #define ASLFO_InitialStyle    ASL_TB+12  /* Initial font style             */
  204. #define ASLFO_InitialFlags    ASL_TB+13  /* Initial font flags for TextAttr  */
  205. #define ASLFO_InitialFrontPen ASL_TB+14  /* Initial front pen             */
  206. #define ASLFO_InitialBackPen  ASL_TB+15  /* Initial back pen             */
  207. #define ASLFO_InitialDrawMode ASL_TB+59  /* Initial draw mod