revert commit 56204.
[AROS.git] / workbench / libs / muimaster / support_classes.h
blob1288efc4ec986856957a5e2aba0d41ed7022e404
1 /*
2 Copyright © 2002-2003, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef _MUIMASTER_SUPPORT_CLASSES_H
7 #define _MUIMASTER_SUPPORT_CLASSES_H
9 #ifndef EXEC_TYPES_H
10 #include <exec/types.h>
11 #endif
13 #ifndef INTUITION_CLASSUSR_H
14 #include <intuition/classusr.h>
15 #endif
17 #ifndef CLIB_MACROS_H
18 #include <clib/macros.h>
19 #endif
21 #include "support.h"
23 #if ZUNE_BUILTIN_ABOUTMUI
24 # define ZUNE_ABOUTMUI_DESC (&_MUI_Aboutmui_desc),
25 #else
26 # define ZUNE_ABOUTMUI_DESC
27 #endif
29 #if ZUNE_BUILTIN_BOOPSI
30 # define ZUNE_BOOPSI_DESC (&_MUI_Boopsi_desc),
31 #else
32 # define ZUNE_BOOPSI_DESC
33 #endif
35 #if ZUNE_BUILTIN_BALANCE
36 # define ZUNE_BALANCE_DESC (&_MUI_Balance_desc),
37 #else
38 # define ZUNE_BALANCE_DESC
39 #endif
41 #if ZUNE_BUILTIN_COLORADJUST
42 # define ZUNE_COLORADJUST_DESC (&_MUI_Coloradjust_desc),
43 #else
44 # define ZUNE_COLORADJUST_DESC
45 #endif
47 #if ZUNE_BUILTIN_COLORFIELD
48 # define ZUNE_COLORFIELD_DESC (&_MUI_Colorfield_desc),
49 #else
50 # define ZUNE_COLORFIELD_DESC
51 #endif
53 #if ZUNE_BUILTIN_FRAMEADJUST
54 # define ZUNE_FRAMEADJUST_DESC (&_MUI_Frameadjust_desc),
55 #else
56 # define ZUNE_FRAMEADJUST_DESC
57 #endif
59 #if ZUNE_BUILTIN_FRAMEDISPLAY
60 # define ZUNE_FRAMEDISPLAY_DESC (&_MUI_Framedisplay_desc),
61 #else
62 # define ZUNE_FRAMEDISPLAY_DESC
63 #endif
65 #if ZUNE_BUILTIN_GAUGE
66 # define ZUNE_GAUGE_DESC (&_MUI_Gauge_desc),
67 #else
68 # define ZUNE_GAUGE_DESC
69 #endif
71 #if ZUNE_BUILTIN_ICONLISTVIEW
72 # define ZUNE_ICONLISTVIEW_DESC (&_MUI_IconListview_desc),
73 #else
74 # define ZUNE_ICONLISTVIEW_DESC
75 #endif
77 #if ZUNE_BUILTIN_IMAGEADJUST
78 # define ZUNE_IMAGEADJUST_DESC (&_MUI_Imageadjust_desc),
79 #else
80 # define ZUNE_IMAGEADJUST_DESC
81 #endif
83 #if ZUNE_BUILTIN_IMAGEDISPLAY
84 # define ZUNE_IMAGEDISPLAY_DESC (&_MUI_Imagedisplay_desc),
85 #else
86 # define ZUNE_IMAGEDISPLAY_DESC
87 #endif
89 #if ZUNE_BUILTIN_PENADJUST
90 # define ZUNE_PENADJUST_DESC (&_MUI_Penadjust_desc),
91 #else
92 # define ZUNE_PENADJUST_DESC
93 #endif
95 #if ZUNE_BUILTIN_PENDISPLAY
96 # define ZUNE_PENDISPLAY_DESC (&_MUI_Pendisplay_desc),
97 #else
98 # define ZUNE_PENDISPLAY_DESC
99 #endif
101 #if ZUNE_BUILTIN_POPASL
102 # define ZUNE_POPASL_DESC (&_MUI_Popasl_desc),
103 #else
104 # define ZUNE_POPASL_DESC
105 #endif
107 #if ZUNE_BUILTIN_POPFRAME
108 # define ZUNE_POPFRAME_DESC (&_MUI_Popframe_desc),
109 #else
110 # define ZUNE_POPFRAME_DESC
111 #endif
113 #if ZUNE_BUILTIN_POPIMAGE
114 # define ZUNE_POPIMAGE_DESC (&_MUI_Popimage_desc),
115 #else
116 # define ZUNE_POPIMAGE_DESC
117 #endif
119 #if ZUNE_BUILTIN_POPPEN
120 # define ZUNE_POPPEN_DESC (&_MUI_Poppen_desc),
121 #else
122 # define ZUNE_POPPEN_DESC
123 #endif
125 #if ZUNE_BUILTIN_RADIO
126 # define ZUNE_RADIO_DESC (&_MUI_Radio_desc),
127 #else
128 # define ZUNE_RADIO_DESC
129 #endif
131 #if ZUNE_BUILTIN_SCALE
132 # define ZUNE_SCALE_DESC (&_MUI_Scale_desc),
133 #else
134 # define ZUNE_SCALE_DESC
135 #endif
137 #if ZUNE_BUILTIN_SCROLLGROUP
138 # define ZUNE_SCROLLGROUP_DESC (&_MUI_Scrollgroup_desc),
139 #else
140 # define ZUNE_SCROLLGROUP_DESC
141 #endif
143 #if ZUNE_BUILTIN_SETTINGSGROUP
144 # define ZUNE_SETTINGSGROUP_DESC (&_MUI_Settingsgroup_desc),
145 #else
146 # define ZUNE_SETTINGSGROUP_DESC
147 #endif
149 #if ZUNE_BUILTIN_VIRTGROUP
150 # define ZUNE_VIRTGROUP_DESC (&_MUI_Virtgroup_desc),
151 #else
152 # define ZUNE_VIRTGROUP_DESC
153 #endif
155 #if ZUNE_BUILTIN_VOLUMELIST
156 # define ZUNE_VOLUMELIST_DESC (&_MUI_Volumelist_desc),
157 #else
158 # define ZUNE_VOLUMELIST_DESC
159 #endif
161 #if ZUNE_BUILTIN_DIRLIST
162 # define ZUNE_DIRLIST_DESC (&_MUI_Dirlist_desc),
163 #else
164 # define ZUNE_DIRLIST_DESC
165 #endif
167 #if ZUNE_BUILTIN_NUMERICBUTTON
168 # define ZUNE_NUMERICBUTTON_DESC (&_MUI_Numericbutton_desc),
169 #else
170 # define ZUNE_NUMERICBUTTON_DESC
171 #endif
173 #if ZUNE_BUILTIN_POPLIST
174 # define ZUNE_POPLIST_DESC (&_MUI_Poplist_desc),
175 #else
176 # define ZUNE_POPLIST_DESC
177 #endif
179 #if ZUNE_BUILTIN_POPSCREEN
180 # define ZUNE_POPSCREEN_DESC (&_MUI_Popscreen_desc),
181 #else
182 # define ZUNE_POPSCREEN_DESC
183 #endif
185 #if ZUNE_BUILTIN_CRAWLING
186 # define ZUNE_CRAWLING_DESC (&_MUI_Crawling_desc),
187 #else
188 # define ZUNE_CRAWLING_DESC
189 #endif
191 #if ZUNE_BUILTIN_LEVELMETER
192 # define ZUNE_LEVELMETER_DESC (&_MUI_Levelmeter_desc),
193 #else
194 # define ZUNE_LEVELMETER_DESC
195 #endif
197 #if ZUNE_BUILTIN_KNOB
198 # define ZUNE_KNOB_DESC (&_MUI_Knob_desc),
199 #else
200 # define ZUNE_KNOB_DESC
201 #endif
203 #if ZUNE_BUILTIN_DTPIC
204 # define ZUNE_DTPIC_DESC (&_MUI_Dtpic_desc),
205 #else
206 # define ZUNE_DTPIC_DESC
207 #endif
209 #if ZUNE_BUILTIN_PALETTE
210 # define ZUNE_PALETTE_DESC (&_MUI_Palette_desc),
211 #else
212 # define ZUNE_PALETTE_DESC
213 #endif
215 Class *ZUNE_GetBuiltinClass(ClassID className, struct Library *mb);
216 Class *ZUNE_GetExternalClass(ClassID className, struct Library *mb);
219 #define ZUNE_AddBuiltinClass(cl, mb) \
220 do \
222 AddTail((struct List *)&MUIMB(mb)->BuiltinClasses, (struct Node *)(cl)); \
223 (cl)->cl_Flags |= CLF_INLIST; \
224 } while (0)
226 #define ZUNE_RemoveBuiltinClass(cl, mb) \
227 do \
229 (cl)->cl_Flags &= ~CLF_INLIST; \
230 (void)Remove((struct Node *)(cl)); \
231 } while (0)
233 AROS_UFP3
235 IPTR, metaDispatcher,
236 AROS_UFPA(struct IClass *, cl, A0),
237 AROS_UFPA(Object *, obj, A2),
238 AROS_UFPA(Msg , msg, A1)
242 #ifdef __AROS__
244 #define MCC_Query(x) AROS_LVO_CALL1(struct MUI_CustomClass *, \
245 AROS_LCA(LONG, (x), D0), \
246 struct Library *, mcclib, 5, lib);
248 #else
250 #ifdef __amigaos4__
252 #include <exec/emulation.h>
254 /* TODO: Use the interface if possible */
255 #define MCC_Query(x ) ({ \
256 APTR _ret; \
257 _ret = EmulateTags(mcclib, \
258 ET_Offset, -30, \
259 ET_RegisterD0, x, \
260 ET_RegisterA6, mcclib, \
261 ET_SaveRegs, TRUE, \
262 TAG_DONE); \
263 _ret; \
266 #else
268 struct MUI_CustomClass *MCC_Query(ULONG d0);
269 #pragma libcall mcclib MCC_Query 01e 001
271 #endif
273 #endif
276 #endif /* _MUIMASTER_SUPPORT_CLASSES_H */