muimaster.library: introduce a hack to make sure up/down arrows always work
[AROS.git] / compiler / include / intuition / imageclass.h
blob69f6e27eaf18b3221d9f2397117073c300b7b8a7
1 #ifndef INTUITION_IMAGECLASS_H
2 #define INTUITION_IMAGECLASS_H
4 /*
5 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Headerfile for Intuitions' IMAGECLASS
9 Lang: english
12 #ifndef UTILITY_TAGITEM_H
13 # include <utility/tagitem.h>
14 #endif
16 /* Image.depth for IMAGECLASS objects */
17 #define CUSTOMIMAGEDEPTH (-1)
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 )
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
39 the last element */
40 #define IA_Resolution (IA_Dummy + 0x0F) /* Packed UWORDs with x/y
41 resolution ala
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 */
62 #define SYSIA_DrawInfo (IA_Dummy + 0x18) /* Must be specified */
64 #define SYSIA_ReferenceFont (IA_Dummy + 0x19)
65 #define IA_SupportsDisable (IA_Dummy + 0x1a) /* Tell intuition to
66 use IDS_*DISABLED instead
67 of own code */
68 #define IA_FrameType (IA_Dummy + 0x1b) /* See FRAME_* */
70 /* Private AROS sysiclass tags and defines*/
72 #define SYSIA_WithBorder IA_FGPen /* default: TRUE */
73 #define SYSIA_Style IA_BGPen /* default: SYSISTYLE_NORMAL */
75 #define SYSISTYLE_NORMAL 0
76 #define SYSISTYLE_GADTOOLS 1 /* to get arrow images in gadtools look */
78 /* next attribute: (IA_Dummy + 0x1c) */
80 /* Values for SYSIA_Size */
81 #define SYSISIZE_MEDRES (0)
82 #define SYSISIZE_LOWRES (1)
83 #define SYSISIZE_HIRES (2)
85 /* Values for SYSIA_Which */
86 #define DEPTHIMAGE (0x00L) /* Window depth gadget image */
87 #define ZOOMIMAGE (0x01L) /* Window zoom gadget image */
88 #define SIZEIMAGE (0x02L) /* Window sizing gadget image */
89 #define CLOSEIMAGE (0x03L) /* Window close gadget image */
90 #define SDEPTHIMAGE (0x05L) /* Screen depth gadget image */
91 #define LEFTIMAGE (0x0AL) /* Left-arrow gadget image */
92 #define UPIMAGE (0x0BL) /* Up-arrow gadget image */
93 #define RIGHTIMAGE (0x0CL) /* Right-arrow gadget image */
94 #define DOWNIMAGE (0x0DL) /* Down-arrow gadget image */
95 #define CHECKIMAGE (0x0EL) /* GadTools checkbox image */
96 #define MXIMAGE (0x0FL) /* GadTools mutual exclude "button" image */
97 #define MENUCHECK (0x10L) /* Menu checkmark image */
98 #define AMIGAKEY (0x11L) /* Menu Amiga-key image */
100 /* Values for IA_FrameType (FrameIClass)
102 FRAME_DEFAULT: The standard V37-type frame, which has thin edges.
103 FRAME_BUTTON: Standard button gadget frames, having thicker
104 sides and nicely edged corners.
105 FRAME_RIDGE: A ridge such as used by standard string gadgets.
106 You can recess the ridge to get a groove image.
107 FRAME_ICONDROPBOX: A broad ridge which is the standard imagery
108 for areas in AppWindows where icons may be dropped.
110 #define FRAME_DEFAULT 0
111 #define FRAME_BUTTON 1
112 #define FRAME_RIDGE 2
113 #define FRAME_ICONDROPBOX 3
116 /* image message id's */
117 #define IM_DRAW 0x202L /* draw yourself, with "state" */
118 #define IM_HITTEST 0x203L /* return TRUE if click hits image */
119 #define IM_ERASE 0x204L /* erase yourself */
120 #define IM_MOVE 0x205L /* draw new and erase old, smoothly */
121 #define IM_DRAWFRAME 0x206L /* draw with specified dimensions */
122 #define IM_FRAMEBOX 0x207L /* get recommended frame around some box */
123 #define IM_HITFRAME 0x208L /* hittest with dimensions */
124 #define IM_ERASEFRAME 0x209L /* hittest with dimensions */
126 /* image draw states or styles, for IM_DRAW */
127 #define IDS_NORMAL (0L)
128 #define IDS_SELECTED (1L) /* for selected gadgets */
129 #define IDS_DISABLED (2L) /* for disabled gadgets */
130 #define IDS_BUSY (3L) /* for future functionality */
131 #define IDS_INDETERMINATE (4L) /* for future functionality */
132 #define IDS_INACTIVENORMAL (5L) /* normal, in inactive window border */
133 #define IDS_INACTIVESELECTED (6L) /* selected, in inactive border */
134 #define IDS_INACTIVEDISABLED (7L) /* disabled, in inactive border */
135 #define IDS_SELECTEDDISABLED (8L) /* disabled and selected */
137 /* IM_FRAMEBOX */
138 struct impFrameBox
140 STACKED ULONG MethodID;
141 STACKED struct IBox * imp_ContentsBox; /* in: relative box of contents */
142 STACKED struct IBox * imp_FrameBox; /* out: rel. box of enclosing frame */
143 STACKED struct DrawInfo * imp_DrInfo; /* May be NULL */
144 STACKED ULONG imp_FrameFlags;
147 #define FRAMEF_SPECIFY (1<<0)
149 struct impPos
151 STACKED WORD X;
152 STACKED WORD Y;
155 struct impSize
157 STACKED WORD Width;
158 STACKED WORD Height;
161 /* IM_DRAW, IM_DRAWFRAME */
162 struct impDraw
164 STACKED ULONG MethodID;
165 STACKED struct RastPort *imp_RPort;
166 STACKED struct impPos imp_Offset;
167 STACKED ULONG imp_State;
168 STACKED struct DrawInfo *imp_DrInfo; /* May be NULL */
170 /* Only valid for IM_DRAWFRAME */
171 STACKED struct impSize imp_Dimensions;
174 /* IM_ERASE, IM_ERASEFRAME */
175 /* NOTE: This is a subset of impDraw */
176 struct impErase
178 STACKED ULONG MethodID;
179 STACKED struct RastPort *imp_RPort;
180 STACKED struct impPos imp_Offset;
182 /* Only valid for IM_ERASEFRAME */
183 STACKED struct impSize imp_Dimensions;
186 /* IM_HITTEST, IM_HITFRAME */
187 struct impHitTest {
188 STACKED ULONG MethodID;
189 STACKED struct impPos imp_Point;
191 /* Only valid for IM_HITFRAME */
192 STACKED struct impSize imp_Dimensions;
195 #endif /* INTUITION_IMAGECLASS_H */