with Allegro.Color; use Allegro.Color;
with Interfaces; use Interfaces;
package Allegro.Bitmaps is
type Allegro_Bitmap is limited private;
type A_Allegro_Bitmap is access all Allegro_Bitmap;
subtype Allegro_Bitmap_Flags is Unsigned_32;
ALLEGRO_MEMORY_BITMAP : constant Allegro_Bitmap_Flags;
ALLEGRO_KEEP_BITMAP_FORMAT : constant Allegro_Bitmap_Flags;
ALLEGRO_FORCE_LOCKING : constant Allegro_Bitmap_Flags;
ALLEGRO_NO_PRESERVE_TEXTURE : constant Allegro_Bitmap_Flags;
ALLEGRO_ALPHA_TEST : constant Allegro_Bitmap_Flags;
ALLEGRO_MIN_LINEAR : constant Allegro_Bitmap_Flags;
ALLEGRO_MAG_LINEAR : constant Allegro_Bitmap_Flags;
ALLEGRO_MIPMAP : constant Allegro_Bitmap_Flags;
ALLEGRO_NO_PREMULTIPLIED_ALPHA : constant Allegro_Bitmap_Flags;
ALLEGRO_VIDEO_BITMAP : constant Allegro_Bitmap_Flags;
function Al_Get_New_Bitmap_Flags return Allegro_Bitmap_Flags;
pragma Import( C, Al_Get_New_Bitmap_Flags, "al_get_new_bitmap_flags" );
function Al_Get_New_Bitmap_Format return Allegro_Pixel_Format;
pragma Import( C, Al_Get_New_Bitmap_Format, "al_get_new_bitmap_format" );
procedure Al_Set_New_Bitmap_Flags( flags : Allegro_Bitmap_Flags );
pragma Import( C, Al_Set_New_Bitmap_Flags, "al_set_new_bitmap_flags" );
procedure Al_Add_New_Bitmap_Flag( flag : Allegro_Bitmap_Flags );
pragma Import( C, Al_Add_New_Bitmap_Flag, "al_add_new_bitmap_flag" );
procedure Al_Set_New_Bitmap_Format( format : Allegro_Pixel_Format );
pragma Import( C, Al_Set_New_Bitmap_Format, "al_set_new_bitmap_format" );
function Al_Create_Bitmap( w, h : Integer ) return A_Allegro_Bitmap;
pragma Import( C, Al_Create_Bitmap, "al_create_bitmap" );
function Al_Clone_Bitmap( bitmap : A_Allegro_Bitmap ) return A_Allegro_Bitmap;
pragma Import( C, Al_Clone_Bitmap, "al_clone_bitmap" );
procedure Al_Destroy_Bitmap( bitmap : in out A_Allegro_Bitmap );
function Al_Get_Bitmap_Flags( bitmap : A_Allegro_Bitmap ) return Allegro_Bitmap_Flags;
pragma Import( C, Al_Get_Bitmap_Flags, "al_get_bitmap_flags" );
function Al_Get_Bitmap_Format( bitmap : A_Allegro_Bitmap ) return Allegro_Pixel_Format;
pragma Import( C, Al_Get_Bitmap_Format, "al_get_bitmap_format" );
function Al_Get_Bitmap_Height( bitmap : A_Allegro_Bitmap ) return Integer;
pragma Import( C, Al_Get_Bitmap_Height, "al_get_bitmap_height" );
function Al_Get_Bitmap_Width( bitmap : A_Allegro_Bitmap ) return Integer;
pragma Import( C, Al_Get_Bitmap_Width, "al_get_bitmap_width" );
function Al_Get_Pixel( bitmap : A_Allegro_Bitmap; x, y : Integer ) return Allegro_Color;
pragma Import( C, Al_Get_Pixel, "al_get_pixel" );
procedure Al_Put_Pixel( x, y : Integer; color : Allegro_Color );
pragma Import( C, Al_Put_Pixel, "al_put_pixel" );
procedure Al_Put_Blended_Pixel( x, y : Integer; color : Allegro_Color );
pragma Import( C, Al_Put_Blended_Pixel, "al_put_blended_pixel" );
procedure Al_Convert_Mask_To_Alpha( bitmap : A_Allegro_Bitmap;
mask_color : Allegro_Color );
pragma Import( C, Al_Convert_Mask_To_Alpha, "al_convert_mask_to_alpha" );
procedure Al_Get_Clipping_Rectangle( x, y, w, h : out Integer );
pragma Import( C, Al_Get_Clipping_Rectangle, "al_get_clipping_rectangle" );
procedure Al_Reset_Clipping_Rectangle;
pragma Import( C, Al_Reset_Clipping_Rectangle, "al_reset_clipping_rectangle" );
procedure Al_Set_Clipping_Rectangle( x, y, width, height : Integer );
pragma Import( C, Al_Set_Clipping_Rectangle, "al_set_clipping_rectangle" );
function Al_Create_Sub_Bitmap( parent : A_Allegro_Bitmap;
x, y : Integer;
w, h : Integer ) return A_Allegro_Bitmap;
pragma Import( C, Al_Create_Sub_Bitmap, "al_create_sub_bitmap" );
function Al_Is_Sub_Bitmap( bitmap : A_Allegro_Bitmap ) return Boolean;
function Al_Get_Parent_Bitmap( bitmap : A_Allegro_Bitmap ) return A_Allegro_Bitmap;
pragma Import( C, Al_Get_Parent_Bitmap, "al_get_parent_bitmap" );
private
ALLEGRO_MEMORY_BITMAP : constant Allegro_Bitmap_Flags := 16#0001#;
ALLEGRO_KEEP_BITMAP_FORMAT : constant Allegro_Bitmap_Flags := 16#0002#;
ALLEGRO_FORCE_LOCKING : constant Allegro_Bitmap_Flags := 16#0004#;
ALLEGRO_NO_PRESERVE_TEXTURE : constant Allegro_Bitmap_Flags := 16#0008#;
ALLEGRO_ALPHA_TEST : constant Allegro_Bitmap_Flags := 16#0010#;
ALLEGRO_MIN_LINEAR : constant Allegro_Bitmap_Flags := 16#0040#;
ALLEGRO_MAG_LINEAR : constant Allegro_Bitmap_Flags := 16#0080#;
ALLEGRO_MIPMAP : constant Allegro_Bitmap_Flags := 16#0100#;
ALLEGRO_NO_PREMULTIPLIED_ALPHA : constant Allegro_Bitmap_Flags := 16#0200#;
ALLEGRO_VIDEO_BITMAP : constant Allegro_Bitmap_Flags := 16#0400#;
type Allegro_Bitmap is limited null record;
pragma Convention( C, Allegro_Bitmap );
end Allegro.Bitmaps;