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

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

/*----- Overview ----------------------------------------------------------*
 *
 * Functions provided:
 *
 *  ibicon_create
 *  ibicon_changeSprite
 *  ibicon_changeText
 *  ibicon_remove
 *  ibicon_init
 */

/* --- ibicon_create --- *
 *
 * On entry:	R0 == pointer to sprite name
 *		R1 == pointer to text buffer (must be writable if you
 *		      intend to change the text)
 *		R2 == icon bar position indicator (`window handle')
 *		R3 == icon bar priority/icon handle
 *		R4 == pointer to event handler
 *		R5 == value to pass in R10
 *		R6 == value to pass in R12
 *
 * On exit:	R0 == ibicon icon handle
 *		May return an error
 *
 * Use: 		Places an icon on the icon bar. Your handler is called when
 *		an event occurs on the icon. On entry to the handler, R10
 *		and R12 are set up as for above, R0 is the event type, and
 *		R1 is the ibicon pointer.
 */

extern routine ibicon_create;

/* --- ibicon_changeSprite --- *
 *
 * On entry:	R0 == ibicon pointer
 *		R1 == pointer to sprite name
 *
 * On exit:	--
 *
 * Use:		Changes the sprite of the ibicon passed to it.
 */

extern routine ibicon_changeSprite;

/* --- ibicon_changeText --- *
 *
 * On entry:	R0 == ibicon pointer
 *		R1 == pointer to new text
 *
 * On exit:	--
 *
 * Use:		Changes the sprite of the ibicon passed to it.
 */

extern routine ibicon_changeText;

/* --- ibicon_remove --- *
 *
 * On entry:	R0 == ibicon icon handle
 *
 * On exit:	--
 *
 * Use:		Removes the given icon from the icon bar.
 */

extern routine ibicon_remove;

/* --- ibicon_init --- *
 *
 * On entry:	--
 *
 * On exit:	--
 *
 * Use:		Initialises the ibicon unit.
 */

extern routine ibicon_init;

/*----- Event types -------------------------------------------------------*/

#define ibEvent_select 0
#define ibEvent_menu 1
#define ibEvent_adjust 2
#define ibEvent_save 3
#define ibEvent_load 4
#define ibEvent_help 5

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

#endif
