home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Harvest C / Examples / Sample2b.c < prev   
Encoding:
C/C++ Source or Header  |  1991-10-10  |  662 b   |  56 lines  |  [TEXT/ALFA]

  1. /*
  2.     Sample application, based on TransSkel
  3.   *
  4.   */
  5.  
  6. #include <Menus.h>
  7. #include <OSUtils.h>
  8. #include "Sample2a.h"
  9.  
  10. MenuHandle      fileMenu;
  11.  /*
  12.   * File menu handler
  13.   */
  14.  
  15. void
  16. DoFileMenu(item)
  17.   short           item;
  18. {
  19.   switch (item) {
  20.   case 1:
  21.       SkelWhoa();
  22.     break;
  23.  
  24.   }
  25. }
  26.  
  27.  
  28.  /*
  29.   * Handle selection of About item from Apple menu
  30.   */
  31.  
  32. void
  33. DoAbout(void)
  34. {
  35.   SysBeep(1);
  36. }
  37.  
  38.  
  39. int
  40. main()
  41. {
  42.   Debugger();
  43.   SkelInit(NULL, 1);
  44.  
  45.   SkelApple("\pAbout Sample2...beep...", DoAbout);
  46.  
  47.   fileMenu = NewMenu(1000, "\pFile");
  48.   AppendMenu(fileMenu, "\pQuit/Q");
  49.   SkelMenu(fileMenu, DoFileMenu, NULL, false,true);
  50.  
  51.   SkelMain();
  52.   SkelClobber();
  53.   return 0;
  54. }
  55.  
  56.