Removed debugging detritus and fixed a typo.
[AROS.git] / test / Zune / levelmeter.c
blobca38e069b87bcbc709773497e951b1432ec55a19
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, *slider, *levelmeter;
35 MUIMasterBase = (struct Library*)OpenLibrary("muimaster.library",0);
37 app = ApplicationObject,
38 SubWindow, wnd = WindowObject,
39 MUIA_Window_Title, "levelmeter",
40 MUIA_Window_Activate, TRUE,
42 WindowContents, VGroup,
43 Child, slider = SliderObject,
44 MUIA_CycleChain, TRUE,
45 MUIA_Numeric_Min, 10,
46 MUIA_Numeric_Max, 144,
47 End,
48 Child, HGroup,
49 Child, HVSpace,
50 Child, levelmeter = LevelmeterObject,
51 MUIA_Numeric_Min, 10,
52 MUIA_Numeric_Max, 144,
53 End,
54 Child, HVSpace,
55 End,
56 End,
57 End,
58 End;
60 if (app)
62 ULONG sigs = 0;
64 DoMethod
66 wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, (IPTR) app,
67 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit
70 DoMethod(slider, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime,
71 (IPTR)levelmeter, 3, MUIM_NoNotifySet, MUIA_Numeric_Value, MUIV_TriggerValue);
73 set(wnd,MUIA_Window_Open,TRUE);
75 while (DoMethod(app, MUIM_Application_NewInput, (IPTR) &sigs) != MUIV_Application_ReturnID_Quit)
77 if (sigs)
79 sigs = Wait(sigs | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D);
80 if (sigs & SIGBREAKF_CTRL_C) break;
81 if (sigs & SIGBREAKF_CTRL_D) break;
85 MUI_DisposeObject(app);
88 CloseLibrary(MUIMasterBase);
90 return 0;