Skip to content

rireqlib

This library opens the file and colour requesters of req.library, a third-party requester library that is not part of AmigaOS; the port is tested with req.library 2.8 from Aminet. The library opens req.library when the program starts and has it free the file requester’s cached directory when the program ends. Without req.library, no requester opens, and the commands return what they return when the user cancels: ReqFileRequest an empty string, ReqColour 65535. ReqFileLoc is 0 then.

ReqOutput chooses the window that both requesters appear on, ReqFlags the flags of the file requester. The file requester can only be used in Amiga mode. ReqFileRequest returns the path of the file the user chose, and ReqColour starts on the colour it is given and returns the colour the user chose.

The fixed bugs of the library are listed in Fixes in rireqlib.

Based on the RI Req Library guide by Steven Matty.

Library number 79.

Commands

ReqColour

Opens the colour requester of req.library on the window of ReqOutput, starting on the colour colour, and returns the colour the user chose, or 65535 if the user cancels.

Function, result .l. Help text: (colour)
Arguments: .l

Without req.library it returns 65535, as on cancel.

ReqFileLoc

The address of the library’s path buffer of 320 bytes, whose contents ReqFileRequest returns. 0 if req.library or the memory for the buffers was missing.

Function, result .l. No help text.
No arguments.

ReqFileRequest

Opens the file requester of req.library and returns the path of the file the user chose, or an empty string if the user cancels. title$ is the text of the title bar, flags the flags of the requester; without flags, the last setting is used.

Function, result $. Help text: ([title$][,flags])
3 forms:

  • no arguments
  • $
  • $, .l

Amiga mode only. The path is the one in the library’s path buffer at ReqFileLoc. flags stay set for later calls, as with ReqFlags; the title is for this call only. Without req.library the result is an empty string.

ReqFlags

Sets the flags of the file requester for all later calls of ReqFileRequest.

Statement. Help text: flags
Arguments: .l

The flags are those of req.library, one bit each:

BitValueEffect
0%1shows .info files
1%10allows extended select
2%100caches directories
3%1000makes it a font requester
4%10000adds the gadget that hides .info files
5%100000hides the show and hide wildcard gadgets
6%1000000uses absolute positions
7%10000000purges the cache when a directory changes
8%100000000caches only complete directories
9%1000000000does not sort
10%10000000000leaves out the drag bar and depth gadgets
11%100000000000selects a file to save
12%1000000000000selects files to load
13%10000000000000lets the user select a directory

The flags at the start are %10010100: directory caching, the gadget that hides .info files, and the purge of the cache when a directory changes.

ReqOutput

Makes the requesters of the library appear on the window with the number given.

Statement. Help text: windowptr
Arguments: .l

Without it, the requesters are given no window. Each run of the program starts without a window, also a second run from the editor.