int error = SystemRequest(APTR handle, STRPTR title, STRPTR body,
ULONG flags, int *result, struct hwTagList *tags);
body parameter to the user. The user then has to acknowledge
the requester by pressing a button. The flags parameter specifies which button(s)
should be shown and it also tells you whether or not there should be an icon the
requester. The following flags are currently defined:
HWSYSREQTYPE_OK:
HWSYSREQTYPE_OKCANCEL:
HWSYSREQTYPE_YESNO:
HWSYSREQTYPE_YESNOCANCEL:
HWSYSREQTYPE_CUSTOM:HWSYSREQTAG_CHOICES which contains the names
for the custom buttons.
HWSYSREQICON_NONE:
HWSYSREQICON_INFORMATION:
HWSYSREQICON_ERROR:
HWSYSREQICON_WARNING:
HWSYSREQICON_QUESTION:
Please note that all HWSYSREQTYPE_XXX and all HWSYSREQICON_XXX flags are mutually
exclusive. There will only be one flag from each group set.
Hollywood also passes a taglist to this function. Your implementation has to handle the following tags:
HWSYSREQTAG_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.
HWSYSREQTAG_CHOICES:HWSYSREQTYPE_CUSTOM flag has been set, the pData member of this tag item
contains a pointer to a string that contains the name(s) of one or more buttons.
If there is more than one button, the individual button names will be separated by
the vertical bar character (|). If this tag is provided, your implementation must
setup a custom requester that contains the buttons specified here.
Your SystemRequest() implementation has to write the id of the button that
has been pressed to the int pointer passed as the fifth parameter. The
right-most button always has the id 0. If there is only one button, it will
also have the id 0. The ids of the other buttons are counted from left to right
starting at 1. This arrangement has been chosen so that in case there are two
buttons like "OK|Cancel" or "Yes|No", the affirmative button's id will correspond
to True whereas the negative response button's id will correspond to False.
Note that Hollywood won't call FreeRequest() for this
requester type because SystemRequest() shouldn't have to allocate any resources.
SystemRequest() is an optional API and must only be implemented if HWSRAFLAGS_SYSTEMREQUEST has been
passed to hw_SetRequesterAdapter(). See hw_SetRequesterAdapter for details.
NULL if no display is openint pointer for storing the user's selection