grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / intuition / autorequest.c
blob47833322a8c3b0131560b2a8f17f9be42066e958
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include "intuition_intern.h"
9 /*****************************************************************************
11 NAME */
12 #include <intuition/intuition.h>
13 #include <proto/intuition.h>
15 AROS_LH8(BOOL, AutoRequest,
17 /* SYNOPSIS */
18 AROS_LHA(struct Window *, window, A0),
19 AROS_LHA(struct IntuiText *, body, A1),
20 AROS_LHA(struct IntuiText *, posText, A2),
21 AROS_LHA(struct IntuiText *, negText, A3),
22 AROS_LHA(ULONG , pFlag, D0),
23 AROS_LHA(ULONG , nFlag, D1),
24 AROS_LHA(ULONG , width, D2),
25 AROS_LHA(ULONG , height, D3),
27 /* LOCATION */
28 struct IntuitionBase *, IntuitionBase, 58, Intuition)
30 /* FUNCTION
32 INPUTS
34 RESULT
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 struct Window *req;
51 ULONG idcmp;
52 LONG result;
54 EXTENDWORD(width);EXTENDWORD(height);
56 req = BuildSysRequest(window,
57 body,
58 posText,
59 negText,
60 pFlag | nFlag,
61 width,
62 height);
64 /* req = 0/1 is handled by SysReqHandler */
65 while ((result = SysReqHandler(req, &idcmp, TRUE)) == -2)
70 if (result == -1)
72 result = (idcmp & pFlag) ? 1 : 0;
75 FreeSysRequest(req);
77 return result;
79 AROS_LIBFUNC_EXIT
80 } /* AutoRequest */