2 Copyright © 2003, The AROS Development Team.
8 /* "muizunesupport.h" contains misc includes and
9 init stuff which is not important at the moment. */
11 #include "muizunesupport.h"
21 /****************************************************************
22 Allocate resources for gui
23 *****************************************************************/
27 app
= ApplicationObject
,
28 MUIA_Application_Title
, (IPTR
) "HelloZune",
29 MUIA_Application_Version
, (IPTR
) "$VER: HelloZune 0.1 (14.01.03)",
30 MUIA_Application_Copyright
, (IPTR
) "© 2003, The AROS Development Team",
31 MUIA_Application_Author
, (IPTR
) "The AROS Development Team",
32 MUIA_Application_Description
, (IPTR
) "Show basic structure of a MUI/Zune application",
33 MUIA_Application_Base
, (IPTR
) "HELLOZUNE",
35 SubWindow
, WD_Main
= WindowObject
,
36 MUIA_Window_Title
, (IPTR
) "Hello Zune",
38 WindowContents
, VGroup
,
40 Child
, BT_Hello
= SimpleButton("Hello Zune"),
44 End
, /* WindowObject */
46 End
; /* ApplicationObject */
50 /* Quit application if the windowclosegadget or the esc key is pressed. */
52 DoMethod(WD_Main
, MUIM_Notify
, MUIA_Window_CloseRequest
, TRUE
,
54 MUIM_Application_ReturnID
, MUIV_Application_ReturnID_Quit
);
60 } /* init_gui(void) */
63 /****************************************************************
64 Deallocates all gui resources
65 *****************************************************************/
69 if(app
){MUI_DisposeObject(app
);}
70 } /* deinit_gui(void) */
74 /****************************************************************
76 *****************************************************************/
82 while((LONG
) DoMethod(app
, MUIM_Application_NewInput
, &sigs
) != MUIV_Application_ReturnID_Quit
)
86 sigs
= Wait(sigs
| SIGBREAKF_CTRL_C
| SIGBREAKF_CTRL_D
);
87 if(sigs
& SIGBREAKF_CTRL_C
){break;}
88 if(sigs
& SIGBREAKF_CTRL_D
){break;}
94 /****************************************************************
96 *****************************************************************/
98 int main(int argc
, char *argv
[])
104 set(WD_Main
, MUIA_Window_Open
, TRUE
);
106 if(xget(WD_Main
, MUIA_Window_Open
))
111 set(WD_Main
, MUIA_Window_Open
, FALSE
);
118 } /* main(int argc, char *argv[]) */