2 Copyright © 2002-2003, The AROS Development Team. All rights reserved.
6 #include <proto/exec.h>
7 #include <proto/intuition.h>
8 #include <proto/graphics.h>
10 #include <proto/muimaster.h>
11 #include <proto/utility.h>
14 #include "muimaster_intern.h"
16 #include "support_classes.h"
18 /*****************************************************************************
21 AROS_LH5(struct MUI_CustomClass
*, MUI_CreateCustomClass
,
24 AROS_LHA(struct Library
*, base
, A0
),
25 AROS_LHA(ClassID
, supername
, A1
),
26 AROS_LHA(struct MUI_CustomClass
*, supermcc
, A2
),
27 AROS_LHA(ULONG
, datasize
, D0
),
28 AROS_LHA(APTR
, dispatcher
, A3
),
31 struct Library
*, MUIMasterBase
, 18, MUIMaster
)
44 The function itself is a bug ;-) Remove it!
52 *****************************************************************************/
55 AROS_LIBBASE_EXT_DECL(struct MUIMasterBase
*,MUIMasterBase
)
57 struct MUI_CustomClass
*mcc
;
58 struct IClass
*cl
, *super
;
61 if ((supername
== NULL
) && (supermcc
== NULL
))
66 super
= MUI_GetClass(supername
);
67 if (!super
) return NULL
;
69 else super
= supermcc
->mcc_Class
;
71 if (!(mcc
= mui_alloc_struct(struct MUI_CustomClass
)))
75 id
= FilePart(((struct Node
*)base
)->ln_Name
);
77 if (!(cl
= MakeClass(id
, NULL
, super
, datasize
, 0)))
83 mcc
->mcc_UtilityBase
= (struct Library
*)UtilityBase
;
84 mcc
->mcc_DOSBase
= (struct Library
*)DOSBase
;
85 mcc
->mcc_GfxBase
= (struct Library
*)GfxBase
;
86 mcc
->mcc_IntuitionBase
= (struct Library
*)IntuitionBase
;
89 mcc
->mcc_Super
= super
;
90 mcc
->mcc_Module
= NULL
; /* _zune_class_load() will set this */
92 #if defined(__MAXON__) || defined(__amigaos4__)
93 cl
->cl_Dispatcher
.h_Entry
= (HOOKFUNC
)dispatcher
;
95 cl
->cl_Dispatcher
.h_Entry
= (HOOKFUNC
)metaDispatcher
;
96 cl
->cl_Dispatcher
.h_SubEntry
= (HOOKFUNC
)dispatcher
;
98 cl
->cl_Dispatcher
.h_Data
= base
;
103 } /* MUIA_CreateCustomClass */