Updated PCI IDs to latest snapshot.
[tangerine.git] / arch / .unmaintained / morphos / Include / libraries / gadtools.h
blob1c8951eae30ca3667268f741d343b0670e9886e8
1 #ifndef LIBRARIES_GADTOOLS_H
2 #define LIBRARIES_GADTOOLS_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Definitions and structures for gadtools.library.
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 # include <exec/types.h>
14 #endif
15 #ifndef INTUITION_GADGETCLASS_H
16 # include <intuition/gadgetclass.h>
17 #endif
18 #ifndef INTUITION_INTUITION_H
19 # include <intuition/intuition.h>
20 #endif
21 #ifndef UTILITY_TAGITEM_H
22 # include <utility/tagitem.h>
23 #endif
25 #pragma pack(2)
27 /* Name of the gadtools.library as constant. This is an AROS extension. */
28 #define GADTOOLSNAME "gadtools.library"
30 /* Gadgets */
32 /* Kinds for CreateGadgetA() */
33 #define GENERIC_KIND 0
34 /* normal button */
35 #define BUTTON_KIND 1
36 /* boolean gadget */
37 #define CHECKBOX_KIND 2
38 /* to enter numbers */
39 #define INTEGER_KIND 3
40 /* to list a bunch of entries */
41 #define LISTVIEW_KIND 4
42 /* mutually exclusive entry gadget */
43 #define MX_KIND 5
44 /* to show numbers */
45 #define NUMBER_KIND 6
46 /* like MX_KIND, but rendered differently */
47 #define CYCLE_KIND 7
48 /* to choose a color */
49 #define PALETTE_KIND 8
50 /* to select a value of a range of values */
51 #define SCROLLER_KIND 9
52 /* like SCROLLER_KIND, but with a fixed range */
53 #define SLIDER_KIND 11
54 /* to enter texts */
55 #define STRING_KIND 12
56 /* to show texts */
57 #define TEXT_KIND 13
58 #define NUM_KINDS 14
60 struct NewGadget
62 WORD ng_LeftEdge;
63 WORD ng_TopEdge;
64 WORD ng_Width;
65 WORD ng_Height;
67 UBYTE * ng_GadgetText;
68 struct TextAttr * ng_TextAttr;
70 UWORD ng_GadgetID;
71 ULONG ng_Flags; /* see below */
72 APTR ng_VisualInfo;
73 APTR ng_UserData;
76 /* ng_Flags
77 The PLACETEXT flags (specified in <intuition/gadgetclass.h>) specify where
78 to put the label(s) of the gadget
80 #define PLACETEXT_LEFT (1L<<0)
81 #define PLACETEXT_RIGHT (1L<<1)
82 #define PLACETEXT_ABOVE (1L<<2)
83 #define PLACETEXT_BELOW (1L<<3)
84 #define PLACETEXT_IN (1L<<4)
85 #define NG_HIGHLABEL (1L<<5)
87 /* IDCMP-Flags necessary for certain gadgets */
88 #define ARROWIDCMP (IDCMP_GADGETUP | \
89 IDCMP_GADGETDOWN | \
90 IDCMP_MOUSEBUTTONS | \
91 IDCMP_INTUITICKS)
92 #define BUTTONIDCMP (IDCMP_GADGETUP)
93 #define CHECKBOXIDCMP (IDCMP_GADGETUP)
94 #define INTEGERIDCMP (IDCMP_GADGETUP)
95 #define LISTVIEWIDCMP (ARROWIDCMP | \
96 IDCMP_GADGETUP | \
97 IDCMP_GADGETDOWN | \
98 IDCMP_MOUSEMOVE)
99 #define MXIDCMP (IDCMP_GADGETDOWN)
100 #define NUMBERIDCMP (0L)
101 #define CYCLEIDCMP (IDCMP_GADGETUP)
102 #define PALETTEIDCMP (IDCMP_GADGETUP)
103 #define SCROLLERIDCMP (IDCMP_GADGETUP | \
104 IDCMP_GADGETDOWN | \
105 IDCMP_MOUSEMOVE)
106 #define SLIDERIDCMP (IDCMP_GADGETUP | \
107 IDCMP_GADGETDOWN | \
108 IDCMP_MOUSEMOVE)
109 #define STRINGIDCMP (IDCMP_GADGETUP)
110 #define TEXTIDCMP (0L)
112 #define MX_WIDTH 17
113 #define MX_HEIGHT 9
114 #define CHECKBOX_WIDTH 26
115 #define CHECKBOX_HEIGHT 11
117 /* Indicate that gadget is an gadtools-gadget (PRIVATE) */
118 #define GTYP_GADTOOLS 0x0100
120 /* Menus */
122 struct NewMenu
124 UBYTE nm_Type; /* see below */
125 // BYTE nm_Pad;
126 STRPTR nm_Label; /* may be a STRPTR or NM_BARLABEL (see below) */
127 STRPTR nm_CommKey;
128 UWORD nm_Flags; /* see below */
129 LONG nm_MutualExclude;
130 APTR nm_UserData;
133 /* nm_Type */
134 #define NM_END 0x0000
135 #define NM_TITLE 0x0001
136 #define NM_ITEM 0x0002
137 #define NM_SUB 0x0003
138 #define NM_IGNORE 0x0040
139 #define IM_ITEM 0x0082
140 #define IM_SUB 0x0083
142 /* nm_Label */
143 #define NM_BARLABEL ((STRPTR)-1)
145 /* nm_Flags */
146 #define NM_MENUDISABLED MENUENABLED
147 #define NM_ITEMDISABLED ITEMENABLED
148 #define NM_COMMANDSTRING COMMSEQ
150 #define NM_FLAGMASK (~(ITEMTEXT | HIGHFLAGS | COMMSEQ))
151 #define NM_FLAGMASK_V39 (~(ITEMTEXT | HIGHFLAGS))
153 /* Macros */
154 #define GTMENU_USERDATA(menu) (*((APTR *)(((struct Menu *)menu)+1)))
155 #define GTMENUITEM_USERDATA(item) (*((APTR *)(((struct MenuItem *)item)+1)))
157 #define GTMENU_TRIMMED 0x00000001
158 #define GTMENU_INVALID 0x00000002
159 #define GTMENU_NOMEM 0x00000003
161 /* Tags */
163 #define GT_TagBase TAG_USER+0x00080000
164 #define GTCB_Checked (GT_TagBase + 4)
165 #define GTLV_Top (GT_TagBase + 5)
166 #define GTLV_Labels (GT_TagBase + 6)
167 #define GTLV_ReadOnly (GT_TagBase + 7)
168 #define GTLV_ScrollWidth (GT_TagBase + 8)
169 #define GTMX_Labels (GT_TagBase + 9)
170 #define GTMX_Active (GT_TagBase + 10)
171 #define GTTX_Text (GT_TagBase + 11)
172 #define GTTX_CopyText (GT_TagBase + 12)
173 #define GTNM_Number (GT_TagBase + 13)
174 #define GTCY_Labels (GT_TagBase + 14)
175 #define GTCY_Active (GT_TagBase + 15)
176 #define GTPA_Depth (GT_TagBase + 16)
177 #define GTPA_Color (GT_TagBase + 17)
178 #define GTPA_ColorOffset (GT_TagBase + 18)
179 #define GTPA_IndicatorWidth (GT_TagBase + 19)
180 #define GTPA_IndicatorHeight (GT_TagBase + 20)
181 #define GTSC_Top (GT_TagBase + 21)
182 #define GTSC_Total (GT_TagBase + 22)
183 #define GTSC_Visible (GT_TagBase + 23)
184 #define GTSC_Overlap (GT_TagBase + 24)
185 #define GTSL_Min (GT_TagBase + 38)
186 #define GTSL_Max (GT_TagBase + 39)
187 #define GTSL_Level (GT_TagBase + 40)
188 #define GTSL_MaxLevelLen (GT_TagBase + 41)
189 #define GTSL_LevelFormat (GT_TagBase + 42)
190 #define GTSL_LevelPlace (GT_TagBase + 43)
191 #define GTSL_DispFunc (GT_TagBase + 44)
192 #define GTST_String (GT_TagBase + 45)
193 #define GTST_MaxChars (GT_TagBase + 46)
194 #define GTIN_Number (GT_TagBase + 47)
195 #define GTIN_MaxChars (GT_TagBase + 48)
196 #define GTMN_TextAttr (GT_TagBase + 49)
197 #define GTMN_FrontPen (GT_TagBase + 50)
198 #define GTBB_Recessed (GT_TagBase + 51)
199 #define GT_VisualInfo (GT_TagBase + 52)
200 #define GTLV_ShowSelected (GT_TagBase + 53)
201 #define GTLV_Selected (GT_TagBase + 54)
202 #define GTST_EditHook (GT_TagBase + 55)
203 #define GTIN_EditHook (GT_TagBase + 55)
204 #define GTTX_Border (GT_TagBase + 57)
205 #define GTNM_Border (GT_TagBase + 58)
206 #define GTSC_Arrows (GT_TagBase + 59)
207 #define GTMN_Menu (GT_TagBase + 60)
208 #define GTMX_Spacing (GT_TagBase + 61)
209 #define GTMN_FullMenu (GT_TagBase + 62)
210 #define GTMN_SecondaryError (GT_TagBase + 63)
211 #define GT_Underscore (GT_TagBase + 64)
212 #define GTMN_Checkmark (GT_TagBase + 65)
213 #define GTMN_AmigaKey (GT_TagBase + 66)
214 #define GTMN_NewLookMenus (GT_TagBase + 67)
215 #define GTCB_Scaled (GT_TagBase + 68)
216 #define GTMX_Scaled (GT_TagBase + 69)
217 #define GTPA_NumColors (GT_TagBase + 70)
218 #define GTMX_TitlePlace (GT_TagBase + 71)
219 #define GTTX_FrontPen (GT_TagBase + 72)
220 #define GTNM_FrontPen (GT_TagBase + 72)
221 #define GTTX_BackPen (GT_TagBase + 73)
222 #define GTNM_BackPen (GT_TagBase + 73)
223 #define GTTX_Justification (GT_TagBase + 74)
224 #define GTNM_Justification (GT_TagBase + 74)
225 #define GTNM_Format (GT_TagBase + 75)
226 #define GTNM_MaxNumberLen (GT_TagBase + 76)
227 #define GTBB_FrameType (GT_TagBase + 77)
228 #define GTLV_MakeVisible (GT_TagBase + 78)
229 #define GTLV_ItemHeight (GT_TagBase + 79)
230 #define GTSL_MaxPixelLen (GT_TagBase + 80)
231 #define GTSL_Justification (GT_TagBase + 81)
232 #define GTPA_ColorTable (GT_TagBase + 82)
233 #define GTLV_CallBack (GT_TagBase + 83)
234 #define GTLV_MaxPen (GT_TagBase + 84)
235 #define GTTX_Clipped (GT_TagBase + 85)
236 #define GTNM_Clipped (GT_TagBase + 85)
238 /* GTTX_Justification and GTNM_Justification */
239 #define GTJ_LEFT 0
240 #define GTJ_RIGHT 1
241 #define GTJ_CENTER 2
243 /* GTBB_FrameType */
244 #define BBFT_BUTTON 1
245 #define BBFT_RIDGE 2
246 #define BBFT_ICONDROPBOX 3
248 /* GTLV_CallBack */
249 #define LV_DRAW 0x202
250 /* return values from these hooks */
251 #define LVCB_OK 0
252 #define LVCB_UNKNOWN 1
254 #define INTERWIDTH 8
255 #define INTERHEIGHT 4
257 struct LVDrawMsg
259 ULONG lvdm_MethodID; /* LV_DRAW */
260 struct RastPort * lvdm_RastPort;
261 struct DrawInfo * lvdm_DrawInfo;
262 struct Rectangle lvdm_Bounds;
263 ULONG lvdm_State;
266 /* lvdm_State */
267 #define LVR_NORMAL 0
268 #define LVR_SELECTED 1
269 #define LVR_NORMALDISABLED 2
270 #define LVR_SELECTEDDISABLED 8
272 #pragma pack()
274 #endif /* LIBRARIES_GADTOOLS_H */