- Set a default PCM volume so that something can be heard when driver is
[AROS.git] / test / Zune / virttest.c
blob822fe01214042744dae84caea5d5a78302571e31
1 /*
2 Copyright © 2002, The AROS Development Team.
3 All rights reserved.
5 $Id$
6 */
8 #include <exec/types.h>
9 #include <stdlib.h>
10 #include <stdio.h>
11 #include <string.h>
13 #include <dos/dos.h>
14 #include <intuition/gadgetclass.h>
15 #include <intuition/icclass.h>
16 #include <proto/exec.h>
17 #include <proto/intuition.h>
18 #include <proto/muimaster.h>
19 #include <clib/alib_protos.h>
21 /* the following should go in a single include file which then only
22 ** constits of the public constants and members. Actually this is easiey
25 #include <libraries/mui.h>
27 struct Library *MUIMasterBase;
29 Object *app;
31 int main(void)
33 Object *wnd;
35 MUIMasterBase = (struct Library*)OpenLibrary("muimaster.library",0);
37 app = ApplicationObject,
38 SubWindow, wnd = WindowObject,
39 MUIA_Window_Title, "virttest",
40 MUIA_Window_Activate, TRUE,
42 WindowContents, VGroup,
43 Child, SimpleButton("hello"),
44 Child, ScrollgroupObject,
45 MUIA_Scrollgroup_Contents, HGroupV,
46 VirtualFrame,
47 Child, VGroup,
48 Child, SimpleButton("one"),
49 Child, SimpleButton("two"),
50 Child, SimpleButton("one"),
51 Child, SimpleButton("two"),
52 Child, SimpleButton("one"),
53 Child, SimpleButton("two"),
54 End,
55 Child, VGroup,
56 Child, SimpleButton("one"),
57 Child, SimpleButton("two"),
58 Child, SimpleButton("one"),
59 End,
60 End,
61 End,
62 End,
63 End,
64 End;
66 if (app)
68 ULONG sigs = 0;
70 DoMethod
72 wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, (IPTR) app,
73 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit
76 set(wnd,MUIA_Window_Open,TRUE);
78 while (DoMethod(app, MUIM_Application_NewInput, (IPTR) &sigs) != MUIV_Application_ReturnID_Quit)
80 if (sigs)
82 sigs = Wait(sigs | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D);
83 if (sigs & SIGBREAKF_CTRL_C) break;
84 if (sigs & SIGBREAKF_CTRL_D) break;
88 MUI_DisposeObject(app);
91 CloseLibrary(MUIMasterBase);
93 return 0;