wip smp test code. does no "real" work currently, but pretends to issue work to worke...
[AROS.git] / test / Zune / hideshow.c
blob62f279ef3444ac1b8ef3df5a1581f25ead886575
1 /*
2 Copyright © 2004, 2009, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <exec/types.h>
7 #include <stdlib.h>
8 #include <stdio.h>
9 #include <string.h>
11 #include <dos/dos.h>
12 #include <intuition/gadgetclass.h>
13 #include <intuition/icclass.h>
14 #include <proto/exec.h>
15 #include <proto/intuition.h>
16 #include <proto/muimaster.h>
17 #include <clib/alib_protos.h>
19 #include <libraries/mui.h>
22 int main(void)
24 Object *application, *window, *b1, *b2, *b3;
26 application = ApplicationObject,
27 SubWindow, window = WindowObject,
28 MUIA_Window_Title, (IPTR) "Hide & Show",
29 MUIA_Window_Activate, TRUE,
31 WindowContents, (IPTR) VGroup,
32 Child, (IPTR) HGroup,
33 Child, (IPTR) SimpleButton("Visible all the time"),
34 Child, (IPTR) (b1 = ImageButton("Click Hide or Show", "THEME:Images/Gadgets/Test")),
35 Child, (IPTR) SimpleButton("Visible all the time too"),
36 End,
37 Child, (IPTR) HGroup,
38 Child, (IPTR) (b2 = SimpleButton("Hide")),
39 Child, (IPTR) (b3 = SimpleButton("Show")),
40 End,
41 End,
42 End,
43 End;
45 if (application)
47 ULONG sigs = 0;
49 DoMethod
51 window, MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
52 (IPTR) application, 2, MUIM_Application_ReturnID,
53 MUIV_Application_ReturnID_Quit
56 DoMethod
58 b2, MUIM_Notify, MUIA_Pressed, FALSE,
59 (IPTR) b1, 3, MUIM_Set, MUIA_ShowMe, FALSE
62 DoMethod
64 b3, MUIM_Notify, MUIA_Pressed, FALSE,
65 (IPTR) b1, 3, MUIM_Set, MUIA_ShowMe, TRUE
68 set(window,MUIA_Window_Open,TRUE);
70 while
72 DoMethod
74 application, MUIM_Application_NewInput, (IPTR) &sigs
75 ) != MUIV_Application_ReturnID_Quit
78 if (sigs)
80 sigs = Wait(sigs | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D);
81 if (sigs & SIGBREAKF_CTRL_C) break;
82 if (sigs & SIGBREAKF_CTRL_D) break;
86 MUI_DisposeObject(application);
89 return 0;