home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / libs / reqtool.lha / ReqTools / include / libraries / reqtools.i < prev   
Encoding:
Text File  |  1992-07-24  |  15.4 KB  |  505 lines

  1.     IFND LIBRARIES_REQTOOLS_I
  2. LIBRARIES_REQTOOLS_I SET 1
  3. **
  4. **    $Filename: libraries/reqtools.i $
  5. **    $Release: 2.0 $
  6. **    $Revision: 38.5 $
  7. **
  8. **    reqtools.library definitions
  9. **
  10. **    (C) Copyright 1991/1992 Nico Franτois
  11. **    All Rights Reserved
  12. **
  13.  
  14.    IFND EXEC_LISTS_I
  15.    include "exec/lists.i"
  16.    ENDC
  17.  
  18.    IFND EXEC_LIBRARIES_I
  19.    include "exec/libraries.i"
  20.    ENDC
  21.  
  22.    IFND GRAPHICS_TEXT_I
  23.    include "graphics/text.i"
  24.    ENDC
  25.  
  26.    IFND UTILITY_TAGITEM_I
  27.    include "utility/tagitem.i"
  28.    ENDC
  29.  
  30. REQTOOLSNAME   MACRO
  31.    dc.b "reqtools.library",0
  32.    ENDM
  33.  
  34. REQTOOLSVERSION        equ     38
  35.  
  36.    STRUCTURE ReqToolsBase,LIB_SIZE
  37.       UBYTE  rt_RTFlags
  38.       STRUCT rt_pad,3
  39.       ULONG  rt_SegList
  40.       * The following library bases may be read and used by your program
  41.       APTR   rt_IntuitionBase
  42.       APTR   rt_GfxBase
  43.       APTR   rt_DOSBase
  44.       * Next two library bases are only (and always) valid on Kickstart 2.0!
  45.       * (1.3 version of reqtools also initializes these when run on 2.0)
  46.       APTR   rt_GadToolsBase
  47.       APTR   rt_UtilityBase
  48.       LABEL  ReqToolsBase_SIZE
  49.  
  50. * types of requesters, for rtAllocRequestA()
  51. RT_FILEREQ        equ     0
  52. RT_REQINFO        equ     1
  53. RT_FONTREQ        equ     2
  54. RT_SCREENMODEREQ    equ     3
  55.  
  56. ************************
  57. *                      *
  58. *    File requester    *
  59. *                      *
  60. ************************
  61.  
  62. * structure _MUST_ be allocated with rtAllocRequest()
  63.  
  64.    STRUCTURE rtFileRequester,0
  65.       ULONG rtfi_ReqPos
  66.       UWORD rtfi_LeftOffset
  67.       UWORD rtfi_TopOffset
  68.       ULONG rtfi_Flags
  69.       ULONG rtfi_private1
  70.       APTR  rtfi_Dir        * READ ONLY! Change with rtChangeReqAttrA()!
  71.       APTR  rtfi_MatchPat    * READ ONLY! Change with rtChangeReqAttrA()!
  72.       APTR  rtfi_DefaultFont
  73.       ULONG rtfi_WaitPointer
  74.       * (V38) *
  75.       ULONG rtfi_LockWindow
  76.       ULONG rtfi_ShareIDCMP
  77.       UWORD rtfi_reserved1
  78.       UWORD rtfi_reserved2
  79.       UWORD rtfi_reserved3
  80.       UWORD rtfi_ReqHeight    * READ ONLY!  Use RTFI_Height tag!
  81.       * Lots of private data follows! HANDS OFF :-)
  82.  
  83. * returned by rtFileRequestA() if multiselect is enabled,
  84. * free list with rtFreeFileList()
  85.  
  86.    STRUCTURE rtFileList,0
  87.       APTR  rtfl_Next
  88.       ULONG rtfl_StrLen
  89.       APTR  rtfl_Name
  90.       LABEL rtFileList_SIZE
  91.  
  92. * structure passed to RTFI_FilterFunc callback hook by
  93. * volume requester (see RTFI_VolumeRequest tag)
  94.  
  95.    STRUCTURE rtVolumeEntry,0
  96.       ULONG rtve_Type        * DLT_DEVICE or DLT_DIRECTORY
  97.       APTR  rtve_Name
  98.       LABEL rtVolumeEntry_SIZE
  99.  
  100. ************************
  101. *                      *
  102. *    Font requester    *
  103. *                      *
  104. ************************
  105.  
  106. * structure _MUST_ be allocated with rtAllocRequest()
  107.  
  108.    STRUCTURE rtFontRequester,0
  109.       ULONG  rtfo_ReqPos
  110.       UWORD  rtfo_LeftOffset
  111.       UWORD  rtfo_TopOffset
  112.       ULONG  rtfo_Flags
  113.       APTR   rtfo_private1
  114.       STRUCT rtfo_Attr,ta_SIZEOF * READ ONLY!
  115.       APTR   rtfo_DefaultFont
  116.       ULONG  rtfo_WaitPointer
  117.       * (V38) *
  118.       ULONG  rtfo_LockWindow
  119.       ULONG  rtfo_ShareIDCMP
  120.       UWORD  rtfo_reserved1
  121.       UWORD  rtfo_reserved2
  122.       UWORD  rtfo_reserved3
  123.       UWORD  rtfo_ReqHeight    * READ ONLY!  Use RTFO_Height tag!
  124.       * Lots of private data follows! HANDS OFF :-)
  125.  
  126. **************************
  127. *                        *
  128. *  ScreenMode requester  *
  129. *                        *
  130. **************************
  131.  
  132. * structure _MUST_ be allocated with rtAllocRequest()
  133.  
  134.    STRUCTURE rtScreenModeRequester,0
  135.       ULONG rtsc_ReqPos
  136.       UWORD rtsc_LeftOffset
  137.       UWORD rtsc_TopOffset
  138.       ULONG rtsc_Flags
  139.       APTR  rtsc_private1
  140.       *
  141.       ULONG rtsc_DisplayID    * READ ONLY!
  142.       UWORD rtsc_DisplayWidth    * READ ONLY!
  143.       UWORD rtsc_DisplayHeight    * READ ONLY!
  144.       *
  145.       APTR  rtsc_DefaultFont
  146.       ULONG rtsc_WaitPointer
  147.       ULONG rtsc_LockWindow
  148.       ULONG rtsc_ShareIDCMP
  149.       UWORD rtsc_reserved1
  150.       UWORD rtsc_reserved2
  151.       UWORD rtsc_reserved3
  152.       UWORD rtsc_ReqHeight    * READ ONLY!  Use RTSC_Height tag!
  153.       *
  154.       UWORD rtsc_DisplayDepth    * READ ONLY!
  155.       UWORD rtsc_OverscanType    * READ ONLY!
  156.       ULONG rtsc_AutoScroll    * READ ONLY!
  157.       * Lots of private data follows! HANDS OFF :-)
  158.  
  159. ************************
  160. *                      *
  161. *    Requester Info    *
  162. *                      *
  163. ************************
  164.  
  165. * for rtEZRequestA(), rtGetLongA(), rtGetStringA() and rtPaletteRequestA(),
  166. * _MUST_ be allocated with rtAllocRequest()
  167.  
  168.    STRUCTURE rtReqInfo,0
  169.       ULONG rtri_ReqPos
  170.       UWORD rtri_LeftOffset
  171.       UWORD rtri_TopOffset
  172.       ULONG rtri_Width         * not for rtEZRequestA()
  173.       APTR  rtri_ReqTitle     * currently only for rtEZRequestA()
  174.       ULONG rtri_Flags
  175.       APTR  rtri_DefaultFont     * currently only for rtPaletteRequestA()
  176.       ULONG rtri_WaitPointer
  177.       * (V38) *
  178.       ULONG rtri_LockWindow
  179.       ULONG rtri_ShareIDCMP
  180.       ULONG rtri_IntuiMsgFunc
  181.       * structure may be extended in future
  182.  
  183. ************************
  184. *                      *
  185. *     Handler Info     *
  186. *                      *
  187. ************************
  188.  
  189. * for rtReqHandlerA(), will be allocated for you when you use
  190. * the RT_ReqHandler tag, never try to allocate this yourself!
  191.  
  192.    STRUCTURE rtHandlerInfo,4    * first longword is private!
  193.       ULONG rthi_WaitMask
  194.       ULONG rthi_DoNotWait
  195.       * Private data follows, HANDS OFF :-)
  196.  
  197. * possible return codes from rtReqHandlerA()
  198.  
  199. CALL_HANDLER        equ     $80000000
  200.  
  201.  
  202. **************************************
  203. *                                    *
  204. *                TAGS                *
  205. *                                    *
  206. **************************************
  207.  
  208. RT_TagBase        equ     TAG_USER
  209.  
  210. *** tags understood by most requester functions ***
  211. *
  212. * optional pointer to window
  213. RT_Window        equ     (RT_TagBase+1)
  214. * idcmp flags requester should abort on (useful for IDCMP_DISKINSERTED)
  215. RT_IDCMPFlags        equ     (RT_TagBase+2)
  216. * position of requester window (see below) - default REQPOS_POINTER
  217. RT_ReqPos        equ     (RT_TagBase+3)
  218. * leftedge offset of requester relative to position specified by RT_ReqPos
  219. RT_LeftOffset        equ     (RT_TagBase+4)
  220. * topedge offset of requester relative to position specified by RT_ReqPos
  221. RT_TopOffset        equ     (RT_TagBase+5)
  222. * name of public screen to put requester on (use on Kickstart 2.0 only!)
  223. RT_PubScrName        equ     (RT_TagBase+6)
  224. * address of screen to put requester on
  225. RT_Screen        equ     (RT_TagBase+7)
  226. * additional signal mask to wait on
  227. RT_ReqHandler        equ     (RT_TagBase+8)
  228. * font to use when screen font is rejected, _MUST_ be fixed-width font!
  229. * (struct TextFont *, not struct TextAttr *!)
  230. * - default GfxBase->DefaultFont
  231. RT_DefaultFont        equ     (RT_TagBase+9)
  232. * boolean to set the standard wait pointer in window - default FALSE
  233. RT_WaitPointer        equ     (RT_TagBase+10)
  234. * (V38) char preceding keyboard shortcut characters (will be underlined)
  235. RT_Underscore        equ     (RT_TagBase+11)
  236. * (V38) share IDCMP port with window - default FALSE
  237. RT_ShareIDCMP        equ     (RT_TagBase+12)
  238. * (V38) lock window and set standard wait pointer - default FALSE
  239. RT_LockWindow        equ     (RT_TagBase+13)
  240. * (V38) boolean to make requester's screen pop to front - default TRUE
  241. RT_ScreenToFront    equ     (RT_TagBase+14)
  242. * (V38) Requester should use this font - default: screen font
  243. RT_TextAttr        equ     (RT_TagBase+15)
  244. * (V38) call this hook for every IDCMP message not for requester
  245. RT_IntuiMsgFunc        equ     (RT_TagBase+16)
  246. * (V38) Locale ReqTools should use for text
  247. RT_Locale        equ     (RT_TagBase+17)
  248.  
  249. *** tags specific to rtEZRequestA ***
  250. *
  251. * title of requester window - english default "Request" or "Information"
  252. RTEZ_ReqTitle        equ     (RT_TagBase+20)
  253. * (RT_TagBase+21) reserved
  254. * various flags (see below)
  255. RTEZ_Flags        equ     (RT_TagBase+22)
  256. * default response (activated by pressing RETURN) - default TRUE
  257. RTEZ_DefaultResponse    equ     (RT_TagBase+23)
  258.  
  259. *** tags specific to rtGetLongA ***
  260. *
  261. * minimum allowed value - default MININT
  262. RTGL_Min        equ     (RT_TagBase+30)
  263. * maximum allowed value - default MAXINT
  264. RTGL_Max        equ     (RT_TagBase+31)
  265. * suggested width of requester window (in pixels)
  266. RTGL_Width        equ     (RT_TagBase+32)
  267. * boolean to show the default value - default TRUE
  268. RTGL_ShowDefault    equ     (RT_TagBase+33)
  269. * (V38) string with possible responses - english default " _Ok |_Cancel"
  270. RTGL_GadFmt         equ     (RT_TagBase+34)
  271. * (V38) optional arguments for RTGL_GadFmt
  272. RTGL_GadFmtArgs        equ     (RT_TagBase+35)
  273. * (V38) invisible typing - default FALSE
  274. RTGL_Invisible        equ     (RT_TagBase+36)
  275. * (V38) window backfill - default TRUE
  276. RTGL_BackFill        equ     (RT_TagBase+37)
  277. * (V38) optional text above gadget
  278. RTGL_TextFmt        equ     (RT_TagBase+38)
  279. * (V38) optional arguments for RTGS_TextFmt
  280. RTGL_TextFmtArgs    equ     (RT_TagBase+39)
  281. * (V38) Center text - default FALSE
  282. RTGL_CenterText        equ     (RT_TagBase+100)
  283. * (V38) various flags (see below)
  284. RTGL_Flags        equ     RTEZ_Flags
  285.  
  286. *** tags specific to rtGetStringA ***
  287. *
  288. * suggested width of requester window (in pixels)
  289. RTGS_Width        equ     RTGL_Width
  290. * allow empty string to be accepted - default FALSE
  291. RTGS_AllowEmpty        equ     (RT_TagBase+80)
  292. * (V38) string with possible responses - english default " _Ok |_Cancel"
  293. RTGS_GadFmt         equ     RTGL_GadFmt
  294. * (V38) optional arguments for RTGS_GadFmt
  295. RTGS_GadFmtArgs        equ     RTGL_GadFmtArgs
  296. * (V38) invisible typing - default FALSE
  297. RTGS_Invisible        equ     RTGL_Invisible
  298. * (V38) window backfill - default TRUE
  299. RTGS_BackFill        equ     RTGL_BackFill
  300. * (V38) optional text above gadget
  301. RTGS_TextFmt        equ     RTGL_TextFmt
  302. * (V38) optional arguments for RTGS_TextFmt
  303. RTGS_TextFmtArgs    equ     RTGL_TextFmtArgs
  304. * (V38) Center text - default FALSE
  305. RTGS_CenterText        equ     RTGL_CenterText
  306. * (V38) various flags (see below)
  307. RTGS_Flags        equ     RTEZ_Flags
  308.  
  309. *** tags specific to rtFileRequestA ***
  310. *
  311. * various flags (see below)
  312. RTFI_Flags        equ     (RT_TagBase+40)
  313. * suggested height of file requester
  314. RTFI_Height        equ     (RT_TagBase+41)
  315. * replacement text for 'Ok' gadget (max 6 chars)
  316. RTFI_OkText        equ     (RT_TagBase+42)
  317. * (V38) bring up volume requester, tag data holds flags (see below)
  318. RTFI_VolumeRequest    equ     (RT_TagBase+43)
  319. * (V38) call this hook for every file in the directory
  320. RTFI_FilterFunc        equ     (RT_TagBase+44)
  321. * (V38) allow empty file to be accepted - default FALSE
  322. RTFI_AllowEmpty        equ     (RT_TagBase+45)
  323.  
  324. *** tags specific to rtFontRequestA ***
  325. *
  326. * various flags (see below)
  327. RTFO_Flags        equ     RTFI_Flags
  328. * suggested height of font requester
  329. RTFO_Height        equ     RTFI_Height
  330. * replacement text for 'Ok' gadget (max 6 chars)
  331. RTFO_OkText        equ     RTFI_OkText
  332. * suggested height of font sample display - default 24
  333. RTFO_SampleHeight    equ     (RT_TagBase+60)
  334. * minimum height of font displayed
  335. RTFO_MinHeight        equ     (RT_TagBase+61)
  336. * maximum height of font displayed
  337. RTFO_MaxHeight        equ     (RT_TagBase+62)
  338. * [(RT_TagBase+63) to (RT_TagBase+66) used below]
  339. * (V38) call this hook for every font
  340. RTFO_FilterFunc        equ     RTFI_FilterFunc
  341.  
  342. *** (V38) tags for rtScreenModeRequestA ***
  343. * various flags (see below) 
  344. RTSC_Flags        equ     RTFI_Flags
  345. * suggested height of screenmode requester
  346. RTSC_Height        equ     RTFI_Height
  347. * replacement text for 'Ok' gadget (max 6 chars)
  348. RTSC_OkText        equ     RTFI_OkText
  349. * property flags (see also RTSC_PropertyMask)
  350. RTSC_PropertyFlags    equ     (RT_TagBase+90)
  351. * property mask - default all bits in RTSC_PropertyFlags considered
  352. RTSC_PropertyMask    equ     (RT_TagBase+91)
  353. * minimum display width allowed
  354. RTSC_MinWidth        equ     (RT_TagBase+92)
  355. * maximum display width allowed
  356. RTSC_MaxWidth        equ     (RT_TagBase+93)
  357. * minimum display height allowed
  358. RTSC_MinHeight        equ     (RT_TagBase+94)
  359. * maximum display height allowed
  360. RTSC_MaxHeight        equ     (RT_TagBase+95)
  361. * minimum display depth allowed
  362. RTSC_MinDepth        equ     (RT_TagBase+96)
  363. * maximum display depth allowed
  364. RTSC_MaxDepth        equ     (RT_TagBase+97)
  365. * call this hook for every display mode id
  366. RTSC_FilterFunc        equ     RTFI_FilterFunc
  367.  
  368. *** tags for rtChangeReqAttrA ***
  369. *
  370. * file requester - set directory
  371. RTFI_Dir        equ     (RT_TagBase+50)
  372. * file requester - set wildcard pattern
  373. RTFI_MatchPat        equ     (RT_TagBase+51)
  374. * file requester - add a file or directory to the buffer
  375. RTFI_AddEntry        equ     (RT_TagBase+52)
  376. * file requester - remove a file or directory from the buffer
  377. RTFI_RemoveEntry    equ     (RT_TagBase+53)
  378. * font requester - set font name of selected font
  379. RTFO_FontName        equ     (RT_TagBase+63)
  380. * font requester - set font size
  381. RTFO_FontHeight        equ     (RT_TagBase+64)
  382. * font requester - set font style
  383. RTFO_FontStyle        equ     (RT_TagBase+65)
  384. * font requester - set font flags
  385. RTFO_FontFlags        equ     (RT_TagBase+66)
  386. * (V38) screenmode requester - get display attributes from screen
  387. RTSC_ModeFromScreen    equ     (RT_TagBase+80)
  388. * (V38) screenmode requester - set display mode id (32-bit extended)
  389. RTSC_DisplayID        equ     (RT_TagBase+81)
  390. * (V38) screenmode requester - set display width
  391. RTSC_DisplayWidth    equ     (RT_TagBase+82)
  392. * (V38) screenmode requester - set display height
  393. RTSC_DisplayHeight    equ     (RT_TagBase+83)
  394. * (V38) screenmode requester - set display depth
  395. RTSC_DisplayDepth    equ     (RT_TagBase+84)
  396. * (V38) screenmode requester - set overscan type, 0 for regular size
  397. RTSC_OverscanType    equ     (RT_TagBase+85)
  398. * (V38) screenmode requester - set autoscroll
  399. RTSC_AutoScroll        equ     (RT_TagBase+86)
  400.  
  401. *** tags for rtPaletteRequestA ***
  402. *
  403. * initially selected color - default 1
  404. RTPA_Color        equ     (RT_TagBase+70)
  405.  
  406. *** tags for rtReqHandlerA ***
  407. *
  408. * end requester by software control, set tagdata to REQ_CANCEL, REQ_OK or
  409. * in case of rtEZRequest to the return value
  410. RTRH_EndRequest        equ     (RT_TagBase+60)
  411.  
  412. *** tags for rtAllocRequestA ***
  413. * no tags defined yet
  414.  
  415.  
  416. *************
  417. * RT_ReqPos *
  418. *************
  419. REQPOS_POINTER        equ     0
  420. REQPOS_CENTERWIN    equ     1
  421. REQPOS_CENTERSCR    equ     2
  422. REQPOS_TOPLEFTWIN    equ     3
  423. REQPOS_TOPLEFTSCR    equ     4
  424.  
  425. *******************
  426. * RTRH_EndRequest *
  427. *******************
  428. REQ_CANCEL        equ     0
  429. REQ_OK            equ     1
  430.  
  431. ****************************************
  432. * flags for RTFI_Flags and RTFO_Flags  *
  433. * or filereq->Flags and fontreq->Flags *
  434. ****************************************
  435.    BITDEF FREQ,NOBUFFER,2
  436.  
  437. ******************************************
  438. * flags for RTFI_Flags or filereq->Flags *
  439. ******************************************
  440.    BITDEF FREQ,MULTISELECT,0
  441.    BITDEF FREQ,SAVE,1
  442.    BITDEF FREQ,NOFILES,3
  443.    BITDEF FREQ,PATGAD,4
  444.    BITDEF FREQ,SELECTDIRS,12
  445.  
  446. ******************************************
  447. * flags for RTFO_Flags or fontreq->Flags *
  448. ******************************************
  449.    BITDEF FREQ,FIXEDWIDTH,5
  450.    BITDEF FREQ,COLORFONTS,6
  451.    BITDEF FREQ,CHANGEPALETTE,7
  452.    BITDEF FREQ,LEAVEPALETTE,8
  453.    BITDEF FREQ,SCALE,9
  454.    BITDEF FREQ,STYLE,10
  455.  
  456. ******************************************************
  457. * (V38) flags for RTSC_Flags or screenmodereq->Flags *
  458. ******************************************************
  459.    BITDEF SCREQ,SIZEGADS,13
  460.    BITDEF SCREQ,DEPTHGAD,14
  461.    BITDEF SCREQ,NONSTDMODES,15
  462.    BITDEF SCREQ,GUIMODES,16
  463.    BITDEF SCREQ,AUTOSCROLLGAD,18
  464.    BITDEF SCREQ,OVERSCANGAD,19
  465.  
  466. ******************************************
  467. * flags for RTEZ_Flags or reqinfo->Flags *
  468. ******************************************
  469.    BITDEF EZREQ,NORETURNKEY,0
  470.    BITDEF EZREQ,LAMIGAQUAL,1
  471.    BITDEF EZREQ,CENTERTEXT,2
  472.  
  473. ************************************************
  474. * (V38) flags for RTGL_Flags or reqinfo->Flags *
  475. ************************************************
  476.    BITDEF GLREQ,CENTERTEXT,EZREQB_CENTERTEXT
  477.    BITDEF GLREQ,HIGHLIGHTTEXT,3
  478.  
  479. ************************************************
  480. * (V38) flags for RTGS_Flags or reqinfo->Flags *
  481. ************************************************
  482.    BITDEF GSREQ,CENTERTEXT,EZREQB_CENTERTEXT
  483.    BITDEF GSREQ,HIGHLIGHTTEXT,GLREQB_HIGHLIGHTTEXT
  484.  
  485. ******************************************
  486. * (V38) flags for RTFI_VolumeRequest tag *
  487. ******************************************
  488.    BITDEF VREQ,NOASSIGNS,0
  489.    BITDEF VREQ,NODISKS,1
  490.    BITDEF VREQ,ALLDISKS,2
  491.  
  492. *
  493. *  Following things are obsolete in ReqTools V38.
  494. *  DON'T USE THESE IN NEW CODE!
  495. *
  496.  IFND NO_REQTOOLS_OBSOLETE
  497. rtfi_Hook equ rtfi_private1
  498. rtfo_Hook equ rtfo_private1
  499. REQHOOK_WILDFILE equ 0
  500. REQHOOK_WILDFONT equ 1
  501.  BITDEF FREQ,DOWILDFUNC,11
  502.  ENDC
  503.  
  504.    ENDC ; LIBRARIES_REQTOOLS_I
  505.