home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / E / TFF-A32R.LZX / AmigaE3.2a / ModulesSrc / intuition / classes.e < prev    next >
Encoding:
Text File  |  1996-08-29  |  896 b   |  41 lines

  1. OPT MODULE
  2. OPT EXPORT
  3.  
  4. OPT PREPROCESS
  5.  
  6. MODULE 'exec/nodes',
  7.        'intuition/classusr',
  8.        'utility/hooks'
  9.  
  10. OBJECT iclass
  11.   dispatcher:hook
  12.   reserved:LONG
  13.   super:PTR TO iclass
  14.   id:LONG
  15.   instoffset:INT -> This is unsigned
  16.   instsize:INT   -> This is unsigned
  17.   userdata:LONG
  18.   subclasscount:LONG
  19.   objectcount:LONG
  20.   flags:LONG
  21. ENDOBJECT     /* SIZEOF=NONE !!! */
  22.  
  23. CONST CLB_INLIST=0,
  24.       CLF_INLIST=1
  25.  
  26. -> instoffset and instsize are unsigned so AND with $FFFF
  27. #define INST_DATA(cl, o) ((o)+(cl::iclass.instoffset AND $FFFF))
  28. #define SIZEOF_INSTANCE(cl) ((cl::iclass.instoffset AND $FFFF)+(cl::iclass.instsize AND $FFFF)+SIZEOF object)
  29.  
  30. CONST OJ_CLASS=8
  31.  
  32. OBJECT object
  33.   node:mln
  34.   class:PTR TO iclass
  35. ENDOBJECT     /* SIZEOF=12 */
  36.  
  37. #define _OBJ(o) (o)
  38. #define BASEOBJECT(_obj) ((_obj)+SIZEOF object)
  39. #define _OBJECT(o) ((o)-SIZEOF object)
  40. #define OCLASS(o) (Long(_OBJECT(o)+OJ_CLASS))
  41.