--------------------------------------------------------------------------------
--                                                                            --
-- Copyright (C) 2004, RISC OS Ada Library (RASCAL) developers.               --
--                                                                            --
-- This library is free software; you can redistribute it and/or              --
-- modify it under the terms of the GNU Lesser General Public                 --
-- License as published by the Free Software Foundation; either               --
-- version 2.1 of the License, or (at your option) any later version.         --
--                                                                            --
-- This library is distributed in the hope that it will be useful,            --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of             --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           --
-- Lesser General Public License for more details.                            --
--                                                                            --
-- You should have received a copy of the GNU Lesser General Public           --
-- License along with this library; if not, write to the Free Software        --
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    --
--                                                                            --
--------------------------------------------------------------------------------

-- @brief Colour and Palette related types and subprograms.
-- $Author$
-- $Date$
-- $Revision$

with RASCAL.OS; use RASCAL.OS;

package RASCAL.Colour is

   type Palette_Colour is new Integer;

   type Palette_Entries_Type is
        (Clour_0,Colour_1,Colour_2,Colour_3,Colour_4,
         Colour_5,Colour_6,Colour_7,Colour_8,Colour_9,
         Colour_10,Colour_11,Colour_12,Colour_13,Colour_14,
         Colour_15,Border,Pointer_0,Pointer_1,Pointer_2);

   type Palette_Type is array (Palette_Entries_Type'Range) of Palette_Colour;
   pragma Convention (C, Palette_Type);

   --
   -- Reads the current Wimp palette settings.
   --
   procedure Read_Palette (Palette     : out Palette_Type;
                           True_Colour : in Boolean := false);

   --
   -- Return inverted colour.
   --
   function Get_Inverted (Colour : in Wimp_Colour) return Palette_Colour;
   
end RASCAL.Colour;
