home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD2.1 / includes / intuition / imageclass.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-11  |  5.8 KB  |  206 lines

  1. #ifndef INTUITION_IMAGECLASS_H
  2. #define INTUITION_IMAGECLASS_H TRUE
  3. /*
  4. **  $VER: imageclass.h 36.3 (08.11.91)
  5. **  Includes Release 38.56
  6. **
  7. **  Definitions for the image classes
  8. **
  9. **  (C) Copyright 1989-1992 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13.  
  14. #ifndef UTILITY_TAGITEM_H
  15. #include <utility/tagitem.h>
  16. #endif
  17.  
  18. /*
  19.  * NOTE:  <intuition/iobsolete.h> is included at the END of this file!
  20.  */
  21.  
  22. #define CUSTOMIMAGEDEPTH    (-1)
  23. /* if image.Depth is this, it's a new Image class object */
  24.  
  25. /* some convenient macros and casts */
  26. #define GADGET_BOX( g )    ( (struct IBox *) &((struct Gadget *)(g))->LeftEdge )
  27. #define IM_BOX( im )    ( (struct IBox *) &((struct Image *)(im))->LeftEdge )
  28. #define IM_FGPEN( im )    ( (im)->PlanePick )
  29. #define IM_BGPEN( im )    ( (im)->PlaneOnOff )
  30.  
  31. /******************************************************/
  32. #define IA_Dummy        (TAG_USER + 0x20000)
  33. #define IA_Left            (IA_Dummy + 0x01)
  34. #define IA_Top            (IA_Dummy + 0x02)
  35. #define IA_Width        (IA_Dummy + 0x03)
  36. #define IA_Height        (IA_Dummy + 0x04)
  37. #define IA_FGPen        (IA_Dummy + 0x05)
  38.             /* IA_FGPen also means "PlanePick"    */
  39. #define IA_BGPen        (IA_Dummy + 0x06)
  40.             /* IA_BGPen also means "PlaneOnOff"    */
  41. #define IA_Data            (IA_Dummy + 0x07)
  42.             /* bitplanes, for classic image,
  43.              * other image classes may use it for other things
  44.              */
  45. #define IA_LineWidth        (IA_Dummy + 0x08)
  46. #define IA_Pens            (IA_Dummy + 0x0E)
  47.             /* pointer to UWORD pens[],
  48.              * ala DrawInfo.Pens, MUST be
  49.              * terminated by ~0.  Some classes can
  50.              * choose to have this, or SYSIA_DrawInfo,
  51.              * or both.
  52.              */
  53. #define IA_Resolution        (IA_Dummy + 0x0F)
  54.             /* packed uwords for x/y resolution into a longword
  55.              * ala DrawInfo.Resolution
  56.              */
  57.  
  58. /**** see class documentation to learn which    *****/
  59. /**** classes recognize these            *****/
  60. #define IA_APattern        (IA_Dummy + 0x10)
  61. #define IA_APatSize        (IA_Dummy + 0x11)
  62. #define IA_Mode            (IA_Dummy + 0x12)
  63. #define IA_Font            (IA_Dummy + 0x13)
  64. #define IA_Outline        (IA_Dummy + 0x14)
  65. #define IA_Recessed        (IA_Dummy + 0x15)
  66. #define IA_DoubleEmboss        (IA_Dummy + 0x16)
  67. #define IA_EdgesOnly        (IA_Dummy + 0x17)
  68.  
  69. /**** "sysiclass" attributes            *****/
  70. #define SYSIA_Size        (IA_Dummy + 0x0B)
  71.             /* #define's below        */
  72. #define SYSIA_Depth        (IA_Dummy + 0x0C)
  73.             /* this is unused by Intuition.  SYSIA_DrawInfo
  74.              * is used instead for V36
  75.              */
  76. #define SYSIA_Which        (IA_Dummy + 0x0D)
  77.             /* see #define's below    */
  78. #define SYSIA_DrawInfo        (IA_Dummy + 0x18)
  79.             /* pass to sysiclass, please */
  80.  
  81. /*****    obsolete: don't use these, use IA_Pens    *****/
  82. #define SYSIA_Pens        IA_Pens
  83. #define IA_ShadowPen        (IA_Dummy + 0x09)
  84. #define IA_HighlightPen        (IA_Dummy + 0x0A)
  85.  
  86. /** next attribute: (IA_Dummy + 0x19)    **/
  87. /*************************************************/
  88.  
  89. /* data values for SYSIA_Size    */
  90. #define SYSISIZE_MEDRES    (0)
  91. #define SYSISIZE_LOWRES    (1)
  92. #define SYSISIZE_HIRES    (2)
  93.  
  94. /*
  95.  * SYSIA_Which tag data values:
  96.  * Specifies which system gadget you want an image for.
  97.  * Some numbers correspond to internal Intuition #defines
  98.  */
  99. #define DEPTHIMAGE    (0x00L)
  100. #define ZOOMIMAGE    (0x01L)
  101. #define SIZEIMAGE    (0x02L)
  102. #define CLOSEIMAGE    (0x03L)
  103. #define SDEPTHIMAGE    (0x05L)    /* screen depth gadget */
  104. #define LEFTIMAGE    (0x0AL)
  105. #define UPIMAGE        (0x0BL)
  106. #define RIGHTIMAGE    (0x0CL)
  107. #define DOWNIMAGE    (0x0DL)
  108. #define CHECKIMAGE    (0x0EL)
  109. #define MXIMAGE        (0x0FL)    /* mutual exclude "button" */
  110.  
  111.  
  112. /* image message id's    */
  113. #define    IM_DRAW    0x202L    /* draw yourself, with "state"        */
  114. #define    IM_HITTEST    0x203L    /* return TRUE if click hits image    */
  115. #define    IM_ERASE    0x204L    /* erase yourself            */
  116. #define    IM_MOVE    0x205L    /* draw new and erase old, smoothly    */
  117.  
  118. #define    IM_DRAWFRAME    0x206L    /* draw with specified dimensions    */
  119. #define    IM_FRAMEBOX    0x207L    /* get recommended frame around some box*/
  120. #define    IM_HITFRAME    0x208L    /* hittest with dimensions        */
  121. #define    IM_ERASEFRAME 0x209L    /* hittest with dimensions        */
  122.  
  123. /* image draw states or styles, for IM_DRAW */
  124. #define    IDS_NORMAL        (0L)
  125. #define    IDS_SELECTED        (1L)    /* for selected gadgets        */
  126. #define    IDS_DISABLED        (2L)    /* for disabled gadgets        */
  127. #define    IDS_BUSY        (3L)    /* for future functionality */
  128. #define    IDS_INDETERMINATE    (4L)    /* for future functionality */
  129. #define    IDS_INACTIVENORMAL    (5L)    /* normal, in inactive window border */
  130. #define    IDS_INACTIVESELECTED    (6L)    /* selected, in inactive border */
  131. #define    IDS_INACTIVEDISABLED    (7L)    /* disabled, in inactive border */
  132.  
  133. /* oops, please forgive spelling error by jimm */
  134. #define IDS_INDETERMINANT IDS_INDETERMINATE
  135.  
  136. /* IM_FRAMEBOX    */
  137. struct impFrameBox {
  138.     ULONG        MethodID;
  139.     struct IBox    *imp_ContentsBox;    /* input: relative box of contents */
  140.     struct IBox    *imp_FrameBox;        /* output: rel. box of encl frame  */
  141.     struct DrawInfo    *imp_DrInfo;    /* NB: May be NULL */
  142.     ULONG    imp_FrameFlags;
  143. };
  144.  
  145. #define FRAMEF_SPECIFY    (1<<0)    /* Make do with the dimensions of FrameBox
  146.                  * provided.
  147.                  */
  148.  
  149. /* IM_DRAW, IM_DRAWFRAME    */
  150. struct impDraw {
  151.     ULONG        MethodID;
  152.     struct RastPort    *imp_RPort;
  153.     struct {
  154.     WORD    X;
  155.     WORD    Y;
  156.     }            imp_Offset;
  157.  
  158.     ULONG        imp_State;
  159.     struct DrawInfo    *imp_DrInfo;    /* NB: May be NULL */
  160.  
  161.     /* these parameters only valid for IM_DRAWFRAME */
  162.     struct {
  163.     WORD    Width;
  164.     WORD    Height;
  165.     }            imp_Dimensions;
  166. };
  167.  
  168. /* IM_ERASE, IM_ERASEFRAME    */
  169. /* NOTE: This is a subset of impDraw    */
  170. struct impErase {
  171.     ULONG        MethodID;
  172.     struct RastPort    *imp_RPort;
  173.     struct {
  174.     WORD    X;
  175.     WORD    Y;
  176.     }            imp_Offset;
  177.  
  178.     /* these parameters only valid for IM_ERASEFRAME */
  179.     struct {
  180.     WORD    Width;
  181.     WORD    Height;
  182.     }            imp_Dimensions;
  183. };
  184.  
  185. /* IM_HITTEST, IM_HITFRAME    */
  186. struct impHitTest {
  187.     ULONG        MethodID;
  188.     struct {
  189.     WORD    X;
  190.     WORD    Y;
  191.     }            imp_Point;
  192.  
  193.     /* these parameters only valid for IM_HITFRAME */
  194.     struct {
  195.     WORD    Width;
  196.     WORD    Height;
  197.     }            imp_Dimensions;
  198. };
  199.  
  200. /* Include obsolete identifiers: */
  201. #ifndef INTUITION_IOBSOLETE_H
  202. #include <intuition/iobsolete.h>
  203. #endif
  204.  
  205. #endif
  206.