added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / rom / intuition / easyrequestargs.c
blob9fc66338b212b25eb970c233a04db59f65998e46
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 <exec/types.h>
13 #include <intuition/intuition.h>
14 #include <proto/intuition.h>
16 AROS_LH4(LONG, EasyRequestArgs,
18 /* SYNOPSIS */
19 AROS_LHA(struct Window *, window, A0),
20 AROS_LHA(struct EasyStruct *, easyStruct, A1),
21 AROS_LHA(ULONG *, IDCMP_ptr, A2),
22 AROS_LHA(APTR , argList, A3),
24 /* LOCATION */
25 struct IntuitionBase *, IntuitionBase, 98, Intuition)
27 /* FUNCTION
28 Opens and handles a requester, which provides one or more choices.
29 It blocks the application until the user closes the requester.
30 Returned is a integer indicating which gadget had been selected.
32 INPUTS
33 Window - A reference window. If NULL, the requester opens on
34 the default public screen.
35 easyStruct - The EasyStruct structure (<intuition/intuition.h>),
36 which describes the requester.
37 IDCMP_Ptr - Pointer to IDCMP flags, which satisfy the requester,
38 too. This is useful for requesters, which want to
39 listen to disk changes, etc. The contents of this
40 pointer is set to the IDCMP flag, which caused the
41 requester to close. This pointer may be NULL.
42 ArgList - The arguments for easyStruct->es_TextFormat.
44 RESULT
45 -1, if one of the IDCMP flags of idcmpPTR was set.
46 0, if the rightmost button was clicked or an error occured.
47 n, if the n-th button from the left was clicked.
49 NOTES
51 EXAMPLE
53 BUGS
55 SEE ALSO
56 BuildEasyRequestArgs()
58 INTERNALS
60 HISTORY
61 29-10-95 digulla automatically created from
62 intuition_lib.fd and clib/intuition_protos.h
64 *****************************************************************************/
66 AROS_LIBFUNC_INIT
68 struct Window *req;
69 LONG result;
71 req = BuildEasyRequestArgs(window, easyStruct,
72 IDCMP_ptr != NULL ? *IDCMP_ptr : NULL, argList);
74 /* req = 0/1 is handled by SysReqHandler */
75 while ((result = SysReqHandler(req, IDCMP_ptr, TRUE)) == -2)
80 FreeSysRequest(req);
82 return result;
84 AROS_LIBFUNC_EXIT
85 } /* EasyRequestArgs */