Added a test for MUIA_Listview_SelectChange.
[AROS.git] / test / diskfont / opendiskfont.c
blob316246a7cfcad02320c1a1b174bf5b2f0f100032
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <diskfont/diskfont.h>
7 #include <proto/exec.h>
8 #include <proto/dos.h>
9 #include <proto/diskfont.h>
10 #include <proto/utility.h>
11 #include <proto/graphics.h>
13 #include <string.h>
14 #include <stdlib.h>
15 #include <stdio.h>
17 struct Library *DiskfontBase;
18 struct UtilityBase *UtilityBase;
20 UBYTE *buf;
22 void cleanup(char *msg)
24 if (msg) printf("aftest: %s\n", msg);
26 if (buf) FreeVec(buf);
28 if (UtilityBase) CloseLibrary((struct Library *)UtilityBase);
29 if (DiskfontBase) CloseLibrary(DiskfontBase);
31 exit(0);
34 void openlibs(void)
36 DiskfontBase = OpenLibrary("diskfont.library", 0);
37 if (!DiskfontBase) cleanup("Cant open diskfont.library!");
38 UtilityBase = (struct UtilityBase *) OpenLibrary("utility.library", 0);
39 if (!UtilityBase) cleanup("Cant open utility.library!");
42 void action(void)
44 struct TextFont *font;
45 struct TextAttr ta;
47 ta.ta_Name = "Vera Sans Bold Italic.font";
48 ta.ta_Name = "xhelvetica.font";
49 ta.ta_YSize = 11;
50 ta.ta_Style = 0;
51 ta.ta_Flags = 0;
53 font = OpenDiskFont(&ta);
54 if (font)
56 CloseFont(font);
60 int main(void)
62 openlibs();
63 action();
64 cleanup(0);
66 return 0; /* keep compiler happy */