home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / progrmng / transklc.sit / MiniSkel.c.bin / MiniSkel.c
Encoding:
C/C++ Source or Header  |  1989-01-29  |  1016 b   |  41 lines  |  [TEXT/KAHL]

  1. /*
  2.     TransSkel demonstration:  Minimal application
  3.  
  4.     This program does nothing but put up an Apple menu with desk
  5.     accessories, and a File menu with a Quit item.  The user can
  6.     run DA's until Quit is selected or command-Q is typed.
  7.  
  8.     The project should include this file, TransSkel.c (or a project
  9.     built from TransSkel.c), and MacTraps.
  10.  
  11.     21 Apr 1988    Paul DuBois
  12.     29 Jan 1989 Conversion for TransSkel 2.0.  Integer should be a
  13.                 typedef for compiler 2-byte integer type.
  14. */
  15.  
  16. # include    <MenuMgr.h>
  17. # define    nil    0L
  18.  
  19. typedef    int    Integer;
  20.  
  21.  
  22. DoFileMenu (item)
  23. Integer    item;                        /* ignored - there's only Quit */
  24. {
  25.     SkelWhoa ();                    /* tell SkelMain to quit */
  26. }
  27.  
  28.  
  29. main ()
  30. {
  31. MenuHandle    m;
  32.  
  33.     SkelInit (6, nil);                /* initialize */
  34.     SkelApple (nil, nil);            /* handle desk accessories */
  35.     m = NewMenu (2, "\pFile");        /* create menu */
  36.     AppendMenu (m, "\pQuit/Q");
  37.     (void) SkelMenu (m, DoFileMenu, nil, true);    /* trivial menu handler */
  38.     SkelMain ();                    /* loop 'til Quit selected */
  39.     SkelClobber ();                    /* clean up */
  40. }
  41.