Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / libs / muimaster / macros.h
blob63602a867bfc2c8766de74d1f0f7faa0cb7b3712
1 #ifndef _MUI_MACROS_H
2 #define _MUI_MACROS_H
4 /*
5 Copyright © 2002-2007, The AROS Development Team. All rights reserved.
6 $Id$
8 Macros available in original MUI and also some additional ones.
9 */
11 /* Some nice macrodefinitions for creating your object tree */
12 #define MenustripObject MUIOBJMACRO_START(MUIC_Menustrip)
13 #define MenuObject MUIOBJMACRO_START(MUIC_Menu)
14 #define MenuObjectT(name) MUIOBJMACRO_START(MUIC_Menu), MUIA_Menu_Title, name
15 #define MenuitemObject MUIOBJMACRO_START(MUIC_Menuitem)
16 #define WindowObject MUIOBJMACRO_START(MUIC_Window)
17 #define ImageObject MUIOBJMACRO_START(MUIC_Image)
18 #define ImagedisplayObject MUIOBJMACRO_START(MUIC_Imagedisplay)
19 #define BitmapObject MUIOBJMACRO_START(MUIC_Bitmap)
20 #define BodychunkObject MUIOBJMACRO_START(MUIC_Bodychunk)
21 #define ChunkyImageObject MUIOBJMACRO_START(MUIC_ChunkyImage)
22 #define NotifyObject MUIOBJMACRO_START(MUIC_Notify)
23 #define ApplicationObject MUIOBJMACRO_START(MUIC_Application)
24 #define TextObject MUIOBJMACRO_START(MUIC_Text)
25 #define RectangleObject MUIOBJMACRO_START(MUIC_Rectangle)
26 #define BalanceObject MUIOBJMACRO_START(MUIC_Balance)
27 #define ListObject MUIOBJMACRO_START(MUIC_List)
28 #define PropObject MUIOBJMACRO_START(MUIC_Prop)
29 #define StringObject MUIOBJMACRO_START(MUIC_String)
30 #define ScrollbarObject MUIOBJMACRO_START(MUIC_Scrollbar)
31 #define ListviewObject MUIOBJMACRO_START(MUIC_Listview)
32 #define RadioObject MUIOBJMACRO_START(MUIC_Radio)
33 #define VolumelistObject MUIOBJMACRO_START(MUIC_Volumelist)
34 #define FloattextObject MUIOBJMACRO_START(MUIC_Floattext)
35 #define DirlistObject MUIOBJMACRO_START(MUIC_Dirlist)
36 #define CycleObject MUIOBJMACRO_START(MUIC_Cycle)
37 #define GaugeObject MUIOBJMACRO_START(MUIC_Gauge)
38 #define ScaleObject MUIOBJMACRO_START(MUIC_Scale)
39 #define NumericObject MUIOBJMACRO_START(MUIC_Numeric)
40 #define SliderObject MUIOBJMACRO_START(MUIC_Slider)
41 #define NumericbuttonObject MUIOBJMACRO_START(MUIC_Numericbutton)
42 #define KnobObject MUIOBJMACRO_START(MUIC_Knob)
43 #define LevelmeterObject MUIOBJMACRO_START(MUIC_Levelmeter)
44 #define BoopsiObject MUIOBJMACRO_START(MUIC_Boopsi)
45 #define ColorfieldObject MUIOBJMACRO_START(MUIC_Colorfield)
46 #define PenadjustObject MUIOBJMACRO_START(MUIC_Penadjust)
47 #define ColoradjustObject MUIOBJMACRO_START(MUIC_Coloradjust)
48 #define PaletteObject MUIOBJMACRO_START(MUIC_Palette)
49 #define GroupObject MUIOBJMACRO_START(MUIC_Group)
50 #define RegisterObject MUIOBJMACRO_START(MUIC_Register)
51 #define VirtgroupObject MUIOBJMACRO_START(MUIC_Virtgroup)
52 #define ScrollgroupObject MUIOBJMACRO_START(MUIC_Scrollgroup)
53 #define PopstringObject MUIOBJMACRO_START(MUIC_Popstring)
54 #define PopobjectObject MUIOBJMACRO_START(MUIC_Popobject)
55 #define PoplistObject MUIOBJMACRO_START(MUIC_Poplist)
56 #define PopscreenObject MUIOBJMACRO_START(MUIC_Popscreen)
57 #define PopaslObject MUIOBJMACRO_START(MUIC_Popasl)
58 #define PendisplayObject MUIOBJMACRO_START(MUIC_Pendisplay)
59 #define PoppenObject MUIOBJMACRO_START(MUIC_Poppen)
60 #define CrawlingObject MUIOBJMACRO_START(MUIC_Crawling)
61 /* The following in zune only */
62 #define PopimageObject MUIOBJMACRO_START(MUIC_Popimage)
63 #define PopframeObject MUIOBJMACRO_START(MUIC_Popframe)
64 #define AboutmuiObject MUIOBJMACRO_START(MUIC_Aboutmui)
65 #define ScrmodelistObject MUIOBJMACRO_START(MUIC_Scrmodelist)
66 #define KeyentryObject MUIOBJMACRO_START(MUIC_Keyentry)
67 #define VGroup MUIOBJMACRO_START(MUIC_Group)
68 #define HGroup MUIOBJMACRO_START(MUIC_Group), MUIA_Group_Horiz, TRUE
69 #define ColGroup(columns) MUIOBJMACRO_START(MUIC_Group), MUIA_Group_Columns, (columns)
70 #define RowGroup(rows) MUIOBJMACRO_START(MUIC_Group), MUIA_Group_Rows , (rows)
71 #define PageGroup MUIOBJMACRO_START(MUIC_Group), MUIA_Group_PageMode, TRUE
72 #define VGroupV MUIOBJMACRO_START(MUIC_Virtgroup)
73 #define HGroupV MUIOBJMACRO_START(MUIC_Virtgroup), MUIA_Group_Horiz, TRUE
74 #define ColGroupV(columns) MUIOBJMACRO_START(MUIC_Virtgroup), MUIA_Group_Columns, (columns)
75 #define RowGroupV(rows) MUIOBJMACRO_START(MUIC_Virtgroup), MUIA_Group_Rows , (rows)
76 #define PageGroupV MUIOBJMACRO_START(MUIC_Virtgroup), MUIA_Group_PageMode, TRUE
77 #define RegisterGroup(ts) MUIOBJMACRO_START(MUIC_Register), MUIA_Register_Titles, ((IPTR) (ts))
79 #define End OBJMACRO_END
81 #define Child MUIA_Group_Child
82 #define SubWindow MUIA_Application_Window
83 #define WindowContents MUIA_Window_RootObject
86 /**************************************************************************
87 Zune/MUI's differnt frame types. Use one per object
88 **************************************************************************/
89 #define NoFrame MUIA_Frame, MUIV_Frame_None
90 #define ButtonFrame MUIA_Frame, MUIV_Frame_Button
91 #define ImageButtonFrame MUIA_Frame, MUIV_Frame_ImageButton
92 #define TextFrame MUIA_Frame, MUIV_Frame_Text
93 #define StringFrame MUIA_Frame, MUIV_Frame_String
94 #define ReadListFrame MUIA_Frame, MUIV_Frame_ReadList
95 #define InputListFrame MUIA_Frame, MUIV_Frame_InputList
96 #define PropFrame MUIA_Frame, MUIV_Frame_Prop
97 #define SliderFrame MUIA_Frame, MUIV_Frame_Slider
98 #define GaugeFrame MUIA_Frame, MUIV_Frame_Gauge
99 #define VirtualFrame MUIA_Frame, MUIV_Frame_Virtual
100 #define GroupFrame MUIA_Frame, MUIV_Frame_Group
101 #define GroupFrameT(t) MUIA_Frame, MUIV_Frame_Group, MUIA_FrameTitle, ((IPTR) (t)), MUIA_Background, MUII_GroupBack
104 /**************************************************************************
105 Space objects
106 **************************************************************************/
107 #define HVSpace MUI_NewObject(MUIC_Rectangle,TAG_DONE)
108 #define HSpace(x) MUI_MakeObject(MUIO_HSpace,x)
109 #define VSpace(x) MUI_MakeObject(MUIO_VSpace,x)
110 #define HBar(x) MUI_MakeObject(MUIO_HBar,x)
111 #define VBar(x) MUI_MakeObject(MUIO_VBar,x)
112 #define HCenter(obj) (HGroup, GroupSpacing(0), Child, (IPTR)HSpace(0), Child, (IPTR)(obj), Child, (IPTR)HSpace(0), End)
113 #define VCenter(obj) (VGroup, GroupSpacing(0), Child, (IPTR)VSpace(0), Child, (IPTR)(obj), Child, (IPTR)VSpace(0), End)
114 #define InnerSpacing(h,v) MUIA_InnerLeft,(h),MUIA_InnerRight,(h),MUIA_InnerTop,(v),MUIA_InnerBottom,(v)
115 #define GroupSpacing(x) MUIA_Group_Spacing,x
117 #ifdef MUI_OBSOLETE
118 /**************************************************************************
119 These macros will create a simple string gadget. Don't use this in
120 new code. Use MUI_MakeObject() instead.
121 **************************************************************************/
122 #define String(contents,maxlen)\
123 StringObject,\
124 StringFrame,\
125 MUIA_String_MaxLen , maxlen,\
126 MUIA_String_Contents, contents,\
129 #define KeyString(contents,maxlen,controlchar)\
130 StringObject,\
131 StringFrame,\
132 MUIA_ControlChar , controlchar,\
133 MUIA_String_MaxLen , maxlen,\
134 MUIA_String_Contents, contents,\
137 #endif
139 #ifdef MUI_OBSOLETE
140 /**************************************************************************
141 These macros will create a simple checkmark gadget. Don't use this in
142 new code. Use MUI_MakeObject() instead.
143 **************************************************************************/
144 #define CheckMark(sel) ImageObject, ImageButtonFrame, MUIA_InputMode, MUIV_InputMode_Toggle, MUIA_Image_Spec, MUII_CheckMark, MUIA_Image_FreeVert, TRUE, MUIA_Background, MUII_ButtonBack, MUIA_ShowSelState, FALSE, MUIA_Selected, sel, End
145 #define KeyCheckMark(sel,ctrl) ImageObject, ImageButtonFrame, MUIA_InputMode, MUIV_InputMode_Toggle, MUIA_Image_Spec, MUII_CheckMark, MUIA_Image_FreeVert, TRUE, MUIA_Background, MUII_ButtonBack, MUIA_ShowSelState, FALSE, MUIA_Selected, sel, MUIA_ControlChar, ctrl, End
146 #endif
149 /**************************************************************************
150 These macros will create a simple button. It's simply calling
151 MUI_MakeObject()
152 **************************************************************************/
153 #define SimpleButton(label) MUI_MakeObject(MUIO_Button,(IPTR)(label))
154 #define ImageButton(label, imagePath) MUI_MakeObject(MUIO_ImageButton, (IPTR) (label), (IPTR) (imagePath))
156 #define CoolImageButton(label,image) MUI_MakeObject(MUIO_CoolButton, (IPTR)(label), (IPTR)(image), 0)
157 #define CoolImageIDButton(label,imageid) MUI_MakeObject(MUIO_CoolButton, (IPTR)(label), imageid, MUIO_CoolButton_CoolImageID)
159 #ifdef MUI_OBSOLETE
160 /**************************************************************************
161 A Keybutton macro. The key should be in lower case.
162 Don't use this in new code. Use MUI_MakeObject() instead.
163 **************************************************************************/
164 #define KeyButton(name,key) TextObject, ButtonFrame, MUIA_Font, MUIV_Font_Button, MUIA_Text_Contents, (IPTR)(name), MUIA_Text_PreParse, "\33c", MUIA_Text_HiChar, (IPTR)(key), MUIA_ControlChar, key, MUIA_InputMode, MUIV_InputMode_RelVerify, MUIA_Background, MUII_ButtonBack, End
165 #endif
168 #ifdef MUI_OBSOLETE
169 /**************************************************************************
170 Obsolette Cycle macros
171 **************************************************************************/
172 #define Cycle(ent) CycleObject, MUIA_Font, MUIV_Font_Button, MUIA_Cycle_Entries, ent, End
173 #define KeyCycle(ent,key) CycleObject, MUIA_Font, MUIV_Font_Button, MUIA_Cycle_Entries, ent, MUIA_ControlChar, key, End
175 /**************************************************************************
176 Obsolette Radios macros
177 **************************************************************************/
178 #define Radio(name,array) RadioObject, GroupFrameT(name), MUIA_Radio_Entries, (IPTR)(array), End
179 #define KeyRadio(name,array,key) RadioObject, GroupFrameT(name), MUIA_Radio_Entries, (IPTR)(array), MUIA_ControlChar, (IPTR)(key), End
181 /**************************************************************************
182 Obsolette Slider macros
183 **************************************************************************/
184 #define Slider(min,max,level) SliderObject, MUIA_Numeric_Min, min, MUIA_Numeric_Max, max, MUIA_Numeric_Value, level, End
185 #define KeySlider(min,max,level,key) SliderObject, MUIA_Numeric_Min, min, MUIA_Numeric_Max, max, MUIA_Numeric_Value, level, MUIA_ControlChar, key, End
186 #endif
190 /**************************************************************************
191 Use this for getting a pop button
192 **************************************************************************/
193 #define PopButton(img) MUI_MakeObject(MUIO_PopButton, img)
196 /**************************************************************************
197 Macros for Labelobjects
198 Use them for example in a group containing 2 columns, in the first
199 columns the label and in the second columns the object.
201 These objects should be uses because the user might have set strange
202 values.
204 xxxLabel() is suited for Objects without frame
205 xxxLabel1() is suited for objects with a single frame, like buttons
206 xxxLabel2() is suited for objects with with double frames, like string gadgets
207 **************************************************************************/
209 /* Right aligned */
210 #define Label(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), 0)
211 #define Label1(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_SingleFrame)
212 #define Label2(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_DoubleFrame)
214 /* Left aligned */
215 #define LLabel(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_LeftAligned)
216 #define LLabel1(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_LeftAligned | MUIO_Label_SingleFrame)
217 #define LLabel2(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_LeftAligned | MUIO_Label_DoubleFrame)
219 /* Centered */
220 #define CLabel(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_Centered)
221 #define CLabel1(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_Centered | MUIO_Label_SingleFrame)
222 #define CLabel2(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_Centered | MUIO_Label_DoubleFrame)
224 /* Freevert - Right aligned */
225 #define FreeLabel(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert)
226 #define FreeLabel1(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_SingleFrame)
227 #define FreeLabel2(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_DoubleFrame)
229 /* Freevert - Left aligned */
230 #define FreeLLabel(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_LeftAligned)
231 #define FreeLLabel1(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_LeftAligned | MUIO_Label_SingleFrame)
232 #define FreeLLabel2(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_LeftAligned | MUIO_Label_DoubleFrame)
234 /* Freevert - Centered */
235 #define FreeCLabel(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_Centered)
236 #define FreeCLabel1(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_Centered | MUIO_Label_SingleFrame)
237 #define FreeCLabel2(label) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_Centered | MUIO_Label_DoubleFrame)
239 /* The same as above + keys */
240 #define KeyLabel(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), key)
241 #define KeyLabel1(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_SingleFrame | (key))
242 #define KeyLabel2(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_DoubleFrame | (key))
243 #define KeyLLabel(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_LeftAligned | (key))
244 #define KeyLLabel1(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_LeftAligned | MUIO_Label_SingleFrame|(key))
245 #define KeyLLabel2(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_LeftAligned | MUIO_Label_DoubleFrame|(key))
246 #define KeyCLabel(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_Centered | (key))
247 #define KeyCLabel1(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_Centered | MUIO_Label_SingleFrame|(key))
248 #define KeyCLabel2(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_Centered | MUIO_Label_DoubleFrame|(key))
250 #define FreeKeyLabel(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | (key))
251 #define FreeKeyLabel1(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_SingleFrame | (key))
252 #define FreeKeyLabel2(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_DoubleFrame | (key))
253 #define FreeKeyLLabel(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_LeftAligned | (key))
254 #define FreeKeyLLabel1(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_LeftAligned | MUIO_Label_SingleFrame | (key))
255 #define FreeKeyLLabel2(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_LeftAligned | MUIO_Label_DoubleFrame | (key))
256 #define FreeKeyCLabel(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_Centered | (key))
257 #define FreeKeyCLabel1(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_Centered | MUIO_Label_SingleFrame | (key))
258 #define FreeKeyCLabel2(label,key) MUI_MakeObject(MUIO_Label, (IPTR)(label), MUIO_Label_FreeVert | MUIO_Label_Centered | MUIO_Label_DoubleFrame | (key))
261 /* Some macros */
262 #ifndef __cplusplus
264 #ifdef __GNUC__
265 #define get(obj, attr, storage) \
266 ({ \
267 union { \
268 IPTR __zune_get_storage; \
269 typeof(*storage) __zune_val_storage; \
270 } __tmp; \
271 __tmp.__zune_val_storage = *storage; \
272 ULONG __zune_get_ret = GetAttr((attr), (obj), &__tmp.__zune_get_storage); \
273 *(storage) = __tmp.__zune_val_storage; \
274 __zune_get_ret; \
276 #else /* !__GNUC__ */
277 #define get(obj,attr,store) GetAttr(attr,obj,(IPTR *)store)
278 #endif /* !__GNUC__ */
280 #ifdef __GNUC__
281 #define XGET(object, attribute) \
282 ({ \
283 IPTR __storage = 0; \
284 GetAttr((attribute), (object), &__storage); \
285 __storage; \
287 #endif /* __GNUC__ */
289 #define set(obj,attr,value) SetAttrs(obj,attr,(IPTR)(value),TAG_DONE)
290 #define nnset(obj,attr,value) SetAttrs(obj,MUIA_NoNotify,TRUE,attr,(IPTR)(value),TAG_DONE)
292 /* Zune */
293 #define nfset(obj,attr,value) SetAttrs(obj,MUIA_Group_Forward,FALSE,attr,(IPTR)(value),TAG_DONE)
294 #define nnfset(obj,attr,value) SetAttrs(obj,MUIA_Group_Forward,FALSE,MUIA_NoNotify,TRUE,attr,(IPTR)(value),TAG_DONE)
296 /* Some aliases... */
297 #define GET(obj,attr,store) get(obj,attr,store)
298 #define SET(obj,attr,value) set(obj,attr,value)
299 #define NNSET(obj,attr,value) nnset(obj,attr,value)
300 #define NFSET(obj,attr,value) nfset(obj,attr,value)
301 #define NNFSET(obj,attr,value) nnfset(obj,attr,value)
303 #define setmutex(obj,n) set(obj,MUIA_Radio_Active,n)
304 #define setcycle(obj,n) set(obj,MUIA_Cycle_Active,n)
305 #define setstring(obj,s) set(obj,MUIA_String_Contents,(IPTR)(s))
306 #define setcheckmark(obj,b) set(obj,MUIA_Selected,b)
307 #define setslider(obj,l) set(obj,MUIA_Numeric_Value,l)
309 #endif /* __cplusplus */
312 /* We need the notify and area Instace Data at least here, but this stuff should be placed at the button anywhy */
313 #ifndef _MUI_CLASSES_NOTIFY_H
314 #include "classes/notify.h"
315 #endif
317 #ifndef _MUI_CLASSES_AREA_H
318 #include "classes/area.h"
319 #endif
321 struct __dummyAreaData__
323 struct MUI_NotifyData mnd;
324 struct MUI_AreaData mad;
327 #define muiNotifyData(obj) (&(((struct __dummyAreaData__ *)(obj))->mnd))
328 #define muiAreaData(obj) (&(((struct __dummyAreaData__ *)(obj))->mad))
330 #define muiGlobalInfo(obj) (((struct __dummyAreaData__ *)(obj))->mnd.mnd_GlobalInfo)
331 #define muiUserData(obj) (((struct __dummyAreaData__ *)(obj))->mnd.mnd_UserData)
332 #define muiRenderInfo(obj) (((struct __dummyAreaData__ *)(obj))->mad.mad_RenderInfo)
335 /* the following macros are only valid inbetween MUIM_Setup and MUIM_Cleanup */
336 #define _app(obj) (muiGlobalInfo(obj)->mgi_ApplicationObject)
337 #define _win(obj) (muiRenderInfo(obj)->mri_WindowObject)
338 #define _dri(obj) (muiRenderInfo(obj)->mri_DrawInfo)
339 #define _screen(obj) (muiRenderInfo(obj)->mri_Screen)
340 #define _pens(obj) (muiRenderInfo(obj)->mri_Pens)
341 #define _font(obj) (muiAreaData(obj)->mad_Font)
343 /* the following macros are only valid during MUIM_Draw */
344 #define _left(obj) (muiAreaData(obj)->mad_Box.Left)
345 #define _top(obj) (muiAreaData(obj)->mad_Box.Top)
346 #define _width(obj) (muiAreaData(obj)->mad_Box.Width)
347 #define _height(obj) (muiAreaData(obj)->mad_Box.Height)
348 #define _right(obj) (_left(obj) + _width(obj) - 1)
349 #define _bottom(obj) (_top(obj) + _height(obj) - 1)
350 #define _addleft(obj) (muiAreaData(obj)->mad_addleft )
351 #define _addtop(obj) (muiAreaData(obj)->mad_addtop )
352 #define _subwidth(obj) (muiAreaData(obj)->mad_subwidth )
353 #define _subheight(obj) (muiAreaData(obj)->mad_subheight)
354 #define _mleft(obj) (_left(obj) + _addleft(obj))
355 #define _mtop(obj) (_top(obj) + _addtop(obj))
356 #define _mwidth(obj) (_width(obj) - _subwidth(obj))
357 #define _mheight(obj) (_height(obj) - _subheight(obj))
358 #define _mright(obj) (_mleft(obj) + _mwidth(obj) - 1)
359 #define _mbottom(obj) (_mtop(obj) + _mheight(obj) - 1)
361 /* the following macros are only valid inbetween MUIM_Show and MUIM_Hide */
362 #define _window(obj) (muiRenderInfo(obj)->mri_Window)
363 #define _rp(obj) (muiRenderInfo(obj)->mri_RastPort)
364 #define _minwidth(obj) (muiAreaData(obj)->mad_MinMax.MinWidth)
365 #define _minheight(obj) (muiAreaData(obj)->mad_MinMax.MinHeight)
366 #define _maxwidth(obj) (muiAreaData(obj)->mad_MinMax.MaxWidth)
367 #define _maxheight(obj) (muiAreaData(obj)->mad_MinMax.MaxHeight)
368 #define _defwidth(obj) (muiAreaData(obj)->mad_MinMax.DefWidth)
369 #define _defheight(obj) (muiAreaData(obj)->mad_MinMax.DefHeight)
370 #define _flags(obj) (muiAreaData(obj)->mad_Flags)
374 #endif /* _MUI_MACROS_H */