some fixes to accented characters
[tangerine.git] / rom / intuition / easyrequestargs.c
blobab5be51f4c3f4b27e06b59ca055217661461fe43
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 an 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 describing the requester.
37 IDCMP_Ptr - Pointer to IDCMP flags. The requester will be closed early
38 if any of the specified message types is received. This is useful
39 for requesters that want to listen to disk changes etc. The contents
40 of this pointer is set to the IDCMP flag that caused the requester
41 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 IDCMP_ptr 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 *****************************************************************************/
62 AROS_LIBFUNC_INIT
64 struct Window *req;
65 LONG result;
67 req = BuildEasyRequestArgs(window, easyStruct,
68 IDCMP_ptr != NULL ? *IDCMP_ptr : NULL, argList);
70 /* req = 0/1 is handled by SysReqHandler */
71 while ((result = SysReqHandler(req, IDCMP_ptr, TRUE)) == -2)
76 FreeSysRequest(req);
78 return result;
80 AROS_LIBFUNC_EXIT
81 } /* EasyRequestArgs */