/*
**	$Filename: BTD.h
**	$Release: 1.0
**	$Date: 25.07.95
**
**	(c) Copyright 1993-1995 Matthias Scheler
**	    All Rights Reserved
*/

#ifndef LIBRARIES_BTD_H
#define LIBRARIES_BTD_H

#ifndef UTITLITY_TAGITEM_H
#include <utility/tagitem.h>
#endif

#define BTDPT_BOOLEAN 1
#define BTDPT_INTEGER 2
#define BTDPT_CYCLE   3 

struct BTDNode		/* standard head for parameter structures */
 {
  Tag   BN_Tag;		/* identification tag for this parameter  */
  char *BN_Name;        /* name of this parameter                 */
  ULONG BN_Type;        /* type of this parameter                 */
/* ...  BN_Value; */
 };

struct BTDBoolean         /* structure for boolean parameter */
 {
  struct BTDNode BB_Node; /* standard head                   */
  LONG   BB_Value;        /* boolean value                   */
 };

struct BTDInteger                /* structure for integer parameter */
 {
  struct BTDNode BI_Node;        /* standard head                   */
  LONG   BI_Value,BI_Min,BI_Max; /* actual/minimum/maximum value    */
  BOOL   BI_Slider;              /* Set to TRUE to get a slider.    */ 
 };

struct BTDCycle           /* structure for a cycle gadget          */
 {
  struct BTDNode BC_Node; /* standard head                         */
  LONG   BC_Value;        /* selected item                         */
  char **BC_Labels;       /* NULL terminated array with the labels */
 };

struct BTDInfo                 /* structure returned by QueryBlanker()     */
 {
  ULONG  BI_Revision,          /* This field must be set to BTDI_Revision. */
         BI_ID;                /* 4 character ID for the blanker           */
  char  *BI_Name,              /* name of the blanker                      */
        *BI_Description,       /* description of the blanker               */
        *BI_Author;            /* author(s) of the blanker                 */
  struct BTDNode **BI_Params;  /* NULL terminated array with parameters    */
 };

#define BTDI_Revision 5L       /* value for BI_Revision, use the symbol! */

struct BTDDrawInfo             /* basic structure with drawing informations */
 {
  struct RastPort *BDI_RPort;  /* RastPort with or without layer            */
  UWORD *BDI_Pens;             /* pens for this instance of the blanker     */
  LONG BDI_Left,               /* left edge of the draw box                 */
       BDI_Top,                /* top edge of the draw box                  */
       BDI_Width,              /* width of the draw box                     */
       BDI_Height;             /* height of the draw box                    */
  UBYTE *BDI_Red,              /* red color table, index with pens          */
        *BDI_Green,            /* green color table, index with pens        */
        *BDI_Blue,             /* blue color table, index with pens         */
        *BDI_Changed;          /* set this to TRUE if you change a color    */
 };

#define BTD_BgPen 0            /* use ALWAYS this symbol as background pen  */

#define BTDERR_Size   1L       /* code for BTD_Error: draw box to small */
#define BTDERR_Memory 2L       /* code for BTD_Error: out of memory     */

#define BTD_TagBase (TAG_USER+'B'*65536L+'T'*256L+'D')
#define BTD_TAG(o)  (BTD_TagBase+(o))

#define BTD_DrawInfo BTD_TAG(1)    /* struct BTDDrawInfo *              */
#define BTD_Error    BTD_TAG(2)    /* ULONG *                           */
#define BTD_Instance BTD_TAG(3)    /* ULONG                             */
#define BTD_Client   BTD_TAG(100)  /* start of the client tags          */

struct BTDInfo *QueryBlanker(void);
APTR InitBlanker(struct TagItem *);
APTR InitBlankerTags(Tag,...);
void EndBlanker(APTR);
void AnimBlanker(APTR);
ULONG PenCountBlanker(struct TagItem *);
ULONG PenCountBlankerTags(Tag,...);

#ifdef __SASC
#pragma libcall BTDBase QueryBlanker 1e 0
#pragma libcall BTDBase InitBlanker 24 801
#pragma tagcall BTDBase InitBlankerTags 24 801
#pragma libcall BTDBase EndBlanker 2a 801
#pragma libcall BTDBase AnimBlanker 30 801
#pragma libcall BTDBase PenCountBlanker 36 801
#pragma tagcall BTDBase PenCountBlankerTags 36 801
#endif

#endif /* LIBRARIES_BTD_H */
