/*	MacFloater.h
 *
 *		Floating window support library. This is used to provide
 *	floating window support on the Macintosh environment.
 */

/**********************************************************************

  YAAF is Copyright 1997-1999 by William Woody.

  Redistribution and use in source and binary forms, with or without 
  modification, are permitted provided that the following conditions 
  are met:

  Redistributions of source code must retain the above copyright notice, 
  this list of conditions and the following disclaimer.

  Neither the name of the copyright holder or other contributors may
  be used to promote products derived from this software without
  specific written prior permission.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
  SOFTWARE.
  
  Contact:   woody@alumni.caltech.edu
  Web page:  http://www.pandawave.com/yaaf/

**********************************************************************/

#ifndef PandaWave_MACFLOATER
#define PandaWave_MACFLOATER

/************************************************************************/
/*																		*/
/*	Constants															*/
/*																		*/
/************************************************************************/

#define	KFloatingWindow				10
#define KNormalWindow				11
#define KDialogWindow				12
#define KTooltipWindow				13

/************************************************************************/
/*																		*/
/*	External Functions (Required Functions)								*/
/*																		*/
/************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

/*
 *	Activation routine; this is required to provide proper window
 *	activate/deactivate support.
 */

extern void XGRDoActivate(WindowPtr,short);	// Needed support routine

#ifdef __cplusplus
}
#endif

/************************************************************************/
/*																		*/
/*	Floating Windows													*/
/*																		*/
/************************************************************************/

/*
 *  Floating window support [MacFloater.c]
 *
 *		These are replacements for the Macintosh functions of similar
 *	name. They are used for creating and maintaining floating windows.
 *
 *		NOTE: This requires the 'WDEF' resource #128 (Infinity Window)
 *	for proper operation. The window definition passed is between
 *	2048 and 2063 to create a floating window.
 */

#ifdef __cplusplus
extern "C" {
#endif

extern WindowPtr MFrontWindow();
extern WindowPtr MLastFloater();	// Last floater window
extern void MSelectWindow(WindowPtr);
extern WindowPtr MNewWindow(Ptr,Rect *,unsigned char *,Boolean,short,WindowPtr,Boolean,long);
extern WindowPtr MNewCWindow(Ptr,Rect *,unsigned char *,Boolean,short,WindowPtr,Boolean,long);
extern void MShowWindow(WindowPtr);
extern void MHideWindow(WindowPtr);
extern void MCloseWindow(WindowPtr);
extern void MDragWindow(WindowPtr,Point,const Rect *);
extern Boolean MIsDialogEvent(EventRecord *);
extern Boolean MDialogSelect(EventRecord *, DialogPtr *, short *);

#ifdef __cplusplus
}
#endif

#endif // PandaWave_MACFLOATER
