2 Copyright 2002-2018, 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) (APTR) \
71 ClassID __class = (ClassID) class; \
72 enum { __ismuiobjmacro = 1 }; \
75 #define BOOPSIOBJMACRO_START(class) (APTR) \
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: check for "localized" menu items such
155 #define MUIO_MenustripNM_CommandKeyCheck (1<<0)
157 /* flag for MUI_CoolButton */
158 #define MUIO_CoolButton_CoolImageID (1<<0)
170 /* special maximum dimension in case it is unlimited */
171 #define MUI_MAXMAX 10000
173 /* Number of pens, the single definintion is below */
176 /* The mask for pens from MUI_ObtainPen() and a macro */
177 #define MUIPEN_MASK 0x0000ffff
178 #define MUIPEN(pen) ((pen) & MUIPEN_MASK)
180 /* These cannot be enums, since they will
181 * not be passed properly in varadic
182 * functions by some compilers.
184 #define MUIV_Font_Inherit ((IPTR)0)
185 #define MUIV_Font_Normal ((IPTR)-1)
186 #define MUIV_Font_List ((IPTR)-2)
187 #define MUIV_Font_Tiny ((IPTR)-3)
188 #define MUIV_Font_Fixed ((IPTR)-4)
189 #define MUIV_Font_Title ((IPTR)-5)
190 #define MUIV_Font_Big ((IPTR)-6)
191 #define MUIV_Font_Button ((IPTR)-7)
192 #define MUIV_Font_Knob ((IPTR)-8)
193 #define MUIV_Font_NegCount ((IPTR)-9)
195 /* Possible keyevents (user configurable) */
198 MUIKEY_RELEASE
= -2, /* this one is faked only, so not configurable */
210 MUIKEY_WORDLEFT
= 10,
211 MUIKEY_WORDRIGHT
= 11,
212 MUIKEY_LINESTART
= 12,
214 MUIKEY_GADGET_NEXT
= 14,
215 MUIKEY_GADGET_PREV
= 15,
216 MUIKEY_GADGET_OFF
= 16,
217 MUIKEY_WINDOW_CLOSE
= 17,
218 MUIKEY_WINDOW_NEXT
= 18,
219 MUIKEY_WINDOW_PREV
= 19,
225 /* The mask definitions of the above keys */
226 #define MUIKEYF_PRESS (1<<MUIKEY_PRESS)
227 #define MUIKEYF_TOGGLE (1<<MUIKEY_TOGGLE)
228 #define MUIKEYF_UP (1<<MUIKEY_UP)
229 #define MUIKEYF_DOWN (1<<MUIKEY_DOWN)
230 #define MUIKEYF_PAGEUP (1<<MUIKEY_PAGEUP)
231 #define MUIKEYF_PAGEDOWN (1<<MUIKEY_PAGEDOWN)
232 #define MUIKEYF_TOP (1<<MUIKEY_TOP)
233 #define MUIKEYF_BOTTOM (1<<MUIKEY_BOTTOM)
234 #define MUIKEYF_LEFT (1<<MUIKEY_LEFT)
235 #define MUIKEYF_RIGHT (1<<MUIKEY_RIGHT)
236 #define MUIKEYF_WORDLEFT (1<<MUIKEY_WORDLEFT)
237 #define MUIKEYF_WORDRIGHT (1<<MUIKEY_WORDRIGHT)
238 #define MUIKEYF_LINESTART (1<<MUIKEY_LINESTART)
239 #define MUIKEYF_LINEEND (1<<MUIKEY_LINEEND)
240 #define MUIKEYF_GADGET_NEXT (1<<MUIKEY_GADGET_NEXT)
241 #define MUIKEYF_GADGET_PREV (1<<MUIKEY_GADGET_PREV)
242 #define MUIKEYF_GADGET_OFF (1<<MUIKEY_GADGET_OFF)
243 #define MUIKEYF_WINDOW_CLOSE (1<<MUIKEY_WINDOW_CLOSE)
244 #define MUIKEYF_WINDOW_NEXT (1<<MUIKEY_WINDOW_NEXT)
245 #define MUIKEYF_WINDOW_PREV (1<<MUIKEY_WINDOW_PREV)
246 #define MUIKEYF_HELP (1<<MUIKEY_HELP)
247 #define MUIKEYF_POPUP (1<<MUIKEY_POPUP)
249 struct MUI_CustomClass
251 APTR mcc_UserData
; /* freely usable */
253 /* Zune/MUI had the following libraries opened for you */
254 struct Library
*mcc_UtilityBase
;
255 struct Library
*mcc_DOSBase
;
256 struct Library
*mcc_GfxBase
;
257 struct Library
*mcc_IntuitionBase
;
259 struct IClass
*mcc_Super
; /* the boopsi class's superclass */
260 struct IClass
*mcc_Class
; /* the boopsi class */
262 /* the following stuff is private */
264 struct Library
*mcc_Module
; /* non-null if external class */
288 /* MUI_PenSpec is an ascii spec like this:
291 "p123" (cmap entry #123)
292 "rFFFFFFFF,00000000,00000000 (rgb #FF0000)
295 It needs to be like this, because for example nlist has
296 default penspecs in its source encoded like above which
297 it directly passes to MUI_ObtainBestPen */
325 #ifndef _MUI_CLASSES_NOTIFY_H
326 #include "classes/notify.h"
329 #ifndef _MUI_CLASSES_WINDOW_H
330 #include "classes/window.h"
333 #ifndef _MUI_CLASSES_AREA_H
334 #include "classes/area.h"
337 #ifndef _MUI_CLASSES_GROUP_H
338 #include "classes/group.h"
341 #ifndef _MUI_CLASSES_RECTANGLE_H
342 #include "classes/rectangle.h"
345 #ifndef _MUI_CLASSES_TEXT_H
346 #include "classes/text.h"
349 #ifndef _MUI_CLASSES_NUMERIC_H
350 #include "classes/numeric.h"
353 #ifndef _MUI_CLASSES_SLIDER_H
354 #include "classes/slider.h"
357 #ifndef _MUI_CLASSES_STRING_H
358 #include "classes/string.h"
361 #ifndef _MUI_CLASSES_BOOPSI_H
362 #include "classes/boopsi.h"
365 #ifndef _MUI_CLASSES_PROP_H
366 #include "classes/prop.h"
369 #ifndef _MUI_CLASSES_SCROLLBAR_H
370 #include "classes/scrollbar.h"
373 #ifndef _MUI_CLASSES_REGISTER_H
374 #include "classes/register.h"
377 #ifndef _MUI_CLASSES_MENUITEM_H
378 #include "classes/menuitem.h"
381 #ifndef _MUI_CLASSES_DATASPACE_H
382 #include "classes/dataspace.h"
385 #ifndef _MUI_CLASSES_VIRTGROUP_H
386 #include "classes/virtgroup.h"
389 #ifndef _MUI_CLASSES_SCROLLGROUP_H
390 #include "classes/scrollgroup.h"
393 #ifndef _MUI_CLASSES_SCROLLBUTTON_H
394 #include "classes/scrollbutton.h"
397 #ifndef _MUI_CLASSES_SEMAPHORE_H
398 #include "classes/semaphore.h"
401 #ifndef _MUI_CLASSES_BITMAP_H
402 #include "classes/bitmap.h"
405 #ifndef _MUI_CLASSES_BODYCHUNK_H
406 #include "classes/bodychunk.h"
409 #ifndef _MUI_CLASSES_CHUNKYIMAGE_H
410 #include "classes/chunkyimage.h"
413 #ifndef _MUI_CLASSES_LISTVIEW_H
414 #include "classes/listview.h"
417 #ifndef _MUI_CLASSES_LIST_H
418 #include "classes/list.h"
421 #ifndef _MUI_CLASSES_FLOATTEXT_H
422 #include "classes/floattext.h"
425 #ifndef _MUI_CLASSES_POPSTRING_H
426 #include "classes/popstring.h"
429 #ifndef _MUI_CLASSES_POPOBJECT_H
430 #include "classes/popobject.h"
433 #ifndef _MUI_CLASSES_CYCLE_H
434 #include "classes/cycle.h"
437 #ifndef _MUI_CLASSES_GAUGE_H
438 #include "classes/gauge.h"
441 #ifndef _MUI_CLASSES_IMAGE_H
442 #include "classes/image.h"
445 #ifndef _MUI_CLASSES_IMAGEDISPLAY_H
446 #include "classes/imagedisplay.h"
449 #ifndef _MUI_CLASSES_POPASL_H
450 #include "classes/popasl.h"
453 #ifndef _MUI_CLASSES_SETTINGSGROUP_H
454 #include "classes/settingsgroup.h"
457 #ifndef _MUI_CLASSES_SETTINGS_H
458 #include "classes/settings.h"
461 #ifndef _MUI_CLASSES_ABOUTMUI_H
462 #include "classes/aboutmui.h"
465 #ifndef _MUI_CLASSES_CONFIGDATA_H
466 #include "classes/configdata.h"
469 #ifndef _MUI_CLASSES_IMAGEADJUST_H
470 #include "classes/imageadjust.h"
473 #ifndef _MUI_CLASSES_POPIMAGE_H
474 #include "classes/popimage.h"
477 #ifndef _MUI_CLASSES_SCALE_H
478 #include "classes/scale.h"
481 #ifndef _MUI_CLASSES_RADIO_H
482 #include "classes/radio.h"
485 #ifndef _MUI_CLASSES_BALANCE_H
486 #include "classes/balance.h"
489 #ifndef _MUI_CLASSES_PENDISPLAY_H
490 #include "classes/pendisplay.h"
493 #ifndef _MUI_CLASSES_PENADJUST_H
494 #include "classes/penadjust.h"
497 #ifndef _MUI_CLASSES_POPPEN_H
498 #include "classes/poppen.h"
501 #ifndef _MUI_CLASSES_COLORFIELD_H
502 #include "classes/colorfield.h"
505 #ifndef _MUI_CLASSES_COLORADJUST_H
506 #include "classes/coloradjust.h"
509 #ifndef _MUI_CLASSES_MCCPREFS_H
510 #include "classes/mccprefs.h"
513 #ifndef _MUI_CLASSES_FRAMEADJUST_H
514 #include "classes/frameadjust.h"
517 #ifndef _MUI_CLASSES_FRAMEDISPLAY_H
518 #include "classes/framedisplay.h"
521 #ifndef _MUI_CLASSES_POPFRAME_H
522 #include "classes/popframe.h"
525 #ifndef _MUI_CLASSES_VOLUMELIST_H
526 #include "classes/volumelist.h"
529 #ifndef _MUI_CLASSES_DIRLIST_H
530 #include "classes/dirlist.h"
533 #ifndef _MUI_CLASSES_NUMERICBUTTON_H
534 #include "classes/numericbutton.h"
537 #ifndef _MUI_CLASSES_POPLIST_H
538 #include "classes/poplist.h"
541 #ifndef _MUI_CLASSES_POPSCREEN_H
542 #include "classes/popscreen.h"
545 #ifndef _MUI_CLASSES_CRAWLING_H
546 #include "classes/crawling.h"
549 #ifndef _MUI_CLASSES_LEVELMETER_H
550 #include "classes/levelmeter.h"
553 #ifndef _MUI_CLASSES_KNOB_H
554 #include "classes/knob.h"
557 #ifndef _MUI_CLASSES_DTPIC_H
558 #include "classes/dtpic.h"
561 #ifndef _MUI_CLASSES_PALETTE_H
562 #include "classes/palette.h"
565 #ifndef _MUI_CLASSES_TITLE_H
566 #include "classes/title.h"
569 #ifndef _MUI_CLASSES_PROCESS_H
570 #include "classes/process.h"
573 #ifndef _MUI_CLASSES_PIXMAP_H
574 #include "classes/pixmap.h"
577 /**************************************************************************
578 Zune/MUI Image and Background definition
579 **************************************************************************/
580 /* configured by the user within the prefs program */
581 #define MUII_WindowBack 0UL
582 #define MUII_RequesterBack 1UL
583 #define MUII_ButtonBack 2UL
584 #define MUII_ListBack 3UL
585 #define MUII_TextBack 4UL
586 #define MUII_PropBack 5UL
587 #define MUII_PopupBack 6UL
588 #define MUII_SelectedBack 7UL
589 #define MUII_ListCursor 8UL
590 #define MUII_ListSelect 9UL
591 #define MUII_ListSelCur 10UL
592 #define MUII_ArrowUp 11UL
593 #define MUII_ArrowDown 12UL
594 #define MUII_ArrowLeft 13UL
595 #define MUII_ArrowRight 14UL
596 #define MUII_CheckMark 15UL
597 #define MUII_RadioButton 16UL
598 #define MUII_Cycle 17UL
599 #define MUII_PopUp 18UL
600 #define MUII_PopFile 19UL
601 #define MUII_PopDrawer 20UL
602 #define MUII_PropKnob 21UL
603 #define MUII_Drawer 22UL
604 #define MUII_HardDisk 23UL
605 #define MUII_Disk 24UL
606 #define MUII_Chip 25UL
607 #define MUII_Volume 26UL
608 #define MUII_RegisterBack 27UL
609 #define MUII_Network 28UL
610 #define MUII_Assign 29UL
611 #define MUII_TapePlay 30UL
612 #define MUII_TapePlayBack 31UL
613 #define MUII_TapePause 32UL
614 #define MUII_TapeStop 33UL
615 #define MUII_TapeRecord 34UL
616 #define MUII_GroupBack 35UL
617 #define MUII_SliderBack 36UL
618 #define MUII_SliderKnob 37UL
619 #define MUII_TapeUp 38UL
620 #define MUII_TapeDown 39UL
621 #define MUII_PageBack 40UL
622 #define MUII_ReadListBack 41UL
623 #define MUII_Count 42UL
625 /* direct colors and combinations */
626 #define MUII_BACKGROUND 128UL
627 #define MUII_SHADOW 129UL
628 #define MUII_SHINE 130UL
629 #define MUII_FILL 131UL
630 #define MUII_SHADOWBACK 132UL
631 #define MUII_SHADOWFILL 133UL
632 #define MUII_SHADOWSHINE 134UL
633 #define MUII_FILLBACK 135UL
634 #define MUII_FILLSHINE 136UL
635 #define MUII_SHINEBACK 137UL
636 #define MUII_FILLBACK2 138UL
637 #define MUII_HSHINEBACK 139UL
638 #define MUII_HSHADOWBACK 140UL
639 #define MUII_HSHINESHINE 141UL
640 #define MUII_HSHADOWSHADOW 142UL
641 #define MUII_MARKSHINE 143UL
642 #define MUII_MARKHALFSHINE 144UL
643 #define MUII_MARKBACKGROUND 145UL
644 #define MUII_LASTPAT 146UL
647 /**************************************************************************
649 **************************************************************************/
655 struct Hook
*mc_Hook
;
659 #define MC_TEMPLATE_ID ((STRPTR)~0)
661 #define MUI_RXERR_BADDEFINITION -1
662 #define MUI_RXERR_OUTOFMEMORY -2
663 #define MUI_RXERR_UNKNOWNCOMMAND -3
664 #define MUI_RXERR_BADSYNTAX -4
666 #ifndef _MUI_MACROS_H
670 #endif /* LIBRARIES_MUI_H */