Safer handling of Booleans.
[AROS.git] / workbench / libs / muimaster / muimaster_init-aros.c
blob8db02a874f761158780847e082be001f40998780
1 /*
2 Copyright © 2002-2011, The AROS Development Team.
3 All rights reserved.
5 $Id$
6 */
8 #include <proto/dos.h>
9 #include <proto/exec.h>
10 #include <proto/graphics.h>
12 #include <clib/alib_protos.h>
14 #include "muimaster_intern.h"
15 #include "mui.h"
17 #include <aros/symbolsets.h>
19 #include <dos/dos.h>
20 #include <aros/debug.h>
22 #include LC_LIBDEFS_FILE
24 struct Library *MUIMasterBase;
26 static struct TextAttr topaz8Attr =
27 { "topaz.font", 8, FS_NORMAL, FPF_ROMFONT, };
30 static int MUIMasterInit(LIBBASETYPEPTR lh)
32 MUIMasterBase = (struct Library *)lh;
34 InitSemaphore(&MUIMB(lh)->ZuneSemaphore);
36 NewList((struct List *)&MUIMB(lh)->BuiltinClasses);
37 NewList((struct List *)&MUIMB(lh)->Applications);
39 ((struct MUIMasterBase_intern *)MUIMasterBase)->topaz8font =
40 OpenFont(&topaz8Attr);
42 return TRUE;
45 static int MUIMasterExpunge(LIBBASETYPEPTR lh)
47 MUIMasterBase = (struct Library *)lh;
49 if (((struct MUIMasterBase_intern *)MUIMasterBase)->topaz8font)
50 CloseFont(((struct MUIMasterBase_intern *)MUIMasterBase)->topaz8font);
52 return TRUE;
55 ADD2INITLIB(MUIMasterInit, 0);
56 ADD2EXPUNGELIB(MUIMasterExpunge, 0);