2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <proto/alib.h>
8 #include "intuition_intern.h"
10 /*****************************************************************************
13 #include <intuition/classusr.h>
14 #include <proto/intuition.h>
16 AROS_LH3(ULONG
, GetAttr
,
19 AROS_LHA(ULONG
, attrID
, D0
),
20 AROS_LHA(Object
*, object
, A0
),
21 AROS_LHA(IPTR
* , storagePtr
, A1
),
24 struct IntuitionBase
*, IntuitionBase
, 109, Intuition
)
27 Asks the specified object for the value of an attribute. This is not
28 possible for all attributes of an object. Read the documentation for
29 the class to find out which can be read and which can't.
32 attrID - ID of the attribute you want
33 object - Ask the attribute from this object
34 storagePtr - This is a pointer to memory which is large enough
35 to hold a copy of the attribute. Most classes will simply
36 put a copy of the value stored in the object here but this
37 behaviour is class specific. Therefore read the instructions
38 in the class description carefully.
41 Mostly TRUE if the method is supported for the specified attribute
42 and FALSE if it isn't or the attribute can't be read at this time.
43 See the classes documentation for details.
46 This function sends OM_GET to the object.
53 NewObjectA(), DisposeObject(), SetAttrsA(), MakeClass(),
54 "Basic Object-Oriented Programming System for Intuition" and
55 "Boopsi Class Reference" Document.
59 *****************************************************************************/
66 DEBUG_GETATTR(dprintf("GetAttr[%x]: AttrID 0x%lx Object 0x%lx Storage 0x%lx\n",
67 &get
, attrID
, object
, storagePtr
));
70 SANITY_CHECKR(object
,0)
71 SANITY_CHECKR(storagePtr
,0)
73 get
.MethodID
= OM_GET
;
74 get
.opg_AttrID
= attrID
;
75 get
.opg_Storage
= storagePtr
;
77 result
= DoMethodA (object
, (Msg
)&get
);
79 DEBUG_GETATTR(dprintf("GetAttr[%x]: Return %d\n", &get
, result
));