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

/*  YAAF - Yet another application framework
 *  Copyright (C) 1997, 1998 William Edward Woody
 *  
 *  This library is free software; you can redistribute it
 *  and/or modify it under the terms of the GNU Library
 *  General Public License as published by the Free Software
 *  Foundation; either version 2 of the License, or any
 *  later version.
 *  
 *  This library is distributed in the hope that it will be
 *  useful, but WITHOUT ANY WARRANTY; without even the implied
 *  warranty of MERCHANTABIILITY or FITNESS FOR A PARTICULAR
 *  PURPOSE. See the GNU Library General Public License for
 *  more details.
 *  
 *  You should have received a copy of the GNU Library General
 *  Public License along with this library; if not, write to the
 *  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 *  Boston, MA 02111-1307, USA.
 *  
 *  To contact the author, either e-mail me at woody@pandawave.com, 
 *	or write to
 *  
 *          William Edward Woody
 *          In Phase Consulting
 *          1545 Ard Eevin Avenue
 *          Glendale, CA 91202
 *
 *	Or visit us on the web at http://www.pandawave.com
 */

#ifndef PandaWave_MACFLOATER
#define PandaWave_MACFLOATER

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

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

/************************************************************************/
/*																		*/
/*	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
