allocate sizeof(ExceptionContext) in cpu exception handlers
[AROS.git] / test / Zune / col.c
blobb7f85be9e2c63de36c49cb60220ecc8f80ee55e3
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 Object *MakeLabel(STRPTR str)
34 return (MUI_MakeObject(MUIO_Label, str, 0));
37 int main(void)
39 Object *wnd;
40 Object *img;
41 Object *a, *b, *c, *d;
43 app = ApplicationObject,
44 SubWindow, wnd = WindowObject,
45 MUIA_Window_Title, "col",
46 MUIA_Window_Activate, TRUE,
47 WindowContents, d = HGroup,
48 GroupFrameT("Background"),
49 Child, c = VGroup,
50 Child, a = PopimageObject, End,
51 Child, b = MakeLabel("Window"),
52 End,
53 Child, VGroup,
54 Child, PopimageObject, End,
55 Child, MakeLabel("Requester"),
56 End,
57 End,
58 End,
59 End;
61 if (app)
63 ULONG sigs = 0;
64 DoMethod(wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, app, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);
65 set(wnd, MUIA_Window_Open, TRUE);
67 printf("%d[%p] %d[%p] %d[%p] %d\n", _maxwidth(a), a, _maxwidth(b), b, _maxwidth(c), c, _maxwidth(d));
69 while((LONG) DoMethod(app, MUIM_Application_NewInput, &sigs) != MUIV_Application_ReturnID_Quit)
71 if (sigs)
73 sigs = Wait(sigs | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D);
74 if (sigs & SIGBREAKF_CTRL_C) break;
78 set(wnd, MUIA_Window_Open, FALSE);
79 MUI_DisposeObject(app);
82 return 0;