APTR handle = OpenDir(STRPTR name, int mode, struct hwTagList *tags);
OpenDir()
implementation
has to check whether your plugin wants to handle this directory or not. If your plugin
wants to handle this directory, your OpenDir()
implementation needs to open it and return
a handle back to Hollywood. Otherwise OpenDir()
must return NULL
. The handle returned by
this function is an opaque data type only your plugin knows about. Hollywood will pass this
handle to you whenever it wants to get the next object from this directory.
The mode
argument is currently unused.
The tag list that Hollywood may pass to OpenDir()
can contain the following items:
HWOPENDIRTAG_USERTAGS:
pData
will point to a struct hwUserTagList
containing
a list of user tags passed by the Hollywood script. User tags are a way of
passing additional information from Hollywood scripts to plugin functions.
See User tags for details. (V10.0)
HWOPENDIRTAG_FORMAT:
pData
will point
to a pointer to a string pointer, i.e. STRPTR*
. Your plugin can set pData
to a null-terminated string containing a format description of the directory. Hollywood scripts
will then be able to get this format name by querying the #ATTRFORMAT
attribute on #DIRECTORY
.
Note that the string pointer you write to pData
must stay valid for as long as the
directory is open. (V10.0)
NULL
NULL
if your plugin
doesn't want to handle this directory