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