home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROS_m68k_bin.lha / AROS / include / intuition / imageclass.h < prev   
C/C++ Source or Header  |  1997-02-08  |  6KB  |  185 lines

  1. #ifndef INTUITION_IMAGECLASS_H
  2. #define INTUITION_IMAGECLASS_H
  3.  
  4. /*
  5.     (C) 1995-96 AROS - The Amiga Replacement OS
  6.     $Id: imageclass.h,v 1.2 1996/11/19 11:02:08 aros Exp $
  7.  
  8.     Desc: Headerfile for Intuitions' IMAGECLASS
  9.     Lang: english
  10. */
  11.  
  12. #ifndef UTILITY_TAGITEM_H
  13. #   include <utility/tagitem.h>
  14. #endif
  15.  
  16. /* Image.depth for IMAGECLASS objects */
  17. #define CUSTOMIMAGEDEPTH    (-1)
  18.  
  19. /* Macros */
  20. #define GADGET_BOX( g ) ( (struct IBox *) &((struct Gadget *)(g))->LeftEdge )
  21. #define IM_BOX( im )    ( (struct IBox *) &((struct Image *)(im))->LeftEdge )
  22. #define IM_FGPEN( im )  ( (im)->PlanePick )
  23. #define IM_BGPEN( im )  ( (im)->PlaneOnOff )
  24.  
  25. /* Pack two UWORDs into one ULONG */
  26. #define IAM_Resolution(x,y)     ((ULONG)(((UWORD)(x))<<16 | ((UWORD)(y))))
  27.  
  28. /* Attributes for IMAGECLASS */
  29. #define IA_Dummy        (TAG_USER + 0x20000)
  30. #define IA_Left         (IA_Dummy + 0x01)
  31. #define IA_Top            (IA_Dummy + 0x02)
  32. #define IA_Width        (IA_Dummy + 0x03)
  33. #define IA_Height        (IA_Dummy + 0x04)
  34. #define IA_FGPen        (IA_Dummy + 0x05) /* Alias: PlanePick */
  35. #define IA_BGPen        (IA_Dummy + 0x06) /* Alias: PlaneOnOff */
  36. #define IA_Data         (IA_Dummy + 0x07) /* Image data or similar */
  37. #define IA_LineWidth        (IA_Dummy + 0x08)
  38. #define IA_Pens         (IA_Dummy + 0x0E) /* UWORD pens[] with ~0 as
  39.                              the last element */
  40. #define IA_Resolution        (IA_Dummy + 0x0F) /* Packed UWORDs with x/y
  41.                              resolution ala
  42.                              DrawInfo.Resolution */
  43.  
  44.  
  45. /* Not all classes support these */
  46. #define IA_APattern        (IA_Dummy + 0x10)
  47. #define IA_APatSize        (IA_Dummy + 0x11)
  48. #define IA_Mode         (IA_Dummy + 0x12)
  49. #define IA_Font         (IA_Dummy + 0x13)
  50. #define IA_Outline        (IA_Dummy + 0x14)
  51. #define IA_Recessed        (IA_Dummy + 0x15)
  52. #define IA_DoubleEmboss     (IA_Dummy + 0x16)
  53. #define IA_EdgesOnly        (IA_Dummy + 0x17)
  54.  
  55. /* SYSICLASS attributes */
  56. #define SYSIA_Size        (IA_Dummy + 0x0B) /* See #define's below */
  57. #define SYSIA_Depth        (IA_Dummy + 0x0C)
  58. #define SYSIA_Which        (IA_Dummy + 0x0D) /* See #define's below */
  59. #define SYSIA_DrawInfo        (IA_Dummy + 0x18) /* Must be specified */
  60.  
  61. #define SYSIA_ReferenceFont    (IA_Dummy + 0x19)
  62. #define IA_SupportsDisable    (IA_Dummy + 0x1a) /* Tell intuition to
  63.                              use IDS_*DISABLED instead
  64.                              of own code */
  65. #define IA_FrameType        (IA_Dummy + 0x1b) /* See FRAME_* */
  66.  
  67. /* next attribute: (IA_Dummy + 0x1c) */
  68.  
  69. /* Values for SYSIA_Size */
  70. #define SYSISIZE_MEDRES (0)
  71. #define SYSISIZE_LOWRES (1)
  72. #define SYSISIZE_HIRES    (2)
  73.  
  74. /* Values for SYSIA_Which */
  75. #define DEPTHIMAGE    (0x00L) /* Window depth gadget image */
  76. #define ZOOMIMAGE    (0x01L) /* Window zoom gadget image */
  77. #define SIZEIMAGE    (0x02L) /* Window sizing gadget image */
  78. #define CLOSEIMAGE    (0x03L) /* Window close gadget image */
  79. #define SDEPTHIMAGE    (0x05L) /* Screen depth gadget image */
  80. #define LEFTIMAGE    (0x0AL) /* Left-arrow gadget image */
  81. #define UPIMAGE     (0x0BL) /* Up-arrow gadget image */
  82. #define RIGHTIMAGE    (0x0CL) /* Right-arrow gadget image */
  83. #define DOWNIMAGE    (0x0DL) /* Down-arrow gadget image */
  84. #define CHECKIMAGE    (0x0EL) /* GadTools checkbox image */
  85. #define MXIMAGE     (0x0FL) /* GadTools mutual exclude "button" image */
  86. #define MENUCHECK    (0x10L) /* Menu checkmark image */
  87. #define AMIGAKEY    (0x11L) /* Menu Amiga-key image */
  88.  
  89. /* Values for IA_FrameType (FrameIClass)
  90.  
  91.     FRAME_DEFAULT: The standard V37-type frame, which has thin edges.
  92.     FRAME_BUTTON:  Standard button gadget frames, having thicker
  93.     sides and nicely edged corners.
  94.     FRAME_RIDGE:  A ridge such as used by standard string gadgets.
  95.     You can recess the ridge to get a groove image.
  96.     FRAME_ICONDROPBOX: A broad ridge which is the standard imagery
  97.     for areas in AppWindows where icons may be dropped.
  98. */
  99. #define FRAME_DEFAULT        0
  100. #define FRAME_BUTTON        1
  101. #define FRAME_RIDGE        2
  102. #define FRAME_ICONDROPBOX    3
  103.  
  104.  
  105. /* image message id's   */
  106. #define IM_DRAW       0x202L  /* draw yourself, with "state" */
  107. #define IM_HITTEST    0x203L  /* return TRUE if click hits image */
  108. #define IM_ERASE      0x204L  /* erase yourself */
  109. #define IM_MOVE       0x205L  /* draw new and erase old, smoothly */
  110. #define IM_DRAWFRAME  0x206L  /* draw with specified dimensions */
  111. #define IM_FRAMEBOX   0x207L  /* get recommended frame around some box */
  112. #define IM_HITFRAME   0x208L  /* hittest with dimensions */
  113. #define IM_ERASEFRAME 0x209L  /* hittest with dimensions */
  114.  
  115. /* image draw states or styles, for IM_DRAW */
  116. #define IDS_NORMAL         (0L)
  117. #define IDS_SELECTED         (1L)   /* for selected gadgets */
  118. #define IDS_DISABLED         (2L)   /* for disabled gadgets */
  119. #define IDS_BUSY         (3L)   /* for future functionality */
  120. #define IDS_INDETERMINATE    (4L)   /* for future functionality */
  121. #define IDS_INACTIVENORMAL   (5L)   /* normal, in inactive window border */
  122. #define IDS_INACTIVESELECTED (6L)   /* selected, in inactive border */
  123. #define IDS_INACTIVEDISABLED (7L)   /* disabled, in inactive border */
  124. #define IDS_SELECTEDDISABLED (8L)   /* disabled and selected */
  125.  
  126. /* IM_FRAMEBOX    */
  127. struct impFrameBox
  128. {
  129.     STACKULONG          MethodID;
  130.     struct IBox     * imp_ContentsBox;    /* in: relative box of contents */
  131.     struct IBox     * imp_FrameBox;    /* out: rel. box of enclosing frame */
  132.     struct DrawInfo * imp_DrInfo;    /* May be NULL */
  133.     STACKULONG          imp_FrameFlags;
  134. };
  135.  
  136. #define FRAMEF_SPECIFY    (1<<0)
  137.  
  138. struct impPos
  139. {
  140.     STACKWORD     X;
  141.     STACKWORD     Y;
  142. };
  143.  
  144. struct impSize
  145. {
  146.     STACKWORD     Width;
  147.     STACKWORD     Height;
  148. };
  149.  
  150. /* IM_DRAW, IM_DRAWFRAME */
  151. struct impDraw
  152. {
  153.     STACKULONG        MethodID;
  154.     struct RastPort    *imp_RPort;
  155.     struct impPos    imp_Offset;
  156.     STACKULONG        imp_State;
  157.     struct DrawInfo    *imp_DrInfo;    /* May be NULL */
  158.  
  159.     /* Only valid for IM_DRAWFRAME */
  160.     struct impSize    imp_Dimensions;
  161. };
  162.  
  163. /* IM_ERASE, IM_ERASEFRAME    */
  164. /* NOTE: This is a subset of impDraw    */
  165. struct impErase
  166. {
  167.     STACKULONG        MethodID;
  168.     struct RastPort    *imp_RPort;
  169.     struct impPos    imp_Offset;
  170.  
  171.     /* Only valid for IM_ERASEFRAME */
  172.     struct impSize    imp_Dimensions;
  173. };
  174.  
  175. /* IM_HITTEST, IM_HITFRAME    */
  176. struct impHitTest {
  177.     STACKULONG        MethodID;
  178.     struct impPos    imp_Point;
  179.  
  180.     /* Only valid for IM_HITFRAME */
  181.     struct impSize    imp_Dimensions;
  182. };
  183.  
  184. #endif /* INTUITION_IMAGECLASS_H */
  185.