some fixes to accented characters
[tangerine.git] / rom / intuition / getattr.c
blob645f4c74ec00405773f3f04a7d5de14fc2a3e857
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 <proto/alib.h>
8 #include "intuition_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <intuition/classusr.h>
14 #include <proto/intuition.h>
16 AROS_LH3(ULONG, GetAttr,
18 /* SYNOPSIS */
19 AROS_LHA(ULONG , attrID, D0),
20 AROS_LHA(Object *, object, A0),
21 AROS_LHA(IPTR * , storagePtr, A1),
23 /* LOCATION */
24 struct IntuitionBase *, IntuitionBase, 109, Intuition)
26 /* FUNCTION
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.
31 INPUTS
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.
40 RESULT
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.
45 NOTES
46 This function sends OM_GET to the object.
48 EXAMPLE
50 BUGS
52 SEE ALSO
53 NewObjectA(), DisposeObject(), SetAttrsA(), MakeClass(),
54 "Basic Object-Oriented Programming System for Intuition" and
55 "boopsi Class Reference" Dokument.
58 INTERNALS
60 *****************************************************************************/
62 AROS_LIBFUNC_INIT
64 struct opGet get;
65 ULONG result = 0;
67 DEBUG_GETATTR(dprintf("GetAttr[%x]: AttrID 0x%lx Object 0x%lx Storage 0x%lx\n",
68 &get, attrID, object, storagePtr));
71 SANITY_CHECKR(object,0)
72 SANITY_CHECKR(storagePtr,0)
74 get.MethodID = OM_GET;
75 get.opg_AttrID = attrID;
76 get.opg_Storage = storagePtr;
78 result = DoMethodA (object, (Msg)&get);
80 DEBUG_GETATTR(dprintf("GetAttr[%x]: Return %d\n", &get, result));
82 return result;
84 AROS_LIBFUNC_EXIT
85 } /* GetAttr() */