source/eventloop.c

/****************************************************/
/*                                                  */
/*  File:       eventloop.c                         */
/*                                                  */
/*  Program:    Imageer                             */
/*                                                  */
/*  By:         Jason Hodges-Harris                 */
/*                                                  */
/*  Created:    26/10/95  00:00:00 AM               */
/*                                                  */
/*  Version:    1.0.0d3                             */
/*                                                  */
/*  Copyright:  © 1995-96 Apple Computer, Inc.,     */ 
/*                  all rights reserved.            */      
/*                                                  */
/****************************************************/
 
 
/**** Macintosh Toolbox Headers *****/
 
#ifndef __EVENTS__
#include <Events.h>
#endif
 
 
/****   Application headers and prototypes   ****/
 
 
#ifndef __IMAGEERAPPHEADER__
#include "Imageer.app.h"
#endif
 
#ifndef __IMAGEERPROTOSHEADER__
#include "Imageer.protos.h"
#endif
 
 
//  Global Variables
 
extern Boolean      gDone;              // program loop test condition
 
 
// EventLoop handles the application's main WNE loop
// and is called from within the main() function.
 
#pragma segment Main
void EventLoop (void)
{
    EventRecord event;
    
    while (!gDone)
    {
        if (WaitNextEvent (everyEvent,&event,kSleep,nil))
        {
            DoEvent (&event);
        }
    }
}