Mac Framework/MacMain.c

/*
    File:       MovieShell.c
 
    Contains:   Simple Mac shell for testing QuickTime.
 
    Written by: DTS
 
    Copyright:  © 1994-1995 by Apple Computer, Inc., all rights reserved.
 
    Change History (most recent first):
 
       <1>      12/20/94    khs     first file
       
*/
 
 
// INCLUDES
#include <stdio.h>
#ifdef __MWERKS__
#include <sioux.h>
#endif // __MWERKS__
 
#include "DTSQTUtilities.h"
#include "MacFramework.h"
 
 
// MAIN
// ______________________________________________________________________
void main(void)
{
    OSErr anErr = noErr;
 
// This is for controlling the sioux window under Metrowerks (5.0 forward)
#ifdef USESIOUX 
    SIOUXSettings.initializeTB = false;
    SIOUXSettings.setupmenus = false;
#endif // USESIOUX  
 
    InitStack(10*1024L);                        // Add 10k more to the stack, for possible QD and Sound Manager needs
    InitMacEnvironment(10L);                    // 10 * MoreMasters
    InitMenubar();
    
    if( !QTUIsQuickTimeInstalled() )
    {
        ShowWarning("\pThe QuickTime extension is not present in this system", 0);
        ExitToShell();
    }
 
#if powerc  
    if( !QTUIsQuickTimeCFMInstalled() )
    {
        ShowWarning("\pThe QuickTime PowerPlug extension is not available (exit)", 0);
        ExitToShell();                              // I could disable features as well.
    }
#endif 
 
    anErr = EnterMovies(); DebugAssert(anErr == noErr);
    if(anErr != noErr)
    {
        ShowWarning("\pCould not initialize the QuickTime environment (exit): ", anErr);
        ExitToShell();
    }
 
    MainEventLoop();
}