home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / intuition / imageclass.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  8KB  |  249 lines

  1. #ifndef INTUITION_IMAGECLASS_H
  2. #define INTUITION_IMAGECLASS_H TRUE
  3. /*
  4. **  $VER: imageclass.h 38.5 (26.3.92)
  5. **  Includes Release 40.15
  6. **
  7. **  Definitions for the image classes
  8. **
  9. **  (C) Copyright 1989-1993 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. /* New for V39: */
  87. #define SYSIA_ReferenceFont    (IA_Dummy + 0x19)
  88.             /* Font to use as reference for scaling
  89.              * certain sysiclass images
  90.              */
  91. #define IA_SupportsDisable    (IA_Dummy + 0x1a)
  92.             /* By default, Intuition ghosts gadgets itself,
  93.              * instead of relying on IDS_DISABLED or
  94.              * IDS_SELECTEDDISABLED.  An imageclass that
  95.              * supports these states should return this attribute
  96.              * as TRUE.  You cannot set or clear this attribute,
  97.              * however.
  98.              */
  99.  
  100. #define IA_FrameType        (IA_Dummy + 0x1b)
  101.             /* Starting with V39, FrameIClass recognizes
  102.              * several standard types of frame.  Use one
  103.              * of the FRAME_ specifiers below.    Defaults
  104.              * to FRAME_DEFAULT.
  105.              */
  106.  
  107. /** next attribute: (IA_Dummy + 0x1c)    **/
  108. /*************************************************/
  109.  
  110. /* data values for SYSIA_Size    */
  111. #define SYSISIZE_MEDRES    (0)
  112. #define SYSISIZE_LOWRES    (1)
  113. #define SYSISIZE_HIRES    (2)
  114.  
  115. /*
  116.  * SYSIA_Which tag data values:
  117.  * Specifies which system gadget you want an image for.
  118.  * Some numbers correspond to internal Intuition #defines
  119.  */
  120. #define DEPTHIMAGE    (0x00L)    /* Window depth gadget image */
  121. #define ZOOMIMAGE    (0x01L)    /* Window zoom gadget image */
  122. #define SIZEIMAGE    (0x02L)    /* Window sizing gadget image */
  123. #define CLOSEIMAGE    (0x03L)    /* Window close gadget image */
  124. #define SDEPTHIMAGE    (0x05L)    /* Screen depth gadget image */
  125. #define LEFTIMAGE    (0x0AL)    /* Left-arrow gadget image */
  126. #define UPIMAGE        (0x0BL)    /* Up-arrow gadget image */
  127. #define RIGHTIMAGE    (0x0CL)    /* Right-arrow gadget image */
  128. #define DOWNIMAGE    (0x0DL)    /* Down-arrow gadget image */
  129. #define CHECKIMAGE    (0x0EL)    /* GadTools checkbox image */
  130. #define MXIMAGE        (0x0FL)    /* GadTools mutual exclude "button" image */
  131. /* New for V39: */
  132. #define    MENUCHECK    (0x10L)    /* Menu checkmark image */
  133. #define AMIGAKEY    (0x11L)    /* Menu Amiga-key image */
  134.  
  135. /* Data values for IA_FrameType (recognized by FrameIClass)
  136.  *
  137.  * FRAME_DEFAULT:  The standard V37-type frame, which has
  138.  *    thin edges.
  139.  * FRAME_BUTTON:  Standard button gadget frames, having thicker
  140.  *    sides and nicely edged corners.
  141.  * FRAME_RIDGE:  A ridge such as used by standard string gadgets.
  142.  *    You can recess the ridge to get a groove image.
  143.  * FRAME_ICONDROPBOX: A broad ridge which is the standard imagery
  144.  *    for areas in AppWindows where icons may be dropped.
  145.  */
  146.  
  147. #define FRAME_DEFAULT        0
  148. #define FRAME_BUTTON        1
  149. #define FRAME_RIDGE        2
  150. #define FRAME_ICONDROPBOX    3
  151.  
  152.  
  153. /* image message id's    */
  154. #define    IM_DRAW    0x202L    /* draw yourself, with "state"        */
  155. #define    IM_HITTEST    0x203L    /* return TRUE if click hits image    */
  156. #define    IM_ERASE    0x204L    /* erase yourself            */
  157. #define    IM_MOVE    0x205L    /* draw new and erase old, smoothly    */
  158.  
  159. #define    IM_DRAWFRAME    0x206L    /* draw with specified dimensions    */
  160. #define    IM_FRAMEBOX    0x207L    /* get recommended frame around some box*/
  161. #define    IM_HITFRAME    0x208L    /* hittest with dimensions        */
  162. #define    IM_ERASEFRAME 0x209L    /* hittest with dimensions        */
  163.  
  164. /* image draw states or styles, for IM_DRAW */
  165. /* Note that they have no bitwise meanings (unfortunately) */
  166. #define    IDS_NORMAL        (0L)
  167. #define    IDS_SELECTED        (1L)    /* for selected gadgets        */
  168. #define    IDS_DISABLED        (2L)    /* for disabled gadgets        */
  169. #define       IDS_BUSY        (3L)    /* for future functionality */
  170. #define    IDS_INDETERMINATE    (4L)    /* for future functionality */
  171. #define    IDS_INACTIVENORMAL    (5L)    /* normal, in inactive window border */
  172. #define    IDS_INACTIVESELECTED    (6L)    /* selected, in inactive border */
  173. #define    IDS_INACTIVEDISABLED    (7L)    /* disabled, in inactive border */
  174. #define       IDS_SELECTEDDISABLED (8L)    /* disabled and selected    */
  175.  
  176. /* oops, please forgive spelling error by jimm */
  177. #define IDS_INDETERMINANT IDS_INDETERMINATE
  178.  
  179. /* IM_FRAMEBOX    */
  180. struct impFrameBox {
  181.     ULONG        MethodID;
  182.     struct IBox    *imp_ContentsBox;    /* input: relative box of contents */
  183.     struct IBox    *imp_FrameBox;        /* output: rel. box of encl frame  */
  184.     struct DrawInfo    *imp_DrInfo;    /* NB: May be NULL */
  185.     ULONG    imp_FrameFlags;
  186. };
  187.  
  188. #define FRAMEF_SPECIFY    (1<<0)    /* Make do with the dimensions of FrameBox
  189.                  * provided.
  190.                  */
  191.  
  192. /* IM_DRAW, IM_DRAWFRAME    */
  193. struct impDraw {
  194.     ULONG        MethodID;
  195.     struct RastPort    *imp_RPort;
  196.     struct {
  197.     WORD    X;
  198.     WORD    Y;
  199.     }            imp_Offset;
  200.  
  201.     ULONG        imp_State;
  202.     struct DrawInfo    *imp_DrInfo;    /* NB: May be NULL */
  203.  
  204.     /* these parameters only valid for IM_DRAWFRAME */
  205.     struct {
  206.     WORD    Width;
  207.     WORD    Height;
  208.     }            imp_Dimensions;
  209. };
  210.  
  211. /* IM_ERASE, IM_ERASEFRAME    */
  212. /* NOTE: This is a subset of impDraw    */
  213. struct impErase {
  214.     ULONG        MethodID;
  215.     struct RastPort    *imp_RPort;
  216.     struct {
  217.     WORD    X;
  218.     WORD    Y;
  219.     }            imp_Offset;
  220.  
  221.     /* these parameters only valid for IM_ERASEFRAME */
  222.     struct {
  223.     WORD    Width;
  224.     WORD    Height;
  225.     }            imp_Dimensions;
  226. };
  227.  
  228. /* IM_HITTEST, IM_HITFRAME    */
  229. struct impHitTest {
  230.     ULONG        MethodID;
  231.     struct {
  232.     WORD    X;
  233.     WORD    Y;
  234.     }            imp_Point;
  235.  
  236.     /* these parameters only valid for IM_HITFRAME */
  237.     struct {
  238.     WORD    Width;
  239.     WORD    Height;
  240.     }            imp_Dimensions;
  241. };
  242.  
  243. /* Include obsolete identifiers: */
  244. #ifndef INTUITION_IOBSOLETE_H
  245. #include <intuition/iobsolete.h>
  246. #endif
  247.  
  248. #endif
  249.