2 Copyright 2002-2003, The AROS Development Team. All rights reserved.
6 #ifndef LIBRARIES_MUI_H
7 #define LIBRARIES_MUI_H
9 #ifndef INTUITION_CLASSES_H
10 # include <intuition/classes.h>
12 #ifndef GRAPHICS_GRAPHICS_H
13 # include <graphics/gfx.h>
15 #ifndef GRAPHICS_RASTPORT_H
16 # include <graphics/rastport.h>
18 #ifndef LIBRARIES_IFFPARSE_H
19 # include <libraries/iffparse.h>
23 # ifndef AROS_ASMCALL_H
24 # include <aros/asmcall.h>
28 # include "support_amigaos.h"
32 #include "mui_identifiers.h"
35 #define MUIMASTER_NAME "zunemaster.library"
36 #define MUIMASTER_VMIN 0
37 #define MUIMASTER_VLATEST 0
39 #define MUIMASTER_NAME "muimaster.library"
40 #define MUIMASTER_VMIN 11
41 #define MUIMASTER_VLATEST 19
46 /* This structure is used for the internal classes */
48 struct __MUIBuiltinClass
{
50 CONST_STRPTR supername
;
54 ULONG (*dispatcher
)();
56 AROS_UFP3(IPTR
, (*dispatcher
),
57 AROS_UFPA(Class
*, cl
, A0
),
58 AROS_UFPA(Object
*, obj
, A2
),
59 AROS_UFPA(Msg
, msg
, A1
));
65 #if defined(MUIMASTER_YES_INLINE_STDARG) && \
66 !defined(NO_INLINE_STDARG) && \
69 #define MUIOBJMACRO_START(class) (IPTR) \
71 ClassID __class = (ClassID) class; \
72 enum { __ismuiobjmacro = 1 }; \
75 #define BOOPSIOBJMACRO_START(class) (IPTR) \
77 Class *__class = (Class *) class; \
78 enum { __ismuiobjmacro = 0 }; \
81 #define OBJMACRO_END \
85 ? MUI_NewObjectA((ClassID)__class, (struct TagItem *)(__tags + 1)) \
86 : NewObjectA((Class *)__class, NULL, (struct TagItem *)(__tags + 1)) \
93 # define MUIOBJMACRO_START(class) (IZuneMaster->MUI_NewObject)(class
94 # define BOOPSIOBJMACRO_START(class) (IIntuition->NewObject)(class, NULL
96 # define MUIOBJMACRO_START(class) MUI_NewObject(class
97 # define BOOPSIOBJMACRO_START(class) NewObject(class, NULL
100 #define OBJMACRO_END TAG_DONE)
104 #ifndef _MUI_CLASSES_NOTIFY_H
105 #include "classes/notify.h"
108 #ifndef _MUI_CLASSES_FAMILY_H
109 #include "classes/family.h"
112 #ifndef _MUI_CLASSES_APPLICATION_H
113 #include "classes/application.h"
117 /**************************************************************************
118 Here are the possible Objecttypes for MUI_MakeObject()
119 **************************************************************************/
122 MUIO_Label
= 1, /* STRPTR label, ULONG flags */
123 MUIO_Button
, /* STRPTR label */
124 MUIO_Checkmark
, /* STRPTR label */
125 MUIO_Cycle
, /* STRPTR label, STRPTR *entries */
126 MUIO_Radio
, /* STRPTR label, STRPTR *entries */
127 MUIO_Slider
, /* STRPTR label, LONG min, LONG max */
128 MUIO_String
, /* STRPTR label, LONG maxlen */
129 MUIO_PopButton
, /* STRPTR imagespec */
130 MUIO_HSpace
, /* LONG space */
131 MUIO_VSpace
, /* LONG space */
132 MUIO_HBar
, /* LONG space */
133 MUIO_VBar
, /* LONG space */
134 MUIO_MenustripNM
, /* struct NewMenu *nm, ULONG flags */
135 MUIO_Menuitem
, /* STRPTR label, STRPTR shortcut, ULONG flags, ULONG data */
136 MUIO_BarTitle
, /* STRPTR label */
137 MUIO_NumericButton
,/* STRPTR label, LONG min, LONG max, STRPTR format */
139 MUIO_CoolButton
= 111, /* STRPTR label, APTR CoolImage, ULONG flags */
140 MUIO_ImageButton
, /* CONST_STRPTR label, CONST_STRPTR imagePath */
143 /* flag for MUIO_Menuitem */
144 #define MUIO_Menuitem_CopyStrings (1<<30)
146 /* flags for MUIO_Label type */
147 #define MUIO_Label_SingleFrame (1<< 8)
148 #define MUIO_Label_DoubleFrame (1<< 9)
149 #define MUIO_Label_LeftAligned (1<<10)
150 #define MUIO_Label_Centered (1<<11)
151 #define MUIO_Label_FreeVert (1<<12)
153 /* flag for MUIO_MenustripNM */
154 #define MUIO_MenustripNM_CommandKeyCheck (1<<0) /* check for "localized" menu items such as "O\0Open" */
156 /* flag for MUI_CoolButton */
157 #define MUIO_CoolButton_CoolImageID (1<<0)
169 /* special maximum dimension in case it is unlimited */
170 #define MUI_MAXMAX 10000
172 /* Number of pens, the single definintion is below */
175 /* The mask for pens from MUI_ObtainPen() and a macro */
176 #define MUIPEN_MASK 0x0000ffff
177 #define MUIPEN(pen) ((pen) & MUIPEN_MASK)
181 MUIV_Font_Inherit
= 0,
182 MUIV_Font_Normal
= -1,
185 MUIV_Font_Fixed
= -4,
186 MUIV_Font_Title
= -5,
188 MUIV_Font_Button
= -7,
190 MUIV_Font_NegCount
= -9,
193 /* Possible keyevents (user configurable) */
196 MUIKEY_RELEASE
= -2, /* this one is faked only, and thereforce not configurable */
208 MUIKEY_WORDLEFT
= 10,
209 MUIKEY_WORDRIGHT
= 11,
210 MUIKEY_LINESTART
= 12,
212 MUIKEY_GADGET_NEXT
= 14,
213 MUIKEY_GADGET_PREV
= 15,
214 MUIKEY_GADGET_OFF
= 16,
215 MUIKEY_WINDOW_CLOSE
= 17,
216 MUIKEY_WINDOW_NEXT
= 18,
217 MUIKEY_WINDOW_PREV
= 19,
223 /* The mask definitions of the above keys */
224 #define MUIKEYF_PRESS (1<<MUIKEY_PRESS)
225 #define MUIKEYF_TOGGLE (1<<MUIKEY_TOGGLE)
226 #define MUIKEYF_UP (1<<MUIKEY_UP)
227 #define MUIKEYF_DOWN (1<<MUIKEY_DOWN)
228 #define MUIKEYF_PAGEUP (1<<MUIKEY_PAGEUP)
229 #define MUIKEYF_PAGEDOWN (1<<MUIKEY_PAGEDOWN)
230 #define MUIKEYF_TOP (1<<MUIKEY_TOP)
231 #define MUIKEYF_BOTTOM (1<<MUIKEY_BOTTOM)
232 #define MUIKEYF_LEFT (1<<MUIKEY_LEFT)
233 #define MUIKEYF_RIGHT (1<<MUIKEY_RIGHT)
234 #define MUIKEYF_WORDLEFT (1<<MUIKEY_WORDLEFT)
235 #define MUIKEYF_WORDRIGHT (1<<MUIKEY_WORDRIGHT)
236 #define MUIKEYF_LINESTART (1<<MUIKEY_LINESTART)
237 #define MUIKEYF_LINEEND (1<<MUIKEY_LINEEND)
238 #define MUIKEYF_GADGET_NEXT (1<<MUIKEY_GADGET_NEXT)
239 #define MUIKEYF_GADGET_PREV (1<<MUIKEY_GADGET_PREV)
240 #define MUIKEYF_GADGET_OFF (1<<MUIKEY_GADGET_OFF)
241 #define MUIKEYF_WINDOW_CLOSE (1<<MUIKEY_WINDOW_CLOSE)
242 #define MUIKEYF_WINDOW_NEXT (1<<MUIKEY_WINDOW_NEXT)
243 #define MUIKEYF_WINDOW_PREV (1<<MUIKEY_WINDOW_PREV)
244 #define MUIKEYF_HELP (1<<MUIKEY_HELP)
245 #define MUIKEYF_POPUP (1<<MUIKEY_POPUP)
247 struct MUI_CustomClass
249 APTR mcc_UserData
; /* freely usable */
251 /* Zune/MUI had the following libraries opened for you */
252 struct Library
*mcc_UtilityBase
;
253 struct Library
*mcc_DOSBase
;
254 struct Library
*mcc_GfxBase
;
255 struct Library
*mcc_IntuitionBase
;
257 struct IClass
*mcc_Super
; /* the boopsi class' superclass */
258 struct IClass
*mcc_Class
; /* the boopsi class */
260 /* the following stuff is private */
262 struct Library
*mcc_Module
; /* non-null if external class */
286 /* MUI_PenSpec is a an ascii spec like this:
289 "p123" (cmap entry #123)
290 "rFFFFFFFF,00000000,00000000 (rgb #FF0000)
293 It needs to be like this, because for example nlist has
294 default penspecs in it's source encoded like above which
295 it directly passes to MUI_ObtainBestPen */
315 #ifndef _MUI_CLASSES_NOTIFY_H
316 #include "classes/notify.h"
319 #ifndef _MUI_CLASSES_WINDOW_H
320 #include "classes/window.h"
323 #ifndef _MUI_CLASSES_AREA_H
324 #include "classes/area.h"
327 #ifndef _MUI_CLASSES_GROUP_H
328 #include "classes/group.h"
331 #ifndef _MUI_CLASSES_RECTANGLE_H
332 #include "classes/rectangle.h"
335 #ifndef _MUI_CLASSES_TEXT_H
336 #include "classes/text.h"
339 #ifndef _MUI_CLASSES_NUMERIC_H
340 #include "classes/numeric.h"
343 #ifndef _MUI_CLASSES_SLIDER_H
344 #include "classes/slider.h"
347 #ifndef _MUI_CLASSES_STRING_H
348 #include "classes/string.h"
351 #ifndef _MUI_CLASSES_BOOPSI_H
352 #include "classes/boopsi.h"
355 #ifndef _MUI_CLASSES_PROP_H
356 #include "classes/prop.h"
359 #ifndef _MUI_CLASSES_SCROLLBAR_H
360 #include "classes/scrollbar.h"
363 #ifndef _MUI_CLASSES_REGISTER_H
364 #include "classes/register.h"
367 #ifndef _MUI_CLASSES_MENUITEM_H
368 #include "classes/menuitem.h"
371 #ifndef _MUI_CLASSES_DATASPACE_H
372 #include "classes/dataspace.h"
375 #ifndef _MUI_CLASSES_VIRTGROUP_H
376 #include "classes/virtgroup.h"
379 #ifndef _MUI_CLASSES_SCROLLGROUP_H
380 #include "classes/scrollgroup.h"
383 #ifndef _MUI_CLASSES_SCROLLBUTTON_H
384 #include "classes/scrollbutton.h"
387 #ifndef _MUI_CLASSES_SEMAPHORE_H
388 #include "classes/semaphore.h"
391 #ifndef _MUI_CLASSES_BITMAP_H
392 #include "classes/bitmap.h"
395 #ifndef _MUI_CLASSES_BODYCHUNK_H
396 #include "classes/bodychunk.h"
399 #ifndef _MUI_CLASSES_CHUNKYIMAGE_H
400 #include "classes/chunkyimage.h"
403 #ifndef _MUI_CLASSES_LISTVIEW_H
404 #include "classes/listview.h"
407 #ifndef _MUI_CLASSES_LIST_H
408 #include "classes/list.h"
411 #ifndef _MUI_CLASSES_POPSTRING_H
412 #include "classes/popstring.h"
415 #ifndef _MUI_CLASSES_POPOBJECT_H
416 #include "classes/popobject.h"
419 #ifndef _MUI_CLASSES_CYCLE_H
420 #include "classes/cycle.h"
423 #ifndef _MUI_CLASSES_GAUGE_H
424 #include "classes/gauge.h"
427 #ifndef _MUI_CLASSES_IMAGE_H
428 #include "classes/image.h"
431 #ifndef _MUI_CLASSES_IMAGEDISPLAY_H
432 #include "classes/imagedisplay.h"
435 #ifndef _MUI_CLASSES_POPASL_H
436 #include "classes/popasl.h"
439 #ifndef _MUI_CLASSES_SETTINGSGROUP_H
440 #include "classes/settingsgroup.h"
443 #ifndef _MUI_CLASSES_SETTINGS_H
444 #include "classes/settings.h"
447 #ifndef _MUI_CLASSES_ABOUTMUI_H
448 #include "classes/aboutmui.h"
451 #ifndef _MUI_CLASSES_CONFIGDATA_H
452 #include "classes/configdata.h"
455 #ifndef _MUI_CLASSES_IMAGEADJUST_H
456 #include "classes/imageadjust.h"
459 #ifndef _MUI_CLASSES_POPIMAGE_H
460 #include "classes/popimage.h"
463 #ifndef _MUI_CLASSES_SCALE_H
464 #include "classes/scale.h"
467 #ifndef _MUI_CLASSES_RADIO_H
468 #include "classes/radio.h"
471 #ifndef _MUI_CLASSES_BALANCE_H
472 #include "classes/balance.h"
475 #ifndef _MUI_CLASSES_PENDISPLAY_H
476 #include "classes/pendisplay.h"
479 #ifndef _MUI_CLASSES_PENADJUST_H
480 #include "classes/penadjust.h"
483 #ifndef _MUI_CLASSES_POPPEN_H
484 #include "classes/poppen.h"
487 #ifndef _MUI_CLASSES_COLORFIELD_H
488 #include "classes/colorfield.h"
491 #ifndef _MUI_CLASSES_COLORADJUST_H
492 #include "classes/coloradjust.h"
495 #ifndef _MUI_CLASSES_MCCPREFS_H
496 #include "classes/mccprefs.h"
499 #ifndef _MUI_CLASSES_FRAMEADJUST_H
500 #include "classes/frameadjust.h"
503 #ifndef _MUI_CLASSES_FRAMEDISPLAY_H
504 #include "classes/framedisplay.h"
507 #ifndef _MUI_CLASSES_POPFRAME_H
508 #include "classes/popframe.h"
511 #ifndef _MUI_CLASSES_VOLUMELIST_H
512 #include "classes/volumelist.h"
515 #ifndef _MUI_CLASSES_DIRLIST_H
516 #include "classes/dirlist.h"
519 #ifndef _MUI_CLASSES_NUMERICBUTTON_H
520 #include "classes/numericbutton.h"
523 #ifndef _MUI_CLASSES_POPLIST_H
524 #include "classes/poplist.h"
527 #ifndef _MUI_CLASSES_POPSCREEN_H
528 #include "classes/popscreen.h"
531 #ifndef _MUI_CLASSES_CRAWLING_H
532 #include "classes/crawling.h"
535 #ifndef _MUI_CLASSES_LEVELMETER_H
536 #include "classes/levelmeter.h"
539 #ifndef _MUI_CLASSES_KNOB_H
540 #include "classes/knob.h"
543 #ifndef _MUI_CLASSES_DTPIC_H
544 #include "classes/dtpic.h"
547 #ifndef _MUI_CLASSES_PALETTE_H
548 #include "classes/palette.h"
551 /**************************************************************************
552 Zune/MUI Image and Background definition
553 **************************************************************************/
554 /* configured by the user within the prefs programm */
555 #define MUII_WindowBack 0UL
556 #define MUII_RequesterBack 1UL
557 #define MUII_ButtonBack 2UL
558 #define MUII_ListBack 3UL
559 #define MUII_TextBack 4UL
560 #define MUII_PropBack 5UL
561 #define MUII_PopupBack 6UL
562 #define MUII_SelectedBack 7UL
563 #define MUII_ListCursor 8UL
564 #define MUII_ListSelect 9UL
565 #define MUII_ListSelCur 10UL
566 #define MUII_ArrowUp 11UL
567 #define MUII_ArrowDown 12UL
568 #define MUII_ArrowLeft 13UL
569 #define MUII_ArrowRight 14UL
570 #define MUII_CheckMark 15UL
571 #define MUII_RadioButton 16UL
572 #define MUII_Cycle 17UL
573 #define MUII_PopUp 18UL
574 #define MUII_PopFile 19UL
575 #define MUII_PopDrawer 20UL
576 #define MUII_PropKnob 21UL
577 #define MUII_Drawer 22UL
578 #define MUII_HardDisk 23UL
579 #define MUII_Disk 24UL
580 #define MUII_Chip 25UL
581 #define MUII_Volume 26UL
582 #define MUII_RegisterBack 27UL
583 #define MUII_Network 28UL
584 #define MUII_Assign 29UL
585 #define MUII_TapePlay 30UL
586 #define MUII_TapePlayBack 31UL
587 #define MUII_TapePause 32UL
588 #define MUII_TapeStop 33UL
589 #define MUII_TapeRecord 34UL
590 #define MUII_GroupBack 35UL
591 #define MUII_SliderBack 36UL
592 #define MUII_SliderKnob 37UL
593 #define MUII_TapeUp 38UL
594 #define MUII_TapeDown 39UL
595 #define MUII_PageBack 40UL
596 #define MUII_ReadListBack 41UL
597 #define MUII_Count 42UL
599 /* direct color's and combinations */
600 #define MUII_BACKGROUND 128UL
601 #define MUII_SHADOW 129UL
602 #define MUII_SHINE 130UL
603 #define MUII_FILL 131UL
604 #define MUII_SHADOWBACK 132UL
605 #define MUII_SHADOWFILL 133UL
606 #define MUII_SHADOWSHINE 134UL
607 #define MUII_FILLBACK 135UL
608 #define MUII_FILLSHINE 136UL
609 #define MUII_SHINEBACK 137UL
610 #define MUII_FILLBACK2 138UL
611 #define MUII_HSHINEBACK 139UL
612 #define MUII_HSHADOWBACK 140UL
613 #define MUII_HSHINESHINE 141UL
614 #define MUII_HSHADOWSHADOW 142UL
615 #define MUII_MARKSHINE 143UL
616 #define MUII_MARKHALFSHINE 144UL
617 #define MUII_MARKBACKGROUND 145UL
618 #define MUII_LASTPAT 146UL
621 /**************************************************************************
623 **************************************************************************/
629 struct Hook
*mc_Hook
;
633 #define MC_TEMPLATE_ID ((STRPTR)~0)
635 #define MUI_RXERR_BADDEFINITION -1
636 #define MUI_RXERR_OUTOFMEMORY -2
637 #define MUI_RXERR_UNKNOWNCOMMAND -3
638 #define MUI_RXERR_BADSYNTAX -4
640 #ifndef _MUI_MACROS_H
644 #endif /* LIBRARIES_MUI_H */