home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / rom / intuition / getattr.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-27  |  2.6 KB  |  97 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: getattr.c,v 1.5 1997/01/27 00:36:38 ldp Exp $
  4.     $Log: getattr.c,v $
  5.     Revision 1.5  1997/01/27 00:36:38  ldp
  6.     Polish
  7.  
  8.     Revision 1.4  1996/12/10 14:00:03  aros
  9.     Moved #include into first column to allow makedepend to see it.
  10.  
  11.     Revision 1.3  1996/11/08 11:28:02  aros
  12.     All OS function use now Amiga types
  13.  
  14.     Moved intuition-driver protos to intuition_intern.h
  15.  
  16.     Revision 1.2  1996/10/24 15:51:19  aros
  17.     Use the official AROS macros over the __AROS versions.
  18.  
  19.     Revision 1.1  1996/08/28 17:55:34  digulla
  20.     Proportional gadgets
  21.     BOOPSI
  22.  
  23.  
  24.     Desc:
  25.     Lang: english
  26. */
  27. #include <proto/alib.h>
  28. #include "intuition_intern.h"
  29.  
  30. /*****************************************************************************
  31.  
  32.     NAME */
  33. #include <intuition/classusr.h>
  34. #include <proto/intuition.h>
  35.  
  36.     AROS_LH3(ULONG, GetAttr,
  37.  
  38. /*  SYNOPSIS */
  39.     AROS_LHA(ULONG   , attrID, D0),
  40.     AROS_LHA(Object *, object, A0),
  41.     AROS_LHA(IPTR *  , storagePtr, A1),
  42.  
  43. /*  LOCATION */
  44.     struct IntuitionBase *, IntuitionBase, 109, Intuition)
  45.  
  46. /*  FUNCTION
  47.     Asks the specified object for the value of an attribute. This is not
  48.     possible for all attributes of an object. Read the documentation for
  49.     the class to find out which can be read and which can't.
  50.  
  51.     INPUTS
  52.     attrID - ID of the attribute you want
  53.     object - Ask the attribute from this object
  54.     storagePtr - This is a pointer to memory which is large enough
  55.         to hold a copy of the attribute. Most classes will simply
  56.         put a copy of the value stored in the object here but this
  57.         behaviour is class specific. Therefore read the instructions
  58.         in the class description carefully.
  59.  
  60.     RESULT
  61.     Mostly TRUE if the method is supported for the specified attribute
  62.     and FALSE if it isn't or the attribute can't be read at this time.
  63.     See the classes documentation for details.
  64.  
  65.     NOTES
  66.     This function sends OM_GET to the object.
  67.  
  68.     EXAMPLE
  69.  
  70.     BUGS
  71.  
  72.     SEE ALSO
  73.     NewObject(), DisposeObject(), SetAttr(), MakeClass(),
  74.     "Basic Object-Oriented Programming System for Intuition" and
  75.     "boopsi Class Reference" Dokument.
  76.  
  77.  
  78.     INTERNALS
  79.  
  80.     HISTORY
  81.     29-10-95    digulla automatically created from
  82.                 intuition_lib.fd and clib/intuition_protos.h
  83.  
  84. *****************************************************************************/
  85. {
  86.     AROS_LIBFUNC_INIT
  87.     AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
  88.     struct opGet get;
  89.  
  90.     get.MethodID    = OM_GET;
  91.     get.opg_AttrID  = attrID;
  92.     get.opg_Storage = storagePtr;
  93.  
  94.     return (DoMethodA (object, (Msg)&get));
  95.     AROS_LIBFUNC_EXIT
  96. } /* GetAttr */
  97.