home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / screen / scremo10.lha / ScreenMod / Source / message.c < prev    next >
C/C++ Source or Header  |  1991-06-06  |  1KB  |  51 lines

  1. /***************** MessageManager for ScreenMod ************************/
  2. /*                Written by Syd L. Bolton ©1991                       */
  3. /*                                                                     */
  4. /* PARAMETER          FUNCTION            INCLUDE FILE   */
  5. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  6. /*     1        About Information        about.h        */
  7. /*      2        Help Information (Keys)        help.h           */
  8. /***********************************************************************/
  9.  
  10. #include "about.h"
  11. #include "help.h"
  12.  
  13. Message(mnum)
  14. int mnum;
  15. {
  16. struct IntuiMessage *message;
  17. ULONG class;
  18. struct Window *AWindow;
  19. int about_exit=0;
  20.  
  21. AboutWindow.Screen=Screen;    /* make sure we're on right screen! */
  22.  
  23. AWindow=OpenWindow(&AboutWindow);
  24. if (AWindow==NULL) return(0);
  25.  
  26. switch (mnum) {
  27.     case 1: PrintIText(AWindow->RPort,&AboutTextList,0,0);
  28.         break;
  29.  
  30.     case 2: PrintIText(AWindow->RPort,&HelpTextList,0,0);
  31.         break;
  32.  
  33.     default: break;
  34.     }
  35.     
  36. do {
  37.     WaitPort(AWindow->UserPort);
  38.         while ( ( message=(struct IntuiMessage *)
  39.             GetMsg(AWindow->UserPort) ) != NULL)
  40.         {
  41.         class=message->Class;
  42.         ReplyMsg(message);
  43.  
  44.         if (class==GADGETUP) about_exit=1;
  45.         }
  46.     } while (about_exit==0);
  47.  
  48. CloseWindow(AWindow);
  49. }
  50.  
  51.