forcing device into host mode requires a full config - which we will do in opendevice...
[AROS.git] / rom / intuition / sysreqhandler.c
blob06612a465dedfb3993987e83d25772b9bc23960f
1 #include "requesters.h"
3 /*****************************************************************************
5 NAME */
6 #include <proto/intuition.h>
7 #include <exec/types.h>
8 #include <intuition/intuition.h>
10 AROS_LH3(LONG, SysReqHandler,
12 /* SYNOPSIS */
13 AROS_LHA(struct Window *, window, A0),
14 AROS_LHA(ULONG *, IDCMPFlagsPtr, A1),
15 AROS_LHA(BOOL , WaitInput, D0),
17 /* LOCATION */
18 struct IntuitionBase *, IntuitionBase, 100, Intuition)
20 /* FUNCTION
21 Handles a requester, which was opened with BuildSysRequest() or
22 BuildEasyRequestArgs(). When this function is called all outstanding
23 IDCMP requests are processed. If an IDCMP request that would close
24 a normal EasyRequestArgs() is encountered, SysReqHandler() returns
25 with a return code equally to the return code EasyRequestArgs()
26 would have returned. You may call this function in synchronous or
27 asynchronous mode, by setting the WaitInput parameter.
29 INPUTS
30 Window - The window pointer returned by either BuildSysRequest() or
31 BuildEasyRequestArgs().
32 IDCMPFlagsPtr - Pointer to a ULONG to store the IDCMP flag that was
33 received by the window. This will be set if you
34 provided additional IDCMP flags to BuildSysRequest() or
35 BuildEasyRequest(). You may set this to NULL. You must
36 initialize the pointed to ULONG every time you call
37 SysReqHandler().
38 WaitInput - Set this to TRUE, if you want this function to wait for
39 the next IDCMP request, if there is none at the moment
40 the function is called.
42 RESULT
43 -2, if the requester was not satisfied. Normally you want to call
44 this function at least until this function returns something
45 different than -2.
46 -1, if one of the IDCMP flags of idcmpPTR was set.
47 0, if the rightmost button was clicked or an error occured.
48 n, if the n-th button from the left was clicked.
50 NOTES
52 EXAMPLE
54 BUGS
55 Gadget placing is still untidy.
56 Does not support BuildSysRequest() requesters, yet.
58 SEE ALSO
59 BuildSysRequest(), BuildEasyRequestArgs()
61 INTERNALS
63 HISTORY
65 *****************************************************************************/
67 AROS_LIBFUNC_INIT
69 return sysreqhandler_intern(window, IDCMPFlagsPtr, WaitInput, IntuitionBase);
71 AROS_LIBFUNC_EXIT