(C) 1998 AROS - The Amiga Research OS


NAME
#include <proto/intuition.h>
#include <exec/types.h>
#include <intuition/intuition.h>

LONG SysReqHandler (window , IDCMPFlagsPtr , WaitInput)

LOCATION
In IntuitionBase at offset 100

SYNOPSIS
struct Window * window
ULONG * IDCMPFlagsPtr
BOOL WaitInput

FUNCTION
Handles a requester, which was opened with BuildSysRequest() or BuildEasyRequestArgs(). When this function is called all outstanding IDCMP requests are processed. If an IDCMP request that would close a normal EasyRequestArgs() is encountered, SysReqHandler() returns with a return code equally to the return code EasyRequestArgs() would have returned. You may call this function in synchronous or asynchronous mode, by setting the WaitInput parameter.

INPUTS
Window
The window pointer returned by either BuildSysRequest() or BuildEasyRequestArgs().
IDCMPFlagsPtr
Pointer to a ULONG to store the IDCMP flag that was received by the window. This will be set if you provided additional IDCMP flags to BuildSysRequest() or BuildEasyRequest(). You may set this to NULL. You must initialize the pointed to ULONG every time you call SysReqHandler().
WaitInput
Set this to TRUE, if you want this function to wait for the next IDCMP request, if there is none at the moment the function is called.

RESULT
-2, if the requester was not satisfied. Normally you want to call this function at least until this function returns something different than -2. -1, if one of the IDCMP flags of idcmpPTR was set. 0, if the rightmost button was clicked or an error occured. n, if the n-th button from the left was clicked.

EXAMPLE

SEE ALSO
BuildSysRequest(), BuildEasyRequestArgs()

NOTES

BUGS
Gadget placing is still untidy. Does not support BuildSysRequest() requesters, yet.

INTERNALS

HISTORY