2 Copyright © 2002, The AROS Development Team.
8 #include <exec/types.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
;
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
,
54 DoMethod(slider
, MUIM_Notify
, MUIA_Numeric_Value
, MUIV_EveryTime
,
55 (IPTR
)busy
, 3, MUIM_Set
, MUIA_Busy_Speed
, MUIV_TriggerValue
);
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
)
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
);