int error = FileRequest(APTR handle, STRPTR title, ULONG flags, STRPTR *result, struct hwTagList *tags);
NULL
to the result
string pointer.
The flags
and tags
parameters are used to control the appearance of the file requester. The following
flags are currently defined:
HWFILEREQFLAGS_MULTISELECT:
result
parameter has to be a list of fully
qualified paths to files. The individual filenames are separated from one another by a single NULL
terminator byte whereas the complete list is terminated by two NULL
terminator bytes to signal the
list end to Hollywood. This flag cannot be combined with HWFILEREQFLAGS_SAVEMODE
.
HWFILEREQFLAGS_SAVEMODE:
HWFILEREQFLAGS_MULTISELECT
.
Hollywood also passes a taglist to this function. Your implementation has to handle the following tags:
HWFILEREQTAG_FROMSCRIPT:
iData
member of this tag item is set to True
if Hollywood has called you
while the script is running. This might be important to know because requesters
should not block window refresh so you might want to setup a temporary modal
event loop if this tag has been set to True
to enable your display to stay
responsive.
HWFILEREQTAG_EXTENSIONS:
pData
member of this tag item is set to a string that
contains a list of file extensions that should be shown. The individual extensions
do not contain a dot and are separated by a vertical bar character (|), for
example "jpg|jpeg|png|bmp|gif|lbm|ilbm".
HWFILEREQTAG_DEFDRAWER:
pData
member of this tag item.
HWFILEREQTAG_DEFFILE:
pData
member of this
tag item.
HWFILEREQTAG_FILTERS:
FileRequest()
supports the declaration of
filter groups via an optional table argument. If a script passes such a
filter group to FileRequest()
, it will be forwarded to your plugin in
this tag item. The pData
member of the tag item will be set to a pointer
to a struct hwFileReqFilterInfo
containing the first item of
the filter group and a pointer to the next item.
The struct hwFileReqFilterInfo
looks like this:
struct hwFileReqFilterInfo { struct hwFileReqFilterInfo *Succ; STRPTR Description; STRPTR Filter; ULONG Flags; }; |
Here is a description of the structure members:
Succ:
NULL
for the tail node.
Description:
Filter:
Flags:
HWFILEREQFILTERFLAGS_HIDE:
(V9.0)
FileRequest()
is an optional API and must only be implemented if HWSRAFLAGS_FILEREQUEST
has been
passed to hw_SetRequesterAdapter(). See hw_SetRequesterAdapter for details.
NULL
if no display is openSTRPTR
pointer for storing the user's selection