tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / rom / intuition / sysreqhandler.c
blob872e0ebd5165bab67e4b28ded4a7628d80859d51
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "requesters.h"
8 /*****************************************************************************
10 NAME */
11 #include <proto/intuition.h>
12 #include <exec/types.h>
13 #include <intuition/intuition.h>
15 AROS_LH3(LONG, SysReqHandler,
17 /* SYNOPSIS */
18 AROS_LHA(struct Window *, window, A0),
19 AROS_LHA(ULONG *, IDCMPFlagsPtr, A1),
20 AROS_LHA(BOOL , WaitInput, D0),
22 /* LOCATION */
23 struct IntuitionBase *, IntuitionBase, 100, Intuition)
25 /* FUNCTION
26 Handles a requester, which was opened with BuildSysRequest() or
27 BuildEasyRequestArgs(). When this function is called all outstanding
28 IDCMP requests are processed. If an IDCMP request that would close
29 a normal EasyRequestArgs() is encountered, SysReqHandler() returns
30 with a return code equally to the return code EasyRequestArgs()
31 would have returned. You may call this function in synchronous or
32 asynchronous mode, by setting the WaitInput parameter.
34 INPUTS
35 window - The window pointer returned by either BuildSysRequest() or
36 BuildEasyRequestArgs().
37 IDCMPFlagsPtr - Pointer to a ULONG to store the IDCMP flag that was
38 received by the window. This will be set if you
39 provided additional IDCMP flags to BuildSysRequest() or
40 BuildEasyRequest(). You may set this to NULL. You must
41 initialize the pointed to ULONG every time you call
42 SysReqHandler().
43 WaitInput - Set this to TRUE, if you want this function to wait for
44 the next IDCMP request, if there is none at the moment
45 the function is called.
47 RESULT
48 -2, if the requester was not satisfied. Normally you want to call
49 this function at least until this function returns something
50 different than -2.
51 -1, if one of the IDCMP flags of idcmpPTR was set.
52 0, if the rightmost button was clicked or an error occured.
53 n, if the n-th button from the left was clicked.
55 NOTES
57 EXAMPLE
59 BUGS
60 Gadget placing is still untidy.
61 Does not support BuildSysRequest() requesters, yet.
63 SEE ALSO
64 BuildSysRequest(), BuildEasyRequestArgs()
66 INTERNALS
68 *****************************************************************************/
70 AROS_LIBFUNC_INIT
72 return sysreqhandler_intern(window, IDCMPFlagsPtr, WaitInput, IntuitionBase);
74 AROS_LIBFUNC_EXIT