define __KERNEL_STRICT_NAMES to avoid inclusion of kernel types on systems that carry...
[cake.git] / rom / intuition / autorequest.c
bloba79d42855b9253c6faa30dde78535273205efded
1 /*
2 Copyright © 1995-2007, 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 HISTORY
47 29-10-95 digulla automatically created from
48 intuition_lib.fd and clib/intuition_protos.h
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
54 struct Window *req;
55 ULONG idcmp;
56 LONG result;
58 EXTENDWORD(width);EXTENDWORD(height);
60 req = BuildSysRequest(window,
61 body,
62 posText,
63 negText,
64 pFlag | nFlag,
65 width,
66 height);
68 /* req = 0/1 is handled by SysReqHandler */
69 while ((result = SysReqHandler(req, &idcmp, TRUE)) == -2)
74 if (result == -1)
76 result = (idcmp & pFlag) ? 1 : 0;
79 FreeSysRequest(req);
81 return result;
83 AROS_LIBFUNC_EXIT
84 } /* AutoRequest */