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

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

/*----- Overview ----------------------------------------------------------*
 *
 * Functions provided:
 *
 *  banner
 *  bnr_doBanner
 */

/* --- banner --- *
 *
 * On entry:	R0 == pointer to definition block, or 0
 *		R1 == R12 value to pass to setup routine, if present
 *
 * On exit:	--
 *
 * Use:		Displays a startup banner and initialises the library and
 *		client.  This call should be used as a replacement for
 *		sapphire_libInit.
 *
 *		If R0 is 0 on entry, no banner window is used; instead
 *		an hourglass percentage is displayed to indicate the
 *		amount of initialisation performed so far.
 *
 *		Alternatively, it should point to a table consisting of
 *		a flags word and optional arguments specified by the flags
 *		in order.  The options you can specify are a slider and
 *		percentage count icon (used to display current progress),
 *		a setup routine, and the leafname of a sprites file to
 *		attach to the banner window.
 *
 *		The setup routine is passed the banner dialogue handle in
 *		R0.  It should fill in parts of the banner window, such as
 *		the licencee name and serial number that can't be determined
 *		until runtime (for safeness), and maybe version information
 *		too.
 */

extern routine banner;

/* --- bnr_doBanner --- *
 *
 * On entry:	R0 == pointer to definition block, or 0
 *		R1 == R12 value to pass to setup routine, if present
 *		R2 == pointer to library initialisation table
 *
 * On exit:	--
 *
 * Use:		Displays a startup banner and initialises the library and
 *		client.  This routine is used to support dynamic linking.
 */

extern routine bnr_doBanner;

/*----- Flags -------------------------------------------------------------*/

#define bFlag_slider ((1<<0))

#define bFlag_counter ((1<<1))

#define bFlag_setup ((1<<2))

#define bFlag_sprites ((1<<3))

/*----- Macros ------------------------------------------------------------*/

/* --- Macro: BANNER --- *
 *
 * Arguments:	--
 *
 * Use:		Begins construction of a banner block.
 */

/* --- Macro: BFLAG --- *
 *
 * Arguments:	f == flag to set
 *
 * Use:		Sets a flag in the banner header, making sure they go in
 *		order.
 */

/* --- Macro: BNSLIDE --- *
 *
 * Arguments:	icon == icon number of slider in banner window
 *
 * Use:		Registers the banner window's slider.
 */

/* --- Macro: BNCOUNT --- *
 *
 * Arguments:	icon == icon number of percentage counter
 *
 * Use:		Registers the banner window's percentage counter.
 */

/* --- Macro: BNSETUP --- *
 *
 * Arguments:	rout == address of setup routine
 *
 * Use:		Registers the banner window's setup routine.
 */

/* --- Macro: BNSPRT --- *
 *
 * Arguments:	name == leafname of sprite file
 *
 * Use:		Registers the banner window's sprite file name.
 */

/* --- Macro: BNEND --- *
 *
 * Arguments:	--
 *
 * Use:		Terminates a banner window definition.
 */

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

#endif
