PathRequest -- open a path requester (V6.0, optional)
int error = PathRequest(APTR handle, STRPTR title, ULONG flags,
                STRPTR *result, struct hwTagList *tags);
This function must open a path requester (also known as a browse folder dialog box) that prompts the user to select a path. The function must then return this path to Hollywood by setting the fourth parameter to a string pointer that your function has allocated. Hollywood will then call FreeRequest() on this string when it is done with it. If the user cancels the path requester, you have to write NULL to the result string pointer.

The flags and tags parameters are used to control the appearance of the path requester. The following flags are currently defined:

If this flag is set, Hollywood wants your requester to open in save mode, i.e. the user should select a path where files can be saved.

Hollywood also passes a taglist to this function. Your implementation has to handle the following tags:

The 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.

If this tag is set, Hollywood wants your requester to show this directory when it initially opens. The directory is passed as a string in the pData member of this tag item.

PathRequest() is an optional API and must only be implemented if HWSRAFLAGS_PATHREQUEST has been passed to hw_SetRequesterAdapter(). See hw_SetRequesterAdapter for details.

display handle or NULL if no display is open
title string for the requester's window
flags controlling the requester's appearance (see above)
STRPTR pointer for storing the user's selection
taglist for additional options (see above)
error code or 0 for success

Show TOC