with Allegro.Palettes; use Allegro.Palettes;
package Allegro.Truecolor is
type Color_Type is new Unsigned_32;
function GetR( color : Color_Type ) return Natural;
function GetG( color : Color_Type ) return Natural;
function GetB( color : Color_Type ) return Natural;
function GetA( color : Color_Type ) return Natural;
function GetR8( color : Color_Type ) return Natural;
function GetG8( color : Color_Type ) return Natural;
function GetB8( color : Color_Type ) return Natural;
function GetR15( color : Color_Type ) return Natural;
function GetG15( color : Color_Type ) return Natural;
function GetB15( color : Color_Type ) return Natural;
function GetR16( color : Color_Type ) return Natural;
function GetG16( color : Color_Type ) return Natural;
function GetB16( color : Color_Type ) return Natural;
function GetR24( color : Color_Type ) return Natural;
function GetG24( color : Color_Type ) return Natural;
function GetB24( color : Color_Type ) return Natural;
function GetR32( color : Color_Type ) return Natural;
function GetG32( color : Color_Type ) return Natural;
function GetB32( color : Color_Type ) return Natural;
function GetA32( color : Color_Type ) return Natural;
function GetR_Depth( color_depth : Natural; color : Color_Type ) return Natural;
function GetG_Depth( color_depth : Natural; color : Color_Type ) return Natural;
function GetB_Depth( color_depth : Natural; color : Color_Type ) return Natural;
function GetA_Depth( color_depth : Natural; color : Color_Type ) return Natural;
function Makecol( r, g, b : Natural ) return Color_Type;
function Makecol8( r, g, b : Natural ) return Color_Type;
function Makecol15( r, g, b : Natural ) return Color_Type;
function Makecol16( r, g, b : Natural ) return Color_Type;
function Makecol24( r, g, b : Natural ) return Color_Type;
function Makecol32( r, g, b : Natural ) return Color_Type;
function Makecol15_Dither( r, g, b, x, y : Integer ) return Color_Type;
function Makecol16_Dither( r, g, b, x, y : Integer ) return Color_Type;
function Makeacol( r, g, b, a : Natural ) return Color_Type;
function Makeacol32( r, g, b, a : Natural ) return Color_Type;
function Makecol_Depth( color_depth, r, g, b : Natural ) return Color_Type;
function Makeacol_Depth( color_depth, r, g, b, a : Natural ) return Color_Type;
function Compare( a, b : Color_Type; tolerance : Natural := 0 ) return Boolean;
function Contrast( fg, bg : Color_Type; ratio : Float := 1.75 ) return Color_Type;
function Hard_Contrast( bg : Color_Type ) return Color_Type;
function Lighten( color : Color_Type; factor : Float ) return Color_Type;
function Make_Grey( brightness : Natural ) return Color_Type;
function Palette_Color( index : Palette_Index ) return Color_Type;
private
pragma Import( C, GetR, "getr" );
pragma Import( C, GetG, "getg" );
pragma Import( C, GetB, "getb" );
pragma Import( C, GetA, "geta" );
pragma Import( C, GetR8, "getr8" );
pragma Import( C, GetG8, "getg8" );
pragma Import( C, GetB8, "getb8" );
pragma Import( C, GetR15, "getr15" );
pragma Import( C, GetG15, "getg15" );
pragma Import( C, GetB15, "getb15" );
pragma Import( C, GetR16, "getr16" );
pragma Import( C, GetG16, "getg16" );
pragma Import( C, GetB16, "getb16" );
pragma Import( C, GetR24, "getr24" );
pragma Import( C, GetG24, "getg24" );
pragma Import( C, GetB24, "getb24" );
pragma Import( C, GetR32, "getr32" );
pragma Import( C, GetG32, "getg32" );
pragma Import( C, GetB32, "getb32" );
pragma Import( C, GetA32, "geta32" );
pragma Import( C, GetR_Depth, "getr_depth" );
pragma Import( C, GetG_Depth, "getg_depth" );
pragma Import( C, GetB_Depth, "getb_depth" );
pragma Import( C, GetA_Depth, "geta_depth" );
pragma Import( C, Makecol, "makecol" );
pragma Import( C, Makecol8, "makecol8" );
pragma Import( C, Makecol15, "makecol15" );
pragma Import( C, Makecol16, "makecol16" );
pragma Import( C, Makecol24, "makecol24" );
pragma Import( C, Makecol32, "makecol32" );
pragma Import( C, Makecol15_Dither, "makecol15_dither" );
pragma Import( C, Makecol16_Dither, "makecol16_dither" );
pragma Import( C, Makeacol, "makeacol" );
pragma Import( C, Makeacol32, "makeacol32" );
pragma Import( C, Makecol_Depth, "makecol_depth" );
pragma Import( C, Makeacol_Depth, "makeacol_depth" );
pragma Import( C, Palette_Color, "get_palette_color" );
end Allegro.Truecolor;