Re-enabled use of AROS.Boot file due to lack of general enthusiasm for
[tangerine.git] / test / Zune / busy.c
blobd46c4af1fbb5b370113dbf46841587edb50d93ae
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>
20 #include <mui/Busy_mcc.h>
22 /* the following should go in a single include file which then only
23 ** constits of the public constants and members. Actually this is easiey
26 #include <libraries/mui.h>
28 struct Library *MUIMasterBase;
30 Object *app;
32 int main(void)
34 Object *wnd, *slider, *busy;
36 MUIMasterBase = (struct Library*)OpenLibrary("muimaster.library",0);
38 app = ApplicationObject,
39 SubWindow, wnd = WindowObject,
40 MUIA_Window_Title, "busy",
41 MUIA_Window_Activate, TRUE,
43 WindowContents, VGroup,
44 Child, slider = SliderObject, MUIA_Numeric_Min, 0, MUIA_Numeric_Max, 250, MUIA_Slider_Horiz, TRUE, End,
45 Child, busy = BusyBar,
46 End,
47 End,
48 End;
50 if (app)
52 ULONG sigs = 0;
54 DoMethod(slider, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime,
55 (IPTR)busy, 3, MUIM_Set, MUIA_Busy_Speed, MUIV_TriggerValue);
56 DoMethod
58 wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, (IPTR) app,
59 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit
62 set(wnd,MUIA_Window_Open,TRUE);
64 while (DoMethod(app, MUIM_Application_NewInput, (IPTR) &sigs) != MUIV_Application_ReturnID_Quit)
66 if (sigs)
68 sigs = Wait(sigs | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D);
69 if (sigs & SIGBREAKF_CTRL_C) break;
70 if (sigs & SIGBREAKF_CTRL_D) break;
74 MUI_DisposeObject(app);
77 CloseLibrary(MUIMasterBase);
79 return 0;