1 #ifndef INTUITION_IMAGECLASS_H
2 #define INTUITION_IMAGECLASS_H
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: Headerfile for Intuitions' IMAGECLASS
12 #ifndef UTILITY_TAGITEM_H
13 # include <utility/tagitem.h>
16 /* Image.depth for IMAGECLASS objects */
17 #define CUSTOMIMAGEDEPTH (-1)
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 )
25 /* Pack two UWORDs into one ULONG */
26 #define IAM_Resolution(x,y) ((ULONG)(((UWORD)(x))<<16 | ((UWORD)(y))))
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
40 #define IA_Resolution (IA_Dummy + 0x0F) /* Packed UWORDs with x/y
42 DrawInfo.Resolution */
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 /* to specify that the interior of a frame should not be cleared */
54 #define IA_EdgesOnly (IA_Dummy + 0x17)
56 /* SYSICLASS attributes */
57 #define SYSIA_Size (IA_Dummy + 0x0B) /* See #define's below */
58 #define SYSIA_Depth (IA_Dummy + 0x0C)
59 #define SYSIA_Which (IA_Dummy + 0x0D) /* See #define's below */
60 #define SYSIA_DrawInfo (IA_Dummy + 0x18) /* Must be specified */
62 #define SYSIA_ReferenceFont (IA_Dummy + 0x19)
63 #define IA_SupportsDisable (IA_Dummy + 0x1a) /* Tell intuition to
64 use IDS_*DISABLED instead
66 #define IA_FrameType (IA_Dummy + 0x1b) /* See FRAME_* */
68 /* Private AROS sysiclass tags and defines*/
70 #define SYSIA_WithBorder IA_FGPen /* default: TRUE */
71 #define SYSIA_Style IA_BGPen /* default: SYSISTYLE_NORMAL */
73 #define SYSISTYLE_NORMAL 0
74 #define SYSISTYLE_GADTOOLS 1 /* to get arrow images in gadtools look */
76 /* next attribute: (IA_Dummy + 0x1c) */
78 /* Values for SYSIA_Size */
79 #define SYSISIZE_MEDRES (0)
80 #define SYSISIZE_LOWRES (1)
81 #define SYSISIZE_HIRES (2)
83 /* Values for SYSIA_Which */
84 #define DEPTHIMAGE (0x00L) /* Window depth gadget image */
85 #define ZOOMIMAGE (0x01L) /* Window zoom gadget image */
86 #define SIZEIMAGE (0x02L) /* Window sizing gadget image */
87 #define CLOSEIMAGE (0x03L) /* Window close gadget image */
88 #define SDEPTHIMAGE (0x05L) /* Screen depth gadget image */
89 #define LEFTIMAGE (0x0AL) /* Left-arrow gadget image */
90 #define UPIMAGE (0x0BL) /* Up-arrow gadget image */
91 #define RIGHTIMAGE (0x0CL) /* Right-arrow gadget image */
92 #define DOWNIMAGE (0x0DL) /* Down-arrow gadget image */
93 #define CHECKIMAGE (0x0EL) /* GadTools checkbox image */
94 #define MXIMAGE (0x0FL) /* GadTools mutual exclude "button" image */
95 #define MENUCHECK (0x10L) /* Menu checkmark image */
96 #define AMIGAKEY (0x11L) /* Menu Amiga-key image */
98 /* Values for IA_FrameType (FrameIClass)
100 FRAME_DEFAULT: The standard V37-type frame, which has thin edges.
101 FRAME_BUTTON: Standard button gadget frames, having thicker
102 sides and nicely edged corners.
103 FRAME_RIDGE: A ridge such as used by standard string gadgets.
104 You can recess the ridge to get a groove image.
105 FRAME_ICONDROPBOX: A broad ridge which is the standard imagery
106 for areas in AppWindows where icons may be dropped.
108 #define FRAME_DEFAULT 0
109 #define FRAME_BUTTON 1
110 #define FRAME_RIDGE 2
111 #define FRAME_ICONDROPBOX 3
114 /* image message id's */
115 #define IM_DRAW 0x202L /* draw yourself, with "state" */
116 #define IM_HITTEST 0x203L /* return TRUE if click hits image */
117 #define IM_ERASE 0x204L /* erase yourself */
118 #define IM_MOVE 0x205L /* draw new and erase old, smoothly */
119 #define IM_DRAWFRAME 0x206L /* draw with specified dimensions */
120 #define IM_FRAMEBOX 0x207L /* get recommended frame around some box */
121 #define IM_HITFRAME 0x208L /* hittest with dimensions */
122 #define IM_ERASEFRAME 0x209L /* hittest with dimensions */
124 /* image draw states or styles, for IM_DRAW */
125 #define IDS_NORMAL (0L)
126 #define IDS_SELECTED (1L) /* for selected gadgets */
127 #define IDS_DISABLED (2L) /* for disabled gadgets */
128 #define IDS_BUSY (3L) /* for future functionality */
129 #define IDS_INDETERMINATE (4L) /* for future functionality */
130 #define IDS_INACTIVENORMAL (5L) /* normal, in inactive window border */
131 #define IDS_INACTIVESELECTED (6L) /* selected, in inactive border */
132 #define IDS_INACTIVEDISABLED (7L) /* disabled, in inactive border */
133 #define IDS_SELECTEDDISABLED (8L) /* disabled and selected */
139 struct IBox
* imp_ContentsBox
; /* in: relative box of contents */
140 struct IBox
* imp_FrameBox
; /* out: rel. box of enclosing frame */
141 struct DrawInfo
* imp_DrInfo
; /* May be NULL */
142 STACKULONG imp_FrameFlags
;
145 #define FRAMEF_SPECIFY (1<<0)
159 /* IM_DRAW, IM_DRAWFRAME */
163 struct RastPort
*imp_RPort
;
164 struct impPos imp_Offset
;
165 STACKULONG imp_State
;
166 struct DrawInfo
*imp_DrInfo
; /* May be NULL */
168 /* Only valid for IM_DRAWFRAME */
169 struct impSize imp_Dimensions
;
172 /* IM_ERASE, IM_ERASEFRAME */
173 /* NOTE: This is a subset of impDraw */
177 struct RastPort
*imp_RPort
;
178 struct impPos imp_Offset
;
180 /* Only valid for IM_ERASEFRAME */
181 struct impSize imp_Dimensions
;
184 /* IM_HITTEST, IM_HITFRAME */
187 struct impPos imp_Point
;
189 /* Only valid for IM_HITFRAME */
190 struct impSize imp_Dimensions
;
193 #endif /* INTUITION_IMAGECLASS_H */