/*
 * saveWarn.h
 *
 * [Generated from saveWarn, 25 September 1996]
 */

#if !defined(__CC_NORCROFT) || !defined(__arm)
  #error You must use the Norcroft ARM Compiler for Sapphire programs
#endif

#pragma include_only_once
#pragma force_top_level

#ifndef __saveWarn_h
#define __saveWarn_h

#ifndef __sapphire_h
  #include "sapphire.h"
#endif

/*----- Overview ----------------------------------------------------------*
 *
 * Functions provided:
 *
 *  saveWarn
 *  saveWarn_saved
 *  saveWarn_close
 */

/* --- saveWarn --- *
 *
 * On entry:	R0 == estimated size of data
 *		R1 == file type of the data
 *		R2 == pointer to name of the file
 *		R3 == pointer to handler block
 *		R4 == value to pass to handlers in R10
 *		R5 == value to pass to handlers in R12
 *		R6 == flags (in bottom two bits)
 *
 * On exit:	--
 *
 * Use:		Displays a warning box allowing the user to save a modified
 *		document.  The flags in R6 are as follows:
 *
 *		Bit 0	File is safe; don't give a warning
 *		Bit 1	File's name is sensible; display it in the warning
 *
 *		The handler block is the same as that passed to saveAs (q.v.)
 *		with an extra entry point on the very beginning, which is
 *		expected to remove the document from memory.  This entry
 *		point is not passed any arguments except for R10 and R12.
 *
 *		In order for the system to work, you must call various
 *		saveWarn routines from your saveAs entry points:
 *
 *		saveWarn_saved from saEntry__success
 *		saveWarn_close from saEntry__closed
 */

extern routine saveWarn;

/* --- saveWarn_saved --- *
 *
 * On entry:	--
 *
 * On exit:	--
 *
 * Use:		Informs saveWarn that the document has been saved.  If
 *		saveWarn is not operating, this call is ignored.  You should
 *		only call this routine if the document is *safe*, rather than
 *		RAM transferred to another application, for example.
 */

extern routine saveWarn_saved;

/* --- saveWarn_close --- *
 *
 * On entry:	--
 *
 * On exit:	--
 *
 * Use:		Informs saveWarn that the save dialogue box has been closed.
 *		If the document is now saved, then it is removed from
 *		memory.
 */

extern routine saveWarn_close;

/*----- That's all, folks -------------------------------------------------*/

#endif
