revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / datatypes / dodtdomaina.c
blob5ea641b955de8313d17c3b9e20186fb2600acad7
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <proto/intuition.h>
10 #include <intuition/gadgetclass.h>
11 #include <intuition/intuition.h>
12 #include "datatypes_intern.h"
14 /*****************************************************************************
16 NAME */
18 AROS_LH7(ULONG, DoDTDomainA,
20 /* SYNOPSIS */
21 AROS_LHA(Object *, o , A0),
22 AROS_LHA(struct Window *, win , A1),
23 AROS_LHA(struct Requester *, req , A2),
24 AROS_LHA(struct RastPort *, rport , A3),
25 AROS_LHA(ULONG , which , D0),
26 AROS_LHA(struct IBox *, domain, A4),
27 AROS_LHA(struct TagItem *, attrs , A5),
30 /* LOCATION */
31 struct Library *, DataTypesBase, 51, DataTypes)
33 /* FUNCTION
35 Obtain the maximum/minimum/nominal domains of a data type object.
37 INPUTS
39 o -- data type object in question
40 win -- window that the object is attached to
41 req -- requester the object is attached to
42 rport -- rastport; used for domain calculations
43 which -- the domain to obtain (GDOMAIN_, see <intuition/gadgetclass.h>
44 domain -- the result will be put here
45 attrs -- additional attributes (subclass specific)
47 RESULT
49 The return value of GM_DOMAIN or 0 if an error occurred. The 'domain'
50 IBox will be filled with the requested values as a side effect.
52 NOTES
54 This function requires an object to perform the GM_DOMAIN method. To
55 achieve similar results without an object, you must use CoerceMethodA()
56 manually.
58 EXAMPLE
60 BUGS
62 SEE ALSO
64 <intuition/gadgetclass.h>
66 INTERNALS
68 HISTORY
70 7.8.99 SDuvan implemented
72 *****************************************************************************/
74 AROS_LIBFUNC_INIT
76 struct gpDomain gpd;
77 ULONG ret;
79 if(o == NULL)
80 return 0;
82 gpd.MethodID = GM_DOMAIN;
83 gpd.gpd_GInfo = ((struct Gadget *)o)->SpecialInfo;
84 gpd.gpd_RPort = rport;
85 gpd.gpd_Which = which;
86 gpd.gpd_Attrs = attrs;
88 ret = DoGadgetMethodA((struct Gadget *)o, win, req, (Msg)&gpd);
90 *domain = gpd.gpd_Domain;
92 return ret;
94 AROS_LIBFUNC_EXIT
95 } /* DoDTDomainA */