home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / inc&ad2.0 / includes / intuition / classes.i < prev    next >
Text File  |  1992-09-01  |  2KB  |  73 lines

  1.     IFND INTUITION_CLASSES_I
  2. INTUITION_CLASSES_I SET 1
  3. **
  4. **  $Filename: intuition/classes.i $
  5. **  $Release: 2.04 Includes, V37.4 $
  6. **  $Revision: 36.3 $
  7. **  $Date: 91/11/08 $
  8. **
  9. **  Only used by class implementors
  10. **
  11. **  (C) Copyright 1989-1991 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. **
  14.  
  15.     IFND UTILITY_HOOKS_I
  16.     INCLUDE "utility/hooks.i"
  17.     ENDC
  18.  
  19.     IFND    INTUITION_CLASSUSR_I
  20.     INCLUDE "intuition/classusr.i"
  21.     ENDC
  22.  
  23. ;*******************************************
  24. ;*** "White box" access to struct IClass ***
  25. ;*******************************************
  26.  
  27.  STRUCTURE ICLASS,0
  28.     STRUCT cl_Dispatcher,h_SIZEOF
  29.     ULONG  cl_Reserved        ; must be 0
  30.  
  31.     APTR   cl_Super
  32.     APTR   cl_ID        ; pointer to null-terminated string
  33.  
  34.     ; where within an object is the instance data for this class?
  35.     UWORD  cl_InstOffset
  36.     UWORD  cl_InstSize
  37.  
  38.     ULONG  cl_UserData        ; per-class data of your choice
  39.     ULONG  cl_SubclassCount    ; how many direct subclasses?
  40.     ULONG  cl_ObjectCount    ; how many objects created of this class?
  41.     ULONG  cl_Flags
  42.     ; no iclass_SIZEOF because only Intuition allocates these
  43.  
  44. ; defined values of cl_Flags
  45. CLB_INLIST EQU 0
  46. CLF_INLIST EQU $00000001    ; class in in public class list
  47.  
  48. ; see classes.h for common calculations (sorry, no macros yet)
  49.  
  50. ;**************************************************
  51. ;*** "White box" access to struct _Object    ***
  52. ;**************************************************
  53.  
  54. * We have this, the instance data of the root class, PRECEDING
  55. * the "object".  This is so that Gadget objects are Gadget pointers,
  56. * and so on.  If this structure grows, it will always have o_Class
  57. * at the end, so the you can always get it by subtracting #4 from
  58. * the pointer returned from NewObject().
  59. *
  60. * This data structure is subject to change.  Do not use the o_Node
  61. * embedded structure.
  62.  
  63.  
  64.  STRUCTURE _Object,0
  65.     STRUCT o_Node,MLN_SIZE
  66.     APTR   o_Class
  67.  
  68.     ; this value may change but difference between it and offset of o_Class
  69.     ; will remain constant
  70.     LABEL  _object_SIZEOF
  71.  
  72.     ENDC
  73.