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_UserBuffer (IA_Dummy + 0x20) /* Only for system Images */
63 #define SYSIA_DrawInfo (IA_Dummy + 0x18) /* Must be specified */
65 #define SYSIA_ReferenceFont (IA_Dummy + 0x19)
66 #define IA_SupportsDisable (IA_Dummy + 0x1a) /* Tell intuition to
67 use IDS_*DISABLED instead
69 #define IA_FrameType (IA_Dummy + 0x1b) /* See FRAME_* */
71 /* Private AROS sysiclass tags and defines*/
73 #define SYSIA_WithBorder IA_FGPen /* default: TRUE */
74 #define SYSIA_Style IA_BGPen /* default: SYSISTYLE_NORMAL */
76 #define SYSISTYLE_NORMAL 0
77 #define SYSISTYLE_GADTOOLS 1 /* to get arrow images in gadtools look */
79 /* next attribute: (IA_Dummy + 0x1c) */
81 /* Values for SYSIA_Size */
82 #define SYSISIZE_MEDRES (0)
83 #define SYSISIZE_LOWRES (1)
84 #define SYSISIZE_HIRES (2)
86 /* Values for SYSIA_Which */
87 #define DEPTHIMAGE (0x00L) /* Window depth gadget image */
88 #define ZOOMIMAGE (0x01L) /* Window zoom gadget image */
89 #define SIZEIMAGE (0x02L) /* Window sizing gadget image */
90 #define CLOSEIMAGE (0x03L) /* Window close gadget image */
91 #define SDEPTHIMAGE (0x05L) /* Screen depth gadget image */
92 #define LEFTIMAGE (0x0AL) /* Left-arrow gadget image */
93 #define UPIMAGE (0x0BL) /* Up-arrow gadget image */
94 #define RIGHTIMAGE (0x0CL) /* Right-arrow gadget image */
95 #define DOWNIMAGE (0x0DL) /* Down-arrow gadget image */
96 #define CHECKIMAGE (0x0EL) /* GadTools checkbox image */
97 #define MXIMAGE (0x0FL) /* GadTools mutual exclude "button" image */
98 #define MENUCHECK (0x10L) /* Menu checkmark image */
99 #define AMIGAKEY (0x11L) /* Menu Amiga-key image */
101 /* Values for IA_FrameType (FrameIClass)
103 FRAME_DEFAULT: The standard V37-type frame, which has thin edges.
104 FRAME_BUTTON: Standard button gadget frames, having thicker
105 sides and nicely edged corners.
106 FRAME_RIDGE: A ridge such as used by standard string gadgets.
107 You can recess the ridge to get a groove image.
108 FRAME_ICONDROPBOX: A broad ridge which is the standard imagery
109 for areas in AppWindows where icons may be dropped.
111 #define FRAME_DEFAULT 0
112 #define FRAME_BUTTON 1
113 #define FRAME_RIDGE 2
114 #define FRAME_ICONDROPBOX 3
117 /* image message id's */
118 #define IM_DRAW 0x202L /* draw yourself, with "state" */
119 #define IM_HITTEST 0x203L /* return TRUE if click hits image */
120 #define IM_ERASE 0x204L /* erase yourself */
121 #define IM_MOVE 0x205L /* draw new and erase old, smoothly */
122 #define IM_DRAWFRAME 0x206L /* draw with specified dimensions */
123 #define IM_FRAMEBOX 0x207L /* get recommended frame around some box */
124 #define IM_HITFRAME 0x208L /* hittest with dimensions */
125 #define IM_ERASEFRAME 0x209L /* hittest with dimensions */
127 /* image draw states or styles, for IM_DRAW */
128 #define IDS_NORMAL (0L)
129 #define IDS_SELECTED (1L) /* for selected gadgets */
130 #define IDS_DISABLED (2L) /* for disabled gadgets */
131 #define IDS_BUSY (3L) /* for future functionality */
132 #define IDS_INDETERMINATE (4L) /* for future functionality */
133 #define IDS_INACTIVENORMAL (5L) /* normal, in inactive window border */
134 #define IDS_INACTIVESELECTED (6L) /* selected, in inactive border */
135 #define IDS_INACTIVEDISABLED (7L) /* disabled, in inactive border */
136 #define IDS_SELECTEDDISABLED (8L) /* disabled and selected */
141 STACKED ULONG MethodID
;
142 STACKED
struct IBox
* imp_ContentsBox
; /* in: relative box of contents */
143 STACKED
struct IBox
* imp_FrameBox
; /* out: rel. box of enclosing frame */
144 STACKED
struct DrawInfo
* imp_DrInfo
; /* May be NULL */
145 STACKED ULONG imp_FrameFlags
;
148 #define FRAMEF_SPECIFY (1<<0)
162 /* IM_DRAW, IM_DRAWFRAME */
165 STACKED ULONG MethodID
;
166 STACKED
struct RastPort
*imp_RPort
;
167 STACKED
struct impPos imp_Offset
;
168 STACKED ULONG imp_State
;
169 STACKED
struct DrawInfo
*imp_DrInfo
; /* May be NULL */
171 /* Only valid for IM_DRAWFRAME */
172 STACKED
struct impSize imp_Dimensions
;
175 /* IM_ERASE, IM_ERASEFRAME */
176 /* NOTE: This is a subset of impDraw */
179 STACKED ULONG MethodID
;
180 STACKED
struct RastPort
*imp_RPort
;
181 STACKED
struct impPos imp_Offset
;
183 /* Only valid for IM_ERASEFRAME */
184 STACKED
struct impSize imp_Dimensions
;
187 /* IM_HITTEST, IM_HITFRAME */
189 STACKED ULONG MethodID
;
190 STACKED
struct impPos imp_Point
;
192 /* Only valid for IM_HITFRAME */
193 STACKED
struct impSize imp_Dimensions
;
196 #endif /* INTUITION_IMAGECLASS_H */