home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / ace_basic / ace / include / intuition / classusr.h < prev    next >
C/C++ Source or Header  |  1977-12-31  |  5KB  |  161 lines

  1. #ifndef INTUITION_CLASSUSR_H
  2. #define INTUITION_CLASSUSR_H 1
  3. /*
  4. ** classusr.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/01/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for classusr.h
  17. */
  18. #ifndef opAddTailPtr
  19. #define opAddTailPtr ADDRESS
  20. #endif
  21. #ifndef opGetPtr
  22. #define opGetPtr ADDRESS
  23. #endif
  24. #ifndef opMemberPtr
  25. #define opMemberPtr ADDRESS
  26. #endif
  27. #ifndef opSetPtr
  28. #define opSetPtr ADDRESS
  29. #endif
  30. #ifndef opUpdatePtr
  31. #define opUpdatePtr ADDRESS
  32. #endif
  33. /*
  34. ** End of StructPointer defines for classusr.h
  35. */
  36.  
  37.  
  38.  
  39. #ifndef UTILITY_HOOKS_H
  40. #include <utility/hooks.h>
  41. #endif
  42.  
  43. #ifndef _ObjectPtr
  44. #define _ObjectPtr ADDRESS
  45. #endif
  46.  
  47.  
  48. /*** User visible handles on objects,  classes,  messages ***/
  49. #define  Object   LONGINT      /* abstract HANDLE */
  50.  
  51. #define  ClassID  ADDRESS 
  52.  
  53. /* you can use this type to point to a "generic" message, 
  54.  * in the object-oriented programming parlance.  Based on
  55.  * the value of 'MethodID',  you dispatch to processing
  56.  * for the various message types.  The meaningful parameter
  57.  * packet structure definitions are defined below.
  58.  */
  59. /*
  60. typedef STRUCT  
  61.     LONGINT MethodID 
  62. END STRUCT       *Msg 
  63. */
  64.  
  65. /*
  66.  * Class id strings for Intuition classes.
  67.  * There's no real reason to use the uppercase constants
  68.  * over the lowercase strings,  but this makes a good place
  69.  * to list the names of the built-in classes.
  70.  */
  71. #define ROOTCLASS   "rootclass"     /* classusr.h     */
  72. #define IMAGECLASS  "imageclass"        /* imageclass.h   */
  73. #define FRAMEICLASS "frameiclass"
  74. #define SYSICLASS   "sysiclass"
  75. #define FILLRECTCLASS   "fillrectclass"
  76. #define GADGETCLASS "gadgetclass"       /* gadgetclass.h  */
  77. #define PROPGCLASS  "propgclass"
  78. #define STRGCLASS   "strgclass"
  79. #define BUTTONGCLASS    "buttongclass"
  80. #define FRBUTTONCLASS   "frbuttonclass"
  81. #define GROUPGCLASS "groupgclass"
  82. #define ICCLASS     "icclass"       /* icclass.h      */
  83. #define MODELCLASS  "modelclass"
  84. #define ITEXTICLASS "itexticlass"
  85. #define POINTERCLASS    "pointerclass"      /* pointerclass.h */
  86.  
  87. /* Dispatched method ID's
  88.  * NOTE: Applications should use Intuition entry points,  not direct
  89.  * DoMethod() calls,  for NewObject,  DisposeObject,  SetAttrs, 
  90.  * SetGadgetAttrs,  and GetAttr.
  91.  */
  92.  
  93. #define OM_Dummy    (&H100)
  94. #define OM_NEW      (&H101) /* 'object' parameter is "true class"   */
  95. #define OM_DISPOSE  (&H102) /* delete self (no parameters)      */
  96. #define OM_SET      (&H103) /* set attributes (in tag list)     */
  97. #define OM_GET      (&H104) /* return single attribute value    */
  98. #define OM_ADDTAIL  (&H105) /* add self to a List (let root do it)  */
  99. #define OM_REMOVE   (&H106) /* remove self from list        */
  100. #define OM_NOTIFY   (&H107) /* send to self: notify dependents  */
  101. #define OM_UPDATE   (&H108) /* notification message from somebody   */
  102. #define OM_ADDMEMBER    (&H109) /* used by various classes with lists   */
  103. #define OM_REMMEMBER    (&H10A) /* used by various classes with lists   */
  104.  
  105. /* Parameter "Messages" passed to methods   */
  106.  
  107. /* OM_NEW and OM_SET    */
  108. STRUCT opSet  
  109.     LONGINT       MethodID 
  110.     TagItemPtr  ops_AttrList   /* new attributes   */
  111.     GadgetInfoPtr  ops_GInfo  /* always there for gadgets, 
  112.                      * when SetGadgetAttrs() is used, 
  113.                      * but will be NULL for OM_NEW
  114.                      */
  115. END STRUCT 
  116.  
  117. /* OM_NOTIFY,  and OM_UPDATE */
  118. STRUCT opUpdate  
  119.     LONGINT       MethodID 
  120.     TagItemPtr  opu_AttrList   /* new attributes   */
  121.     GadgetInfoPtr  opu_GInfo  /* non-NULL when SetGadgetAttrs or
  122.                      * notification resulting from gadget
  123.                      * input occurs.
  124.                      */
  125.     LONGINT       opu_Flags   /* defined below    */
  126. END STRUCT 
  127.  
  128. /* this flag means that the update message is being issued from
  129.  * something like an active gadget,  a la GACT_FOLLOWMOUSE.  When
  130.  * the gadget goes inactive,  it will issue a final update
  131.  * message with this bit cleared.  Examples of use are for
  132.  * GACT_FOLLOWMOUSE equivalents for propgadclass,  and repeat strobes
  133.  * for buttons.
  134.  */
  135. #define OPUF_INTERIM    &H1
  136.  
  137. /* OM_GET   */
  138. STRUCT opGet  
  139.     LONGINT       MethodID 
  140.     LONGINT       opg_AttrID 
  141.     ADDRESS   opg_Storage    /* may be other types,  but "int"
  142.                      * types are all LONGINT
  143.                      */
  144. END STRUCT 
  145.  
  146. /* OM_ADDTAIL   */
  147. STRUCT opAddTail  
  148.     LONGINT       MethodID 
  149.     ListPtr  opat_List 
  150. END STRUCT 
  151.  
  152. /* OM_ADDMEMBER,  OM_REMMEMBER   */
  153. #define  opAddMember opMember
  154. STRUCT opMember  
  155.     LONGINT       MethodID 
  156.     _ObjectPtr    opam_Object
  157. END STRUCT 
  158.  
  159.  
  160. #endif
  161.