/*
 * errorBox.h
 *
 * [Generated from errorBox, 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 __errorBox_h
#define __errorBox_h

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

/*----- Overview ----------------------------------------------------------*
 *
 * Functions provided:
 *
 *  errorBox_init
 *  errorBox_beep
 *  errorBox
 */

/* --- errorBox_init --- *
 *
 * On entry:	R0 == pointer to application name
 *
 * On exit:	--
 *
 * Use:		Initialises the errorBox system nicely.  It creates the
 *		dialogue box now, and just uses it for the rest of the
 *		time.
 */

extern routine errorBox_init;

/* --- errorBox_beep --- *
 *
 * On entry:	--
 *
 * On exit:	--
 *
 * Use:		Sounds the bell (VDU 7) if the CMOS settings dictate that
 *		error boxes should cause a beep.
 */

extern routine errorBox_beep;

/* --- errorBox --- *
 *
 * On entry:	R0 == pointer to error block
 *		R1 == button style code, or pointer to buttons block
 *
 * On exit:	R0 == icon number clicked (ordered from the right)
 *		CS if R0 == 0, else CC
 *
 * Use:		Displays an error box on the screen.  The error block
 *		doesn't have to have a sensible error number, and doesn't
 *		have to	be word aligned, either.
 *
 *		Since errorBox claims a dialogue box handle on
 *		initialisation, it isn't possible for this call to fail.
 *		Hence it is ideal for reporting problems like `Out of
 *		memory' or `Too many windows'.
 *
 *		The buttons in the error box may be given either by a code
 *		or by a pointer to a buttons block (these may easily be
 *		distinguished, since the codes are lower than &8000).
 *
 *		Standard button arrangements are given by codes, as follows:
 *
 *		0 == Cancel
 *		1 == OK
 *		2 == OK, Cancel
 *		4 == OK, Help
 *		5 == OK, Cancel, Help
 */

extern routine errorBox;

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

#endif
