home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / os-include / intuition / classes.i < prev    next >
Text File  |  1993-10-15  |  2KB  |  71 lines

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