home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / os-include / intuition / classusr.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  4KB  |  130 lines

  1. #ifndef    INTUITION_CLASSUSR_H
  2. #define INTUITION_CLASSUSR_H    1
  3. /*
  4. **  $VER: classusr.h 38.2 (14.4.92)
  5. **  Includes Release 40.15
  6. **
  7. **  For application users of Intuition object classes
  8. **
  9. **  (C) Copyright 1989-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13.  
  14. #ifndef UTILITY_HOOKS_H
  15. #include <utility/hooks.h>
  16. #endif
  17.  
  18. /*** User visible handles on objects, classes, messages ***/
  19. typedef ULONG    Object;        /* abstract handle */
  20.  
  21. typedef    UBYTE    *ClassID;
  22.  
  23. /* you can use this type to point to a "generic" message,
  24.  * in the object-oriented programming parlance.  Based on
  25.  * the value of 'MethodID', you dispatch to processing
  26.  * for the various message types.  The meaningful parameter
  27.  * packet structure definitions are defined below.
  28.  */
  29. typedef struct {
  30.     ULONG MethodID;
  31.     /* method-specific data follows, some examples below */
  32. }        *Msg;
  33.  
  34. /*
  35.  * Class id strings for Intuition classes.
  36.  * There's no real reason to use the uppercase constants
  37.  * over the lowercase strings, but this makes a good place
  38.  * to list the names of the built-in classes.
  39.  */
  40. #define ROOTCLASS    "rootclass"        /* classusr.h      */
  41. #define IMAGECLASS    "imageclass"        /* imageclass.h   */
  42. #define FRAMEICLASS    "frameiclass"
  43. #define SYSICLASS    "sysiclass"
  44. #define FILLRECTCLASS    "fillrectclass"
  45. #define GADGETCLASS    "gadgetclass"        /* gadgetclass.h  */
  46. #define PROPGCLASS    "propgclass"
  47. #define STRGCLASS    "strgclass"
  48. #define BUTTONGCLASS    "buttongclass"
  49. #define FRBUTTONCLASS    "frbuttonclass"
  50. #define GROUPGCLASS    "groupgclass"
  51. #define ICCLASS        "icclass"        /* icclass.h      */
  52. #define MODELCLASS    "modelclass"
  53. #define ITEXTICLASS    "itexticlass"
  54. #define POINTERCLASS    "pointerclass"        /* pointerclass.h */
  55.  
  56. /* Dispatched method ID's
  57.  * NOTE: Applications should use Intuition entry points, not direct
  58.  * DoMethod() calls, for NewObject, DisposeObject, SetAttrs,
  59.  * SetGadgetAttrs, and GetAttr.
  60.  */
  61.  
  62. #define OM_Dummy    (0x100)
  63. #define OM_NEW        (0x101)    /* 'object' parameter is "true class"    */
  64. #define OM_DISPOSE    (0x102)    /* delete self (no parameters)        */
  65. #define OM_SET        (0x103)    /* set attributes (in tag list)        */
  66. #define OM_GET        (0x104)    /* return single attribute value    */
  67. #define OM_ADDTAIL    (0x105)    /* add self to a List (let root do it)    */
  68. #define OM_REMOVE    (0x106)    /* remove self from list        */
  69. #define OM_NOTIFY    (0x107)    /* send to self: notify dependents    */
  70. #define OM_UPDATE    (0x108)    /* notification message from somebody    */
  71. #define OM_ADDMEMBER    (0x109)    /* used by various classes with lists    */
  72. #define OM_REMMEMBER    (0x10A)    /* used by various classes with lists    */
  73.  
  74. /* Parameter "Messages" passed to methods    */
  75.  
  76. /* OM_NEW and OM_SET    */
  77. struct opSet {
  78.     ULONG        MethodID;
  79.     struct TagItem    *ops_AttrList;    /* new attributes    */
  80.     struct GadgetInfo    *ops_GInfo;    /* always there for gadgets,
  81.                      * when SetGadgetAttrs() is used,
  82.                      * but will be NULL for OM_NEW
  83.                      */
  84. };
  85.  
  86. /* OM_NOTIFY, and OM_UPDATE    */
  87. struct opUpdate {
  88.     ULONG        MethodID;
  89.     struct TagItem    *opu_AttrList;    /* new attributes    */
  90.     struct GadgetInfo    *opu_GInfo;    /* non-NULL when SetGadgetAttrs or
  91.                      * notification resulting from gadget
  92.                      * input occurs.
  93.                      */
  94.     ULONG        opu_Flags;    /* defined below    */
  95. };
  96.  
  97. /* this flag means that the update message is being issued from
  98.  * something like an active gadget, a la GACT_FOLLOWMOUSE.  When
  99.  * the gadget goes inactive, it will issue a final update
  100.  * message with this bit cleared.  Examples of use are for
  101.  * GACT_FOLLOWMOUSE equivalents for propgadclass, and repeat strobes
  102.  * for buttons.
  103.  */
  104. #define OPUF_INTERIM    (1<<0)
  105.  
  106. /* OM_GET    */
  107. struct opGet {
  108.     ULONG        MethodID;
  109.     ULONG        opg_AttrID;
  110.     ULONG        *opg_Storage;    /* may be other types, but "int"
  111.                      * types are all ULONG
  112.                      */
  113. };
  114.  
  115. /* OM_ADDTAIL    */
  116. struct opAddTail {
  117.     ULONG        MethodID;
  118.     struct List        *opat_List;
  119. };
  120.  
  121. /* OM_ADDMEMBER, OM_REMMEMBER    */
  122. #define  opAddMember opMember
  123. struct opMember {
  124.     ULONG        MethodID;
  125.     Object        *opam_Object;
  126. };
  127.  
  128.  
  129. #endif
  130.