2 Copyright © 2002-2015, The AROS Development Team.
8 #include <proto/exec.h>
9 #include <proto/graphics.h>
11 #include <clib/alib_protos.h>
13 #include "muimaster_intern.h"
15 #include <aros/symbolsets.h>
17 #include LC_LIBDEFS_FILE
19 struct Library
*MUIMasterBase
;
21 static struct TextAttr topaz8Attr
=
22 { "topaz.font", 8, FS_NORMAL
, FPF_ROMFONT
, };
25 static int MUIMasterInit(LIBBASETYPEPTR lh
)
27 MUIMasterBase
= (struct Library
*)lh
;
29 InitSemaphore(&MUIMB(lh
)->ZuneSemaphore
);
31 NewList((struct List
*)&MUIMB(lh
)->BuiltinClasses
);
32 NewList((struct List
*)&MUIMB(lh
)->Applications
);
34 MUIMB(lh
)->topaz8font
= OpenFont(&topaz8Attr
);
36 /* Attempt to allocate memory locations corresponding to Notify class's
37 * special values (to avoid clashes) */
38 MUIMB(lh
)->SpecialMemory
= AllocAbs(4, (APTR
)MUIV_TriggerValue
);
43 static int MUIMasterExpunge(LIBBASETYPEPTR lh
)
45 MUIMasterBase
= (struct Library
*)lh
;
47 if (MUIMB(lh
)->SpecialMemory
!= NULL
)
48 FreeMem(MUIMB(lh
)->SpecialMemory
, 4);
50 if (MUIMB(lh
)->topaz8font
!= NULL
)
51 CloseFont(MUIMB(lh
)->topaz8font
);
56 ADD2INITLIB(MUIMasterInit
, 0)
57 ADD2EXPUNGELIB(MUIMasterExpunge
, 0)