home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / The Hacks! / COSEmulator / COSEmulator- SRC / src / main.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-21  |  1.7 KB  |  82 lines  |  [TEXT/CWIE]

  1. //===================================================================
  2. //=======================  Headers        =============================
  3.  
  4. #include "Screen.h"
  5. #include "MacOSEvents.h"
  6. #include "ApplicationHandler.h"
  7.  
  8.  
  9. #include "MenuBar.h"
  10. void    InitTHIng( void );
  11.  
  12. //===================================================================
  13. //=======================  Globals        =============================
  14.  
  15.  
  16. //===================================================================
  17. //=======================  #define        =============================
  18.  
  19.  
  20. //===================================================================
  21. //=======================  Function Prototypes    =====================
  22. void InitOSSpecific( void );
  23. void    main( void );
  24.  
  25. /*----------------------------------------------------------------------------\
  26.  
  27.     main
  28.  
  29. \----------------------------------------------------------------------------*/
  30.  
  31. void    main( void )
  32. {
  33.     InitOSSpecific();
  34.     
  35.     InitEvents();
  36.     InitMenuItems();
  37.     menuBar.Init();
  38.     InitMenuItemWindow();
  39.     ApplicationHandlerInit();
  40.     InitTHIng();
  41.     
  42.     if( screen.InitScreen() )
  43.     {
  44.         AH.Maintance();
  45.         
  46.         while( true )
  47.         {
  48.             HandleInterface();
  49.         
  50.             AH.Maintance();
  51.             screen.UpdateMainWindow();
  52.         }    
  53.     }
  54. }
  55.  
  56. /*----------------------------------------------------------------------------\
  57.  
  58.     InitToolbox
  59.     
  60.     Need to call this first on the macos
  61.  
  62. \----------------------------------------------------------------------------*/
  63.  
  64. void InitOSSpecific( void )
  65. {
  66.     MaxApplZone();
  67.  
  68.     InitGraf((Ptr) &qd.thePort);
  69.     InitFonts();
  70.     InitWindows();
  71.     InitMenus();
  72.     FlushEvents(everyEvent,0);
  73.     TEInit();
  74.     InitDialogs(0L);
  75.     InitCursor();
  76.     
  77.     MoreMasters();
  78.     MoreMasters();
  79.     MoreMasters();
  80.     MoreMasters();
  81.     MoreMasters(); // 5 needed? 
  82. }