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

  1. #ifndef INTUITION_IMAGECLASS_H
  2. #define INTUITION_IMAGECLASS_H TRUE
  3. /*
  4. ** imageclass.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 imageclass.h
  17. */
  18. #ifndef impDrawPtr
  19. #define impDrawPtr ADDRESS
  20. #endif
  21. #ifndef impErasePtr
  22. #define impErasePtr ADDRESS
  23. #endif
  24. #ifndef impFrameBoxPtr
  25. #define impFrameBoxPtr ADDRESS
  26. #endif
  27. #ifndef impHitTestPtr
  28. #define impHitTestPtr ADDRESS
  29. #endif
  30. #ifndef imp_Dimensions_StructPtr
  31. #define imp_Dimensions_StructPtr ADDRESS
  32. #endif
  33. #ifndef imp_Offset_StructPtr
  34. #define imp_Offset_StructPtr ADDRESS
  35. #endif
  36. #ifndef imp_Point_StructPtr
  37. #define imp_Point_StructPtr ADDRESS
  38. #endif
  39. /*
  40. ** End of StructPointer defines for imageclass.h
  41. */
  42.  
  43.  
  44.  
  45. #ifndef UTILITY_TAGITEM_H
  46. #include <utility/tagitem.h>
  47. #endif
  48.  
  49. /*
  50.  * NOTE:  <intuition/iobsolete.h> is included at the END of this file!
  51.  */
  52.  
  53. #define CUSTOMIMAGEDEPTH    (-1)
  54. /* if image.Depth is this,  it's a new Image class object */
  55.  
  56. /* some convenient macros and casts */
  57. /*
  58. #define GADGET_BOX( g ) ( (STRUCT IBox *) &((STRUCT Gadget *)(g))->LeftEdge )
  59. #define IM_BOX( im )    ( (STRUCT IBox *) &((STRUCT Image *)(im))->LeftEdge )
  60. #define IM_FGPEN( im )  ( (im)->PlanePick )
  61. #define IM_BGPEN( im )  ( (im)->PlaneOnOff )
  62. */
  63.  
  64. /******************************************************/
  65. #define IA_Dummy        (TAG_USER + &H20000)
  66. #define IA_Left         (IA_Dummy + &H01)
  67. #define IA_Top          (IA_Dummy + &H02)
  68. #define IA_Width        (IA_Dummy + &H03)
  69. #define IA_Height       (IA_Dummy + &H04)
  70. #define IA_FGPen        (IA_Dummy + &H05)
  71.             /* IA_FGPen also means "PlanePick"  */
  72. #define IA_BGPen        (IA_Dummy + &H06)
  73.             /* IA_BGPen also means "PlaneOnOff" */
  74. #define IA_Data         (IA_Dummy + &H07)
  75.             /* bitplanes,  for classic image, 
  76.              * other image classes may use it for other things
  77.              */
  78. #define IA_LineWidth        (IA_Dummy + &H08)
  79. #define IA_Pens         (IA_Dummy + &H0E)
  80.             /* pointer to SHORTINT pens[], 
  81.              * ala DrawInfo.Pens,  MUST be
  82.              * terminated by ~0.  Some classes can
  83.              * choose to have this,  or SYSIA_DrawInfo, 
  84.              * or both.
  85.              */
  86. #define IA_Resolution       (IA_Dummy + &H0F)
  87.             /* packed uwords for x/y resolution into a longword
  88.              * ala DrawInfo.Resolution
  89.              */
  90.  
  91. /**** see class documentation to learn which    *****/
  92. /**** classes recognize these           *****/
  93. #define IA_APattern     (IA_Dummy + &H10)
  94. #define IA_APatSize     (IA_Dummy + &H11)
  95. #define IA_Mode         (IA_Dummy + &H12)
  96. #define IA_Font         (IA_Dummy + &H13)
  97. #define IA_Outline      (IA_Dummy + &H14)
  98. #define IA_Recessed     (IA_Dummy + &H15)
  99. #define IA_DoubleEmboss     (IA_Dummy + &H16)
  100. #define IA_EdgesOnly        (IA_Dummy + &H17)
  101.  
  102. /**** "sysiclass" attributes            *****/
  103. #define SYSIA_Size      (IA_Dummy + &H0B)
  104.             /* #define's below      */
  105. #define SYSIA_Depth     (IA_Dummy + &H0C)
  106.             /* this is unused by Intuition.  SYSIA_DrawInfo
  107.              * is used instead for V36
  108.              */
  109. #define SYSIA_Which     (IA_Dummy + &H0D)
  110.             /* see #define's below  */
  111. #define SYSIA_DrawInfo      (IA_Dummy + &H18)
  112.             /* pass to sysiclass,  please */
  113.  
  114. /*****  obsolete: don't use these,  use IA_Pens  *****/
  115. #define SYSIA_Pens      IA_Pens
  116. #define IA_ShadowPen        (IA_Dummy + &H09)
  117. #define IA_HighlightPen     (IA_Dummy + &H0A)
  118.  
  119. /* New for V39: */
  120. #define SYSIA_ReferenceFont (IA_Dummy + &H19)
  121.             /* Font to use as reference for scaling
  122.              * certain sysiclass images
  123.              */
  124. #define IA_SupportsDisable  (IA_Dummy + &H1a)
  125.             /* By default,  Intuition ghosts gadgets itself, 
  126.              * instead of relying on IDS_DISABLED or
  127.              * IDS_SELECTEDDISABLED.  An imageclass that
  128.              * supports these states should return this attribute
  129.              * as TRUE.  You cannot set or clear this attribute, 
  130.              * however.
  131.              */
  132.  
  133. #define IA_FrameType        (IA_Dummy + &H1b)
  134.             /* Starting with V39,  FrameIClass recognizes
  135.              * several standard types of frame.  Use one
  136.              * of the FRAME_ specifiers below.  Defaults
  137.              * to FRAME_DEFAULT.
  138.              */
  139.  
  140. /** next attribute: (IA_Dummy + &H1c)   **/
  141. /*************************************************/
  142.  
  143. /* data values for SYSIA_Size   */
  144. #define SYSISIZE_MEDRES (0)
  145. #define SYSISIZE_LOWRES (1)
  146. #define SYSISIZE_HIRES  (2)
  147.  
  148. /*
  149.  * SYSIA_Which tag data values:
  150.  * Specifies which system gadget you want an image for.
  151.  * Some numbers correspond to internal Intuition #defines
  152.  */
  153. #define DEPTHIMAGE  (&H00&) /* Window depth gadget image */
  154. #define ZOOMIMAGE   (&H01&) /* Window zoom gadget image */
  155. #define SIZEIMAGE   (&H02&) /* Window sizing gadget image */
  156. #define CLOSEIMAGE  (&H03&) /* Window close gadget image */
  157. #define SDEPTHIMAGE (&H05&) /* Screen depth gadget image */
  158. #define LEFTIMAGE   (&H0A&) /* Left-arrow gadget image */
  159. #define UPIMAGE     (&H0B&) /* Up-arrow gadget image */
  160. #define RIGHTIMAGE  (&H0C&) /* Right-arrow gadget image */
  161. #define DOWNIMAGE   (&H0D&) /* Down-arrow gadget image */
  162. #define CHECKIMAGE  (&H0E&) /* GadTools checkbox image */
  163. #define MXIMAGE     (&H0F&) /* GadTools mutual exclude "button" image */
  164. /* New for V39: */
  165. #define MENUCHECK   (&H10&) /* Menu checkmark image */
  166. #define AMIGAKEY    (&H11&) /* Menu Amiga-key image */
  167.  
  168. /* Data values for IA_FrameType (recognized by FrameIClass)
  169.  *
  170.  * FRAME_DEFAULT:  The standard V37-type frame,  which has
  171.  *  thin edges.
  172.  * FRAME_BUTTON:  Standard button gadget frames,  having thicker
  173.  *  sides and nicely edged corners.
  174.  * FRAME_RIDGE:  A ridge such as used by standard string gadgets.
  175.  *  You can recess the ridge to get a groove image.
  176.  * FRAME_ICONDROPBOX: A broad ridge which is the standard imagery
  177.  *  for areas in AppWindows where icons may be dropped.
  178.  */
  179.  
  180. #define FRAME_DEFAULT       0
  181. #define FRAME_BUTTON        1
  182. #define FRAME_RIDGE     2
  183. #define FRAME_ICONDROPBOX   3
  184.  
  185.  
  186. /* image message id's   */
  187. #define    IM_DRAW  &H202&  /* draw yourself,  with "state"      */
  188. #define    IM_HITTEST   &H203&  /* return TRUE if click hits image  */
  189. #define    IM_ERASE &H204&  /* erase yourself           */
  190. #define    IM_MOVE  &H205&  /* draw new and erase old,  smoothly */
  191.  
  192. #define    IM_DRAWFRAME &H206&  /* draw with specified dimensions   */
  193. #define    IM_FRAMEBOX  &H207&  /* get recommended frame around some box*/
  194. #define    IM_HITFRAME  &H208&  /* hittest with dimensions      */
  195. #define    IM_ERASEFRAME &H209& /* hittest with dimensions      */
  196.  
  197. /* image draw states or styles,  for IM_DRAW */
  198. /* Note that they have no bitwise meanings (unfortunately) */
  199. #define    IDS_NORMAL       (0&)
  200. #define    IDS_SELECTED     (1&)    /* for selected gadgets     */
  201. #define    IDS_DISABLED     (2&)    /* for disabled gadgets     */
  202. #define    IDS_BUSY     (3&)    /* for future functionality */
  203. #define    IDS_INDETERMINATE    (4&)    /* for future functionality */
  204. #define    IDS_INACTIVENORMAL   (5&)    /* normal,  in inactive window border */
  205. #define    IDS_INACTIVESELECTED (6&)    /* selected,  in inactive border */
  206. #define    IDS_INACTIVEDISABLED (7&)    /* disabled,  in inactive border */
  207. #define    IDS_SELECTEDDISABLED (8&)    /* disabled and selected    */
  208.  
  209. /* oops,  please forgive spelling error by jimm */
  210. #define IDS_INDETERMINANT IDS_INDETERMINATE
  211.  
  212. /* IM_FRAMEBOX  */
  213. STRUCT impFrameBox  
  214.     LONGINT       MethodID 
  215.     IBoxPtr  imp_ContentsBox    /* input: relative box of contents */
  216.     IBoxPtr  imp_FrameBox       /* output: rel. box of encl frame  */
  217.     DrawInfoPtr  imp_DrInfo     /* NB: May be NULL */
  218.     LONGINT   imp_FrameFlags 
  219. END STRUCT 
  220.  
  221. #define FRAMEF_SPECIFY  (&H1)  /* Make do with the dimensions of FrameBox
  222.                  * provided.
  223.                  */
  224.  
  225. /* IM_DRAW,  IM_DRAWFRAME    */
  226.  
  227. STRUCT imp_Offset_Struct  
  228.     SHORTINT    X 
  229.     SHORTINT    Y 
  230. END STRUCT 
  231.  
  232. STRUCT imp_Dimensions_Struct  
  233.     SHORTINT    _Width 
  234.     SHORTINT    Height 
  235. END STRUCT 
  236.  
  237. STRUCT impDraw  
  238.     LONGINT       MethodID 
  239.     RastPortPtr  imp_RPort 
  240.     imp_Offset_Struct imp_Offset 
  241.  
  242.     LONGINT       imp_State 
  243.     DrawInfoPtr  imp_DrInfo     /* NB: May be NULL */
  244.  
  245.     /* these parameters only valid for IM_DRAWFRAME */
  246.     imp_Dimensions_Struct imp_Dimensions 
  247. END STRUCT 
  248.  
  249. /* IM_ERASE,  IM_ERASEFRAME  */
  250. /* NOTE: This is a subset of impDraw    */
  251.  
  252. STRUCT impErase  
  253.     LONGINT       MethodID 
  254.     RastPortPtr  imp_RPort 
  255.     imp_Offset_Struct imp_Offset 
  256.  
  257.     /* these parameters only valid for IM_ERASEFRAME */
  258.     imp_Dimensions_Struct imp_Dimensions 
  259. END STRUCT 
  260.  
  261. /* IM_HITTEST,  IM_HITFRAME  */
  262.  
  263. STRUCT imp_Point_Struct  
  264.     SHORTINT    X 
  265.     SHORTINT    Y 
  266. END STRUCT 
  267.  
  268. STRUCT impHitTest  
  269.     LONGINT       MethodID 
  270.     imp_Point_Struct imp_Point 
  271.  
  272.     /* these parameters only valid for IM_HITFRAME */
  273.     imp_Dimensions_Struct imp_Dimensions 
  274. END STRUCT 
  275.  
  276. /* Include obsolete identifiers: */
  277. #ifndef INTUITION_IOBSOLETE_H
  278. #include <intuition/iobsolete.h>
  279. #endif
  280.  
  281. #endif
  282.