home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Games / ISp Sample / Source / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.5 KB  |  92 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        main.c
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Copyright:    © 1999 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     File Ownership:
  11.  
  12.         DRI:                xxx put dri here xxx
  13.  
  14.         Other Contact:        xxx put other contact here xxx
  15.  
  16.         Technology:            xxx put technology here xxx
  17.  
  18.     Writers:
  19.  
  20.         (BWS)    Brent Schorsch
  21.  
  22.     Change History (most recent first):
  23.  
  24.        <SP1>      7/1/99    BWS        first checked in
  25. */
  26.  
  27. //•    ————————————————————————————————————————    Includes
  28.  
  29. #include <Appearance.h>
  30. #include <Dialogs.h>
  31. #include <Fonts.h>
  32. #include <Processes.h>
  33. #include <Resources.h>
  34. #include <Quickdraw.h>
  35. #include <Windows.h>
  36.  
  37. #include "AppleEventHandler.h"
  38. #include "EventHandler.h"
  39. #include "MemoryHandler.h"
  40. #include "MenuHandler.h"
  41.  
  42. //•    ————————————————————————————————————————    Private Definitions
  43. //•    ————————————————————————————————————————    Private Types
  44. //•    ————————————————————————————————————————    Private Variables
  45.  
  46. static QDGlobals    qd;
  47.  
  48. //•    ————————————————————————————————————————    Private Functions
  49.  
  50. void main(void);
  51. static void ToolboxInit(void);
  52.  
  53. //•    ————————————————————————————————————————    Public Variables
  54.  
  55. //•    ————————————————————    main
  56.  
  57. void
  58. main(void)
  59. {
  60.     ToolboxInit();
  61.     AppleEventsInit();
  62.  
  63.     RegisterAppearanceClient();
  64.     
  65.     MenuInit();
  66.     EventInit();
  67.  
  68.     EventLoop();
  69.  
  70.     AppleEventsShutDown();
  71.  
  72.     UnregisterAppearanceClient();
  73.  
  74.     ExitToShell();
  75. }
  76.  
  77. //•    ————————————————————    ToolboxInit
  78.  
  79. static void
  80. ToolboxInit(void)
  81. {
  82.     MaxApplZone();
  83.  
  84.     InitGraf(&qd.thePort);
  85.     InitFonts();
  86.     InitWindows();
  87.     InitMenus();
  88.     TEInit();
  89.     InitDialogs(nil);
  90.     InitCursor();
  91. }
  92.