[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

A requester always passes three parameters to your custom hook function:

    ULONG MyHookFunc(ULONG type, CPTR object, CPTR AslRequester)

If MyHookFunc() is called from a file requester doing _DOWILDFUNC, the
three parameters are:


    type = FILF_DOWILDFUNC

    object = pointer to an AnchorPath structure (from <dos/dosasl.h>)

    AslRequester = pointer to the FileRequester that called the hook
                   function (Return a zero to display this file)


The AnchorPath structure is a dos.library structure used in pattern
matching.  Refer to the AmigaDOS Manual, 3rd Edition by Bantam Books for
more information.

If MyHookFunc() is called from a font requester doing _DOWILDFUNC, the
three parameters are:


    type = FONF_DOWILDFUNC

    object = pointer to a TextAttr structure (from <graphics/text.h>)

    AslRequester = pointer to the FontRequester that called the hook
                   function (Return non-zero to display this particular
                   font size)


If MyHookFunc() is called from a file or font requester doing _DOMSGFUNC,
the three parameters are:


    type = FILF_DOMSGFUNC (file requester) or FONF_DOMSGFUNC (font
           requester)

    object = pointer to the IntuiMessage for the function to process

    AslRequester = pointer to the FileRequester or FontRequester that
                   called the hook function (Return a pointer to the
                   IntuiMessage)


Notice that it is possible for a requester to use both _DOWILDFUNC and
_DOMSGFUNC at the same time.  Your hook function has to differentiate
between the two cases by testing the type passed to it.  It is not
possible for a font and file requester to share a hook function for a
_DOWILDFUNC, because FILF_DOWILDFUNC is defined to be the same value as
FONF_DOWILDFUNC, so the hook function cannot tell if the object (from the
prototype above) is a pointer to an AnchorPath structure or a pointer to a
TextAttr structure.  It is possible for font and file requesters to share
one hook function for _DOMSGFUNC (even though FILF_DOMSGFUNC and
FONF_DOMSGFUNC are equal) because, in this case, font and file requesters
both call your hook function in the same manner.