copy the pthread headers with compiler-includes
[AROS.git] / test / Zune / font.c
blobbd778fc3ca63796dd23aaa4890eba498fe145ba6
1 /*
2 Copyright © 2010-2011, The AROS Development Team.
3 All rights reserved.
5 $Id$
6 */
8 #include <dos/dosextens.h>
9 #include <libraries/mui.h>
11 #include <proto/alib.h>
12 #include <proto/exec.h>
13 #include <proto/intuition.h>
14 #include <proto/muimaster.h>
16 struct Library *MUIMasterBase;
18 Object *app;
20 int __nocommandline = 1;
22 Object *MakeFontsGroup(SIPTR FontAttr, STRPTR title)
24 return VGroup,
25 GroupFrameT(title),
26 MUIA_Font, FontAttr,
27 Child, TextObject, MUIA_Text_Contents, "No font specification", End,
28 Child, TextObject, MUIA_Text_Contents, "Normal font specification", MUIA_Font, MUIV_Font_Normal, End,
29 Child, TextObject, MUIA_Text_Contents, "Tiny font specification", MUIA_Font, MUIV_Font_Tiny, End,
30 Child, TextObject, MUIA_Text_Contents, "Fixed font specification", MUIA_Font, MUIV_Font_Fixed, End,
31 Child, TextObject, MUIA_Text_Contents, "Title font specification", MUIA_Font, MUIV_Font_Title, End,
32 Child, TextObject, MUIA_Text_Contents, "Big font specification", MUIA_Font, MUIV_Font_Big, End,
33 Child, TextObject, MUIA_Text_Contents, "Button font specification", MUIA_Font, MUIV_Font_Button, End,
34 Child, TextObject, MUIA_Text_Contents, "Knob font specification", MUIA_Font, MUIV_Font_Knob, End,
35 End;
38 int main(void)
40 Object *wnd;
42 MUIMasterBase = (struct Library*)OpenLibrary("muimaster.library",0);
44 app = ApplicationObject,
45 SubWindow, wnd = WindowObject,
46 MUIA_Window_Title, "Font specification test",
47 MUIA_Window_Activate, TRUE,
48 WindowContents, HGroup,
49 Child, MakeFontsGroup(MUIV_Font_Inherit, "Group with default font"),
50 Child, MakeFontsGroup(MUIV_Font_Fixed, "Group with fixed font"),
51 End,
52 End,
53 End;
55 if (app)
57 ULONG sigs = 0;
59 DoMethod
61 wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, (IPTR) app,
62 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit
65 set(wnd,MUIA_Window_Open,TRUE);
67 while (DoMethod(app, MUIM_Application_NewInput, (IPTR) &sigs) != MUIV_Application_ReturnID_Quit)
69 if (sigs)
71 sigs = Wait(sigs | SIGBREAKF_CTRL_C);
72 if (sigs & SIGBREAKF_CTRL_C) break;
76 MUI_DisposeObject(app);
79 CloseLibrary(MUIMasterBase);
81 return 0;