#ifndef __INC_POS_PGFX_COLOR_H
#define __INC_POS_PGFX_COLOR_H
/*******************************************************************
 Includes Release 24
 (C) Copyright 1995-1997 proDAD
     All Rights Reserved

 $AUT Holger Burkarth
 $DAT >>Color.h<<   20 Oct 1996    09:16:44 - (C) ProDAD
*******************************************************************/
#ifndef __INC_POS_PEXEC_TYPES_H
#include <pExec/Types.h>
#endif


/*----------------------------------
-----------------------------------*/
struct pOS_ColorMap
{
  struct pOS_GfxLibrary  *cm_Base;
  ULONG                   cm_UserData[2];
  UWORD                   cm_Type;       /* (enum pOS_ColorMapType) */
  UWORD                   cm_Pad;
  ULONG                   cm_Flags;      /* (enum pOS_ColorMapFlags) */
  ULONG                   cm_Colors;     /* Anzahl der Farbregistern */
  struct pOS_ColorMapEx  *cm_Ex;         /* System-Extension */
  UBYTE cm_Reserved[32];
};



/*----------------------------------
    Real-Color - 8 Bit
-----------------------------------*/
struct pOS_RColor
{
  union {
    ULONG rcu_Color;
    UBYTE rcu_Area[4]; /* Index: enum pOS_RColorIdx */
    struct {
      UBYTE rcue_A;
      UBYTE rcue_B;
      UBYTE rcue_G;
      UBYTE rcue_R;
    } rc_E;
  } rc_U;
};



/*----------------------------------
    Real-Color - 16 Bit
-----------------------------------*/
struct pOS_R2Color
{
  union {
    UWORD r2cu_Area[4]; /* Index: enum pOS_RColorIdx */
    struct {
      UWORD r2cue_A;
      UWORD r2cue_B;
      UWORD r2cue_G;
      UWORD r2cue_R;
    } rc_E;
  } rc_U;
};


/*----------------------------------
    RLUT-Color - 16 Bit
-----------------------------------*/
struct pOS_UColor
{
  UWORD uc_Pad;
  UWORD uc_Color;
};




enum pOS_RColorIdx
{
  RCOLIDX_A,
  RCOLIDX_B,
  RCOLIDX_G,
  RCOLIDX_R
};





enum pOS_ColorMapFlags /* cm_Flags */
{
  COLMAPF_Display = 0x0002,     /* die ColorMap kann dargestellt werden */

  COLMAPF_Clear=    0x80000000  /* ColorMap ist genullt */
};



enum pOS_ColorMapType /* cm_Type */
{
  COLMAPTYP_None =0,
  COLMAPTYP_RLut,       /*  */

  COLMAPTYP_StdRLut=0x80, /* (struct pOS_StdRLColorMap) */
  COLMAPTYP_MAXStd
};



/**  pOS_ObtainColorPen() - Flags **/
enum pOS_ObtainColorPenFlags
{
  OTCOLPF_Exclusive     = 0x0000, /* der Pen wird nur einmal vergeben */
  OTCOLPF_Shared        = 0x0001, /* der Pen wird von mehreren Usern verwendet */
  OTCOLPF_Flow          = 0x0002, /* nur in Verbindung mit _Shared
                                  ** Der Farbwert wird bei Bedarf minimal verändert.
                                  */


  OTCOLPF_Force         = 0x0020, /* Konnte auf herkömmliche Weise kein Pen gefunden
                                  ** werden, dann wird der nachliegenste Pen verwendet.
                                  ** => Beachte: Es ist nicht sicher, daß immer ein Pen
                                  **    gefunden wird (=>OTCOLPF_Exclusive)
                                  */
  OTCOLPF_Display       = 0x0080  /* Update Display */
};


/** pOS_DisplayColorMap() - Flags **/
enum pOS_DisplayColorMapFlags
{
  DISCOLF_Always        = 0x0000,       /* immer berechnen */
  DISCOLF_Update        = 0x0001        /* Die Color werden nur bei einer Veränderung
                                        ** neu berechnet und dargestellt.
                                        */
};



#endif
