grub2: bring back build of aros-side grub2 tools
[AROS.git] / test / Zune / dtpic.c
blob21d47f27da9669f5aed0a1e1d459dcee042150bd
1 /*
2 Copyright © 2002-2011, The AROS Development Team.
3 All rights reserved.
5 $Id$
6 */
8 #include <dos/dos.h>
10 #include <proto/alib.h>
11 #include <proto/exec.h>
12 #include <proto/intuition.h>
13 #include <proto/muimaster.h>
15 #include <libraries/mui.h>
17 struct Library *MUIMasterBase;
19 Object *app;
21 int main(void)
23 Object *wnd;
25 MUIMasterBase = (struct Library*)OpenLibrary("muimaster.library",0);
27 app = ApplicationObject,
28 SubWindow, wnd = WindowObject,
29 MUIA_Window_Title, "dtpic test",
30 MUIA_Window_Activate, TRUE,
32 WindowContents, VGroup,
33 Child, DtpicObject, MUIA_Dtpic_Name, "SYS:System/Images/AROS.png", End,
34 End,
35 End,
36 End;
38 if (app)
40 ULONG sigs = 0;
42 DoMethod
44 wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, (IPTR) app,
45 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit
48 set(wnd,MUIA_Window_Open,TRUE);
50 while (DoMethod(app, MUIM_Application_NewInput, (IPTR) &sigs) != MUIV_Application_ReturnID_Quit)
52 if (sigs)
54 sigs = Wait(sigs | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D);
55 if (sigs & SIGBREAKF_CTRL_C) break;
56 if (sigs & SIGBREAKF_CTRL_D) break;
60 MUI_DisposeObject(app);
63 CloseLibrary(MUIMasterBase);
65 return 0;