Trust uboot's device list only if it does not look suspicious.
[AROS.git] / test / Zune / gradient.c
blob9fe516bd4948d7b472609b537de1370baeb2f4d3
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 #define DEBUG 1
28 #include <aros/debug.h>
30 Object *app;
32 int main(void)
34 Object *wnd;
36 app = ApplicationObject,
37 SubWindow, wnd = WindowObject,
38 MUIA_Window_Activate, TRUE,
39 MUIA_Window_Title, (IPTR)"Gradient-o-matic",
41 WindowContents, VGroup,
42 MUIA_Background, (IPTR)"7:h,8d8d8d8d,b5b5b5b5,babababa-80808080,96969696,99999999",
43 Child, SimpleButton("Hola"),
44 Child, StringObject,
45 StringFrame,
46 End,
47 Child, ImageObject,
48 ButtonFrame,
49 MUIA_Image_Spec, (IPTR)"7:v,6d6d6d6d,b5b5b5b5,babababa-60606060,96969696,99999999",
50 MUIA_Image_FreeHoriz, TRUE,
51 MUIA_Image_FreeVert, TRUE,
52 End,
53 Child, TextObject,
54 ButtonFrame,
55 MUIA_Background, (IPTR)"7:v,bbbbbbbb,bbbbbbbb,bbbbbbbb-77777777,77777777,77777777",
56 MUIA_Text_Contents, "\033cWoho I see colors on the wall ...",
57 End,
58 End,
59 End,
60 End;
62 if (app)
64 ULONG sigs = 0;
65 DoMethod(wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, (IPTR)app, 2,
66 MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);
68 set(wnd, MUIA_Window_Open, TRUE);
70 while((LONG) DoMethod(app, MUIM_Application_NewInput, (IPTR)&sigs)
71 != MUIV_Application_ReturnID_Quit)
73 if (sigs)
75 sigs = Wait(sigs | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D);
76 if (sigs & SIGBREAKF_CTRL_C) break;
77 if (sigs & SIGBREAKF_CTRL_D) break;
80 set(wnd, MUIA_Window_Open, FALSE);
81 MUI_DisposeObject(app);
84 return 0;