- Set a default PCM volume so that something can be heard when driver is
[AROS.git] / test / Zune / font.c
blob466d7a969c6cdbcc8b64855639b200b1c74b3fbf
1 /*
2 Copyright © 2010, The AROS Development Team.
3 All rights reserved.
5 $Id$
6 */
8 #include <dos/dosextens.h>
9 #include <libraries/mui.h>
10 #include <proto/exec.h>
11 #include <proto/intuition.h>
12 #include <proto/muimaster.h>
15 struct Library *MUIMasterBase;
17 Object *app;
19 int __nocommandline = 1;
21 Object *MakeFontsGroup(SIPTR FontAttr, STRPTR title)
23 return VGroup,
24 GroupFrameT(title),
25 MUIA_Font, FontAttr,
26 Child, TextObject, MUIA_Text_Contents, "No font specification", End,
27 Child, TextObject, MUIA_Text_Contents, "Normal font specification", MUIA_Font, MUIV_Font_Normal, End,
28 Child, TextObject, MUIA_Text_Contents, "Tiny font specification", MUIA_Font, MUIV_Font_Tiny, End,
29 Child, TextObject, MUIA_Text_Contents, "Fixed font specification", MUIA_Font, MUIV_Font_Fixed, End,
30 Child, TextObject, MUIA_Text_Contents, "Title font specification", MUIA_Font, MUIV_Font_Title, End,
31 Child, TextObject, MUIA_Text_Contents, "Big font specification", MUIA_Font, MUIV_Font_Big, End,
32 Child, TextObject, MUIA_Text_Contents, "Button font specification", MUIA_Font, MUIV_Font_Button, End,
33 Child, TextObject, MUIA_Text_Contents, "Knob font specification", MUIA_Font, MUIV_Font_Knob, End,
34 End;
37 int main(void)
39 Object *wnd;
41 MUIMasterBase = (struct Library*)OpenLibrary("muimaster.library",0);
43 app = ApplicationObject,
44 SubWindow, wnd = WindowObject,
45 MUIA_Window_Title, "Font specification test",
46 MUIA_Window_Activate, TRUE,
47 WindowContents, HGroup,
48 Child, MakeFontsGroup(MUIV_Font_Inherit, "Group with default font"),
49 Child, MakeFontsGroup(MUIV_Font_Fixed, "Group with fixed font"),
50 End,
51 End,
52 End;
54 if (app)
56 ULONG sigs = 0;
58 DoMethod
60 wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, (IPTR) app,
61 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit
64 set(wnd,MUIA_Window_Open,TRUE);
66 while (DoMethod(app, MUIM_Application_NewInput, (IPTR) &sigs) != MUIV_Application_ReturnID_Quit)
68 if (sigs)
70 sigs = Wait(sigs | SIGBREAKF_CTRL_C);
71 if (sigs & SIGBREAKF_CTRL_C) break;
75 MUI_DisposeObject(app);
78 CloseLibrary(MUIMasterBase);
80 return 0;