1. -- 
  2. -- Copyright (c) 2013 Kevin Wellwood 
  3. -- All rights reserved. 
  4. -- 
  5. -- This source code is distributed under the Modified BSD License. For terms and 
  6. -- conditions, see license.txt. 
  7. -- 
  8.  
  9. -- Allegro 5.0.9 - Base Allegro API package 
  10. package Allegro is 
  11.  
  12.     pragma Elaborate_Body; 
  13.  
  14.     type Allegro_Event_Source is limited private; 
  15.     type A_Allegro_Event_Source is access all Allegro_Event_Source; 
  16.  
  17.      -- Binding type for Allegro's "bool". 
  18.     type Bool is private; 
  19.  
  20.     B_FALSE : constant Bool; 
  21.     B_TRUE  : constant Bool;     -- not for comparison, only for passing a value 
  22.  
  23.     function To_Ada( b : Bool ) return Boolean; 
  24.  
  25.     subtype off_t is Long_Integer; 
  26.  
  27.     type time_t is mod 2 ** 32; 
  28.     for time_t'Size use 32; 
  29.  
  30.     ALLEGRO_PI : constant := 3.14159265358979; 
  31.  
  32.     type Ada_Main_Procedure is access procedure; 
  33.  
  34.     -- Sets the main Ada procedure for the application at elaboration time. 
  35.     -- If it has already been set, a Program_Error exception will be raised. 
  36.     procedure Set_Ada_Main( main : Ada_Main_Procedure ); 
  37.  
  38. private 
  39.  
  40.     ada_main : Ada_Main_Procedure; 
  41.  
  42.     -- Allegro defines 'bool' as 1 byte 
  43.     type Bool is mod 2 ** 8; 
  44.     for Bool'Size use 8; 
  45.  
  46.     B_FALSE : constant Bool := 0; 
  47.     B_TRUE  : constant Bool := 1; 
  48.  
  49.     type IntArray is array (Integer range <>) of Integer; 
  50.  
  51.     type Allegro_Event_Source is limited 
  52.         record 
  53.             pad : IntArray(0..31); 
  54.         end record; 
  55.     pragma Convention( C, Allegro_Event_Source ); 
  56.  
  57. end Allegro;