#ifndef RAINBOWSYSTEM_H
#define RAINBOWSYSTEM_H

/*
**      $VER: RainbowSystem.h (4.4.98)
**      Release 2.0
**
**      (C) Copyright 1997-1998 Andrea Latina
**          All Rights Reserved
*/


#ifndef EXEC_TYPES_H
#include "exec/types.h"
#endif /* EXEC_TYPES_H */

#ifndef EXEC_LIBRARIES_H
#include "exec/libraries.h"
#endif /* EXEC_LIBRARIES_H */

#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif /* UTILITY_TAGITEM_H */


/*
** RainbowSystemBase
*/

struct RainbowSystemBase
{
    struct Library         rs_LibNode;
    APTR                   rs_SegList;
};

#define RAINBOWSYSTEM_NAME    "rainbow.library"
#define RAINBOWSYSTEM_VERSION 1L


/*
** Errors
*/

#define NO_ERROR                     0

#define NOT_ENOUGH_FREE_PENS        -1      //
#define NO_MEMORY_FOR_TABLES        -2      //   These errors
#define NOT_ENOUGH_DEPTH            -3      //
#define CANT_LOCK_SCREEN            -4      //  are handled by
#define INADEQUATE_SCREEN           -5      //
#define UNKNOWN_ERROR               -6      //  RainbowManager
#define CANNOT_OPEN_DRIVER          -100    //

#define RAINBOWMANAGER_ISNT_ACTIVE  -101
#define NOT_ENOUGH_MEMORY           -102


/*
** Macros
*/

#define RGB(r,g,b)      ((r) << 16 | (g) << 8 | (b))

#define RGB_RED         RGB(0xFF, 0x00, 0x00)
#define RGB_GREEN       RGB(0x00, 0xFF, 0x00)
#define RGB_BLUE        RGB(0x00, 0x00, 0xFF)
#define RGB_CYAN        RGB(0x00, 0xFF, 0xFF)
#define RGB_MAGENTA     RGB(0xFF, 0x00, 0xFF)
#define RGB_YELLOW      RGB(0xFF, 0xFF, 0x00)
#define RGB_BLACK       RGB(0x00, 0x00, 0x00)
#define RGB_WHITE       RGB(0xFF, 0xFF, 0xFF)

#define RGB_NONE        (-1L)

#define rs_DrawCircle(obj,x,y,d,r,g,b)     rs_DrawEllipse(obj,x,y,d,d,r,g,b)
#define rs_FillCircle(obj,x,y,d,rgb0,rgb1) rs_FillEllipse(obj,x,y,d,d,rgb0,rgb1)


/*
** Tags for rs_About(APTR rainbow struct TagItem *tags )
*/

#define RSA_TagBase         (TAG_USER)

#define RSA_PubScreenName   ((RSA_TagBase)+1)
#define RSA_ScreenTitle     ((RSA_TagBase)+2)

#define RSA_PictureName     ((RSA_TagBase)+3)

#define RSA_HideLoading     ((RSA_TagBase)+4)

#define RSA_Title           ((RSA_TagBase)+5)
#define RSA_TitleAttr       ((RSA_TagBase)+6)
#define RSA_TitleAlign      ((RSA_TagBase)+7)
#define RSA_TitleColor      ((RSA_TagBase)+8)

#define RSA_SubTitle        ((RSA_TagBase)+9)
#define RSA_SubTitleAttr    ((RSA_TagBase)+10)
#define RSA_SubTitleAlign   ((RSA_TagBase)+11)
#define RSA_SubTitleColor   ((RSA_TagBase)+12)

#define RSA_SubText         ((RSA_TagBase)+13)
#define RSA_SubTextAttr     ((RSA_TagBase)+14)
#define RSA_SubTextAlign    ((RSA_TagBase)+15)
#define RSA_SubTextColor    ((RSA_TagBase)+16)

#define RSA_BorderX         ((RSA_TagBase)+17)
#define RSA_BorderY         ((RSA_TagBase)+18)

#define RSA_WaitSecs        ((RSA_TagBase)+19)
#define RSA_WaitForClick    ((RSA_TagBase)+20)
#define RSA_Persistent      ((RSA_TagBase)+21)


/*
** Text alignment
*/

#define TEXT_LEFT   0
#define TEXT_RIGHT  1
#define TEXT_CENTER 2


#endif  /* RAINBOWSYSTEM_H */
