Forgotten commit. Added automount.
[AROS.git] / rom / intuition / setattrsa.c
blob231966e7c4ffd20761d275ded9012caffb5f56a3
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <proto/alib.h>
8 #include <proto/utility.h>
9 #include "intuition_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <intuition/classusr.h>
15 #include <proto/intuition.h>
17 AROS_LH2(ULONG, SetAttrsA,
19 /* SYNOPSIS */
20 AROS_LHA(APTR , object, A0),
21 AROS_LHA(struct TagItem *, tagList, A1),
23 /* LOCATION */
24 struct IntuitionBase *, IntuitionBase, 108, Intuition)
26 /* FUNCTION
27 Changes several attributes of an object at the same time. How the
28 object interprets the new attributes depends on the class.
30 INPUTS
31 object - Change the attributes of this object
32 tagList - This is a list of attribute/value-pairs
34 RESULT
35 Depends in the class. For gadgets, this value is non-zero if
36 they need redrawing after the values have changed. Other classes
37 will define other return values.
39 NOTES
40 This function sends OM_SET to the object.
42 EXAMPLE
44 BUGS
46 SEE ALSO
47 NewObjectA(), DisposeObject(), GetAttr(), MakeClass(),
48 "Basic Object-Oriented Programming System for Intuition" and
49 "boopsi Class Reference" Dokument.
51 INTERNALS
53 *****************************************************************************/
55 AROS_LIBFUNC_INIT
57 struct opSet ops;
58 ULONG result;
60 DEBUG_SETATTRS(dprintf("SetAttrs[0x%p]: Object 0x%p Tags 0x%p\n", &ops, object, tagList));
62 SANITY_CHECKR(object,FALSE)
63 SANITY_CHECKR(tagList,FALSE)
65 #if DEBUG > 1
66 if (tagList)
68 struct TagItem *state = tagList;
69 struct TagItem *tag;
71 while (tag = NextTagItem(&state))
73 dprintf("\t0x%p 0x%p\n", tag->ti_Tag, tag->ti_Data);
76 #endif
78 ops.MethodID = OM_SET;
79 ops.ops_AttrList = tagList;
80 ops.ops_GInfo = NULL;
82 result = DoMethodA (object, (Msg)&ops);
84 DEBUG_SETATTRS(dprintf("SetAttrs[0x%p]: Return 0x%08X\n", &ops, result));
86 return result;
88 AROS_LIBFUNC_EXIT
89 } /* SetAttrsA() */