WindStuff.h

/*
    File:       WindStuff.h
 
    Contains:       Window handling routine headers.
 
    Written by: Jason Hodges-Harris & Don Swatman
 
    Copyright:  Copyright © 1995-1999 by Apple Computer, Inc., All Rights Reserved.
 
                You may incorporate this Apple sample source code into your program(s) without
                restriction. This Apple sample source code has been provided "AS IS" and the
                responsibility for its operation is yours. You are not permitted to redistribute
                this Apple sample source code as "Apple sample source code" after having made
                changes. If you're going to re-distribute the source, we require that you make
                it clear in the source that the code was descended from Apple sample source
                code, but that you've made changes.
 
    Change History (most recent first):
                8/17/1999   Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
                
 
*/
 
#ifndef __WINDSTUFF__
#define __WINDSTUFF__
 
#include <Types.h>
#include <Windows.h>
 
 
//----------------------------------------------
// Globals
//----------------------------------------------
 
#define kMaxWindows 5  // Maxinum windows we can display
 
extern WindowPtr gTheWinds[kMaxWindows];  // List of all the windows
extern Boolean   gDone;                   // Set to true to quit program
    
//----------------------------------------------
// Prototypes
//----------------------------------------------
 
Boolean IsOurWindow( WindowPtr pWindow);
short GetWindowNum ( WindowPtr pWindow );
Boolean IsFreeWind( short *newWindNum, short howManyNeeded);
 
 
void CloseOurWindow ( short windNum );
void CloseAllWindows(void);
 
#define kWindAtFront (WindowPtr)-1L  // Create a window at the front
void CreateWindow ( short windNum, Str255 theTitle, WindowPtr pWindowBehind );
 
void DragSelWind( WindowPtr window,
                                    Point     mouseLoc);
 
void DoGoAwayWind ( WindowPtr pWindow,
                                        Point     mouseLoc);
void    DoWindUpdate ( WindowPtr pWindow );
 
void AboutBox(void);
 
#endif