home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d575 / reqtools.lha / ReqTools / include / libraries / reqtools.i < prev   
Text File  |  1991-12-22  |  9KB  |  314 lines

  1.     IFND LIBRARIES_REQTOOLS_I
  2. LIBRARIES_REQTOOLS_I SET 1
  3. **
  4. **   $Filename: libraries/reqtools.i $
  5. **   $Release: 1.0 $
  6. **
  7. **   (C) Copyright 1991 Nico François
  8. **       All Rights Reserved
  9. **
  10.  
  11.    IFND EXEC_LISTS_I
  12.    include "exec/lists.i"
  13.    ENDC
  14.  
  15.    IFND EXEC_LIBRARIES_I
  16.    include "exec/libraries.i"
  17.    ENDC
  18.  
  19.    IFND GRAPHICS_TEXT_I
  20.    include "graphics/text.i"
  21.    ENDC
  22.  
  23.    IFND UTILITY_TAGITEM_I
  24.    include "utility/tagitem.i"
  25.    ENDC
  26.  
  27. REQTOOLSNAME   MACRO
  28.    dc.b "reqtools.library",0
  29.    ENDM
  30.  
  31. REQTOOLSVERSION        equ     37
  32.  
  33.    STRUCTURE ReqToolsBase,LIB_SIZE
  34.       UBYTE rt_Flags
  35.       STRUCT rt_pad,3
  36.       ULONG rt_SegList
  37.       * The following library bases may be read and used by your program
  38.       APTR rt_IntuitionBase
  39.       APTR rt_GfxBase
  40.       APTR rt_DOSBase
  41.       * Next two library bases are only (and always) valid on Kickstart 2.0!
  42.       * (1.3 version of reqtools also initializes these when run on 2.0)
  43.       APTR rt_GadToolsBase
  44.       APTR rt_UtilityBase
  45.       LABEL ReqToolsBase_SIZE
  46.  
  47. * types of requesters, for rtAllocRequestA()
  48. RT_FILEREQ        equ     0
  49. RT_REQINFO        equ     1
  50. RT_FONTREQ        equ     2
  51.  
  52. ************************
  53. *                      *
  54. *    File requester    *
  55. *                      *
  56. ************************
  57.  
  58. * structure _MUST_ be allocated with rtAllocRequest()
  59.  
  60.    STRUCTURE rtFileRequester,0
  61.       ULONG rtfi_ReqPos
  62.       UWORD rtfi_LeftOffset
  63.       UWORD rtfi_TopOffset
  64.       ULONG rtfi_Flags
  65.       APTR  rtfi_Hook;
  66.       APTR  rtfi_Dir             * READ ONLY! Change with rtChangeReqAttrA()!
  67.       APTR  rtfi_MatchPat        * READ ONLY! Change with rtChangeReqAttrA()!
  68.       APTR  rtfi_DefaultFont
  69.       ULONG rtfi_WaitPointer
  70.       * Lots of private data follows! HANDS OFF :-)
  71.  
  72. * returned by rtFileRequestA() if multiselect is enabled,
  73. * free list with rtFreeFileList()
  74.  
  75.    STRUCTURE rtFileList,0
  76.       APTR  rtfl_Next
  77.       ULONG rtfl_StrLen
  78.       APTR  rtfl_Name
  79.       LABEL rtFileList_SIZE
  80.  
  81. ************************
  82. *                      *
  83. *    Font requester    *
  84. *                      *
  85. ************************
  86.  
  87. * structure _MUST_ be allocated with rtAllocRequest()
  88.  
  89.    STRUCTURE rtFontRequester,0
  90.       ULONG rtfo_ReqPos
  91.       UWORD rtfo_LeftOffset
  92.       UWORD rtfo_TopOffset
  93.       ULONG rtfo_Flags
  94.       APTR  rtfo_Hook;
  95.       STRUCT rtfo_Attr,ta_SIZEOF * READ ONLY!
  96.       APTR  rtfo_DefaultFont
  97.       ULONG rtfo_WaitPointer
  98.       * Lots of private data follows! HANDS OFF :-)
  99.  
  100. ************************
  101. *                      *
  102. *    Requester Info    *
  103. *                      *
  104. ************************
  105.  
  106. * for rtEZRequestA(), rtGetLongA(), rtGetStringA() and rtPaletteRequestA(),
  107. * _MUST_ be allocated with rtAllocRequest()
  108.  
  109.    STRUCTURE rtReqInfo,0
  110.       ULONG rtri_ReqPos
  111.       UWORD rtri_LeftOffset
  112.       UWORD rtri_TopOffset
  113.       ULONG rtri_Width         * not for rtEZRequestA()
  114.       APTR  rtri_ReqTitle     * currently only for rtEZRequestA()
  115.       ULONG rtri_Flags         * only for rtEZRequestA()
  116.       APTR  rtri_DefaultFont     * currently only for rtPaletteRequestA()
  117.       ULONG rtri_WaitPointer
  118.       * structure may be extended in future
  119.  
  120. ************************
  121. *                      *
  122. *     Handler Info     *
  123. *                      *
  124. ************************
  125.  
  126. * for rtReqHandlerA(), will be allocated for you when you use
  127. * the RT_ReqHandler tag, never try to allocate this yourself!
  128.  
  129.    STRUCTURE rtHandlerInfo,4    * first longword is private!
  130.       ULONG rthi_WaitMask
  131.       ULONG rthi_DoNotWait
  132.       * Private data follows, HANDS OFF :-)
  133.  
  134. * possible return codes from rtReqHandlerA()
  135.  
  136. CALL_HANDLER        equ     $80000000
  137.  
  138.  
  139. **************************************
  140. *                                    *
  141. *                TAGS                *
  142. *                                    *
  143. **************************************
  144.  
  145. RT_TagBase        equ     TAG_USER
  146.  
  147. *** tags understood by most requester functions ***
  148. *
  149. * optional pointer to window
  150. RT_Window        equ     (RT_TagBase+1)
  151. * idcmp flags requester should abort on (useful for IDCMP_DISKINSERTED)
  152. RT_IDCMPFlags        equ     (RT_TagBase+2)
  153. * position of requester window (see below) - default REQPOS_POINTER
  154. RT_ReqPos        equ     (RT_TagBase+3)
  155. * leftedge offset of requester relative to position specified by RT_ReqPos
  156. RT_LeftOffset        equ     (RT_TagBase+4)
  157. * topedge offset of requester relative to position specified by RT_ReqPos
  158. RT_TopOffset        equ     (RT_TagBase+5)
  159. * name of public screen to put requester on (use on Kickstart 2.0 only!)
  160. RT_PubScrName        equ     (RT_TagBase+6)
  161. * address of screen to put requester on
  162. RT_Screen        equ     (RT_TagBase+7)
  163. * additional signal mask to wait on
  164. RT_ReqHandler        equ     (RT_TagBase+8)
  165. * font to use when screen font is rejected, _MUST_ be fixed-width font!
  166. * (struct TextFont *, not struct TextAttr *!)
  167. * - default GfxBase->DefaultFont
  168. RT_DefaultFont        equ     (RT_TagBase+9)
  169. * boolean to set the standard wait pointer in window - default FALSE
  170. RT_WaitPointer        equ     (RT_TagBase+10)
  171.  
  172. *** tags specific to rtEZRequestA ***
  173. *
  174. * title of requester window - default "Request" or "Information"
  175. RTEZ_ReqTitle        equ     (RT_TagBase+20)
  176. * (RT_TagBase+21) reserved
  177. * various flags (see below)
  178. RTEZ_Flags        equ     (RT_TagBase+22)
  179. * default response (activated by pressing RETURN) - default TRUE
  180. RTEZ_DefaultResponse    equ     (RT_TagBase+23)
  181.  
  182. *** tags specific to rtNewGetLongA ***
  183. *
  184. * minimum allowed value - default MININT
  185. RTGL_Min        equ     (RT_TagBase+30)
  186. * maximum allowed value - default MAXINT
  187. RTGL_Max        equ     (RT_TagBase+31)
  188. * suggested width of requester window (in pixels)
  189. RTGL_Width        equ     (RT_TagBase+32)
  190. * boolean to show the default value - default TRUE
  191. RTGL_ShowDefault    equ     (RT_TagBase+33)
  192.  
  193. *** tags specific to rtNewGetStringA ***
  194. *
  195. * suggested width of requester window (in pixels)
  196. RTGS_Width        equ     RTGL_Width
  197. * allow empty string to be accepted - default FALSE
  198. RTGS_AllowEmpty        equ     (RT_TagBase+80)
  199.  
  200. *** tags specific to rtFileRequestA ***
  201. *
  202. * various flags (see below)
  203. RTFI_Flags        equ     (RT_TagBase+40)
  204. * suggested height of file requester
  205. RTFI_Height        equ     (RT_TagBase+41)
  206. * replacement text for 'Ok' gadget (max 6 chars)
  207. RTFI_OkText        equ     (RT_TagBase+42)
  208.  
  209. *** tags specific to rtFontRequestA ***
  210. *
  211. * various flags (see below)
  212. RTFO_Flags        equ     RTFI_Flags
  213. * suggested height of font requester
  214. RTFO_Height        equ     RTFI_Height
  215. * replacement text for 'Ok' gadget (max 6 chars)
  216. RTFO_OkText        equ     RTFI_OkText
  217. * suggested height of font sample display - default 24
  218. RTFO_SampleHeight    equ     (RT_TagBase+60)
  219. * minimum height of font displayed
  220. RTFO_MinHeight        equ     (RT_TagBase+61)
  221. * maximum height of font displayed
  222. RTFO_MaxHeight        equ     (RT_TagBase+62)
  223. * [(RT_TagBase+63) to (RT_TagBase+66) used below]
  224.  
  225. *** tags for rtChangeReqAttrA ***
  226. *
  227. * file requester - set directory
  228. RTFI_Dir        equ     (RT_TagBase+50)
  229. * file requester - set wildcard pattern
  230. RTFI_MatchPat        equ     (RT_TagBase+51)
  231. * file requester - add a file or directory to the buffer
  232. RTFI_AddEntry        equ     (RT_TagBase+52)
  233. * file requester - remove a file or directory from the buffer
  234. RTFI_RemoveEntry    equ     (RT_TagBase+53)
  235. * font requester - set font name of selected font
  236. RTFO_FontName        equ     (RT_TagBase+63)
  237. * font requester - set font size
  238. RTFO_FontHeight        equ     (RT_TagBase+64)
  239. * font requester - set font style
  240. RTFO_FontStyle        equ     (RT_TagBase+65)
  241. * font requester - set font flags
  242. RTFO_FontFlags        equ     (RT_TagBase+66)
  243.  
  244. *** tags for rtPaletteRequestA ***
  245. *
  246. * initially selected color - default 1
  247. RTPA_Color        equ     (RT_TagBase+70)
  248.  
  249. *** tags for rtReqHandlerA ***
  250. *
  251. * end requester by software control, set tagdata to REQ_CANCEL, REQ_OK or
  252. * in case of rtEZRequest to the return value
  253. RTRH_EndRequest        equ     (RT_TagBase+60)
  254.  
  255. *** tags for rtAllocRequestA ***
  256. * no tags defined yet
  257.  
  258.  
  259. *************
  260. * RT_ReqPos *
  261. *************
  262. REQPOS_POINTER        equ     0
  263. REQPOS_CENTERWIN    equ     1
  264. REQPOS_CENTERSCR    equ     2
  265. REQPOS_TOPLEFTWIN    equ     3
  266. REQPOS_TOPLEFTSCR    equ     4
  267.  
  268. *******************
  269. * RTRH_EndRequest *
  270. *******************
  271. REQ_CANCEL        equ     0
  272. REQ_OK            equ     1
  273.  
  274. ****************************************
  275. * flags for RTFI_Flags and RTFO_Flags  *
  276. * or filereq->Flags and fontreq->Flags *
  277. ****************************************
  278.    BITDEF FREQ,NOBUFFER,2
  279.    BITDEF FREQ,DOWILDFUNC,11
  280.  
  281. ******************************************
  282. * flags for RTFI_Flags or filereq->Flags *
  283. ******************************************
  284.    BITDEF FREQ,MULTISELECT,0
  285.    BITDEF FREQ,SAVE,1
  286.    BITDEF FREQ,NOFILES,3
  287.    BITDEF FREQ,PATGAD,4
  288.    BITDEF FREQ,SELECTDIRS,12
  289.  
  290. ******************************************
  291. * flags for RTFO_Flags or fontreq->Flags *
  292. ******************************************
  293.    BITDEF FREQ,FIXEDWIDTH,5
  294.    BITDEF FREQ,COLORFONTS,6
  295.    BITDEF FREQ,CHANGEPALETTE,7
  296.    BITDEF FREQ,LEAVEPALETTE,8
  297.    BITDEF FREQ,SCALE,9
  298.    BITDEF FREQ,STYLE,10
  299.  
  300. ******************************************
  301. * flags for RTEZ_Flags or reqinfo->Flags *
  302. ******************************************
  303.    BITDEF EZREQ,NORETURNKEY,0
  304.    BITDEF EZREQ,LAMIGAQUAL,1
  305.    BITDEF EZREQ,CENTERTEXT,2
  306.  
  307. *********
  308. * hooks *
  309. *********
  310. REQHOOK_WILDFILE    equ     0
  311. REQHOOK_WILDFONT    equ     1
  312.  
  313.    ENDC ; LIBRARIES_REQTOOLS_I
  314.