home *** CD-ROM | disk | FTP | other *** search
-
- #include <stdio.h>
- #include "MUIB-DemoGui.h"
-
- struct Library *MUIMasterBase;
-
- int main()
- {
- ULONG signals;
- BOOL running = TRUE;
- struct ObjApp *app;
-
- if (!(MUIMasterBase = OpenLibrary(MUIMASTER_NAME,MUIMASTER_VMIN)))
- {
- puts("Failed to open "MUIMASTER_NAME".");
- exit(1);
- }
-
- app = CreateApp();
- if (!app)
- {
- puts("Failed to create Application.");
- exit(1);
- }
-
- while (running)
- {
- switch (DoMethod(app->App,MUIM_Application_Input,&signals))
- {
- case MUIV_Application_ReturnID_Quit:
- running = FALSE;
- break;
- }
- if (running && signals) Wait(signals);
- }
-
- DisposeApp(app);
-
- if (MUIMasterBase) CloseLibrary(MUIMasterBase);
-
- }
-
-