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. with Allegro.Configuration;             use Allegro.Configuration; 
  10. with Allegro.Paths;                     use Allegro.Paths; 
  11. with Interfaces;                        use Interfaces; 
  12.  
  13. -- Allegro 5.0.9 - System routines 
  14. -- Missing: 
  15. --   al_register_assert_handler 
  16. package Allegro.System is 
  17.  
  18.     function Al_Get_Allegro_Version return Unsigned_32; 
  19.     pragma Import( C, Al_Get_Allegro_Version, "al_get_allegro_version" ); 
  20.  
  21.     -- AlAda only: Returns the string format of a standard Allegro version, 
  22.     -- following the format "major.minor.patch". The same method of packing a 
  23.     -- version number into 32 bits used by Al_Get_Allegro_Version is also used 
  24.     -- by some Allegro addons. 
  25.     function Al_Version_To_String( version : Unsigned_32 ) return String; 
  26.  
  27.     -- AlAda only: Returns the Allegro 5 copyright string 
  28.     function Al_Copyright return String; 
  29.  
  30.     function Al_Get_App_Name return String; 
  31.  
  32.     function Al_Get_Org_Name return String; 
  33.  
  34.     type System_Path is private; 
  35.     ALLEGRO_RESOURCES_PATH      : constant System_Path; 
  36.     ALLEGRO_TEMP_PATH           : constant System_Path; 
  37.     ALLEGRO_USER_DATA_PATH      : constant System_Path; 
  38.     ALLEGRO_USER_HOME_PATH      : constant System_Path; 
  39.     ALLEGRO_USER_SETTINGS_PATH  : constant System_Path; 
  40.     ALLEGRO_USER_DOCUMENTS_PATH : constant System_Path; 
  41.     ALLEGRO_EXENAME_PATH        : constant System_Path; 
  42.  
  43.     function Al_Get_Standard_Path( id : System_Path ) return A_Allegro_Path; 
  44.     pragma Import( C, Al_Get_Standard_Path, "al_get_standard_path" ); 
  45.  
  46.     function Al_Get_System_Config return A_Allegro_Config; 
  47.     pragma Import( C, Al_Get_System_Config, "al_get_system_config" ); 
  48.  
  49.     procedure Al_Set_Exe_Name( path : String ); 
  50.  
  51.     procedure Al_Set_Org_Name( org_name : String ); 
  52.  
  53.     procedure Al_Set_App_Name( app_name : String ); 
  54.  
  55.     function Al_Initialize return Boolean; 
  56.  
  57.     procedure Al_Uninstall_System; 
  58.     pragma Import( C, Al_Uninstall_System, "al_uninstall_system" ); 
  59.  
  60.     function Al_Is_System_Installed return Boolean; 
  61.  
  62. private 
  63.  
  64.     type System_Path is new Integer; 
  65.     ALLEGRO_RESOURCES_PATH      : constant System_Path := 0; 
  66.     ALLEGRO_TEMP_PATH           : constant System_Path := 1; 
  67.     ALLEGRO_USER_DATA_PATH      : constant System_Path := 2; 
  68.     ALLEGRO_USER_HOME_PATH      : constant System_Path := 3; 
  69.     ALLEGRO_USER_SETTINGS_PATH  : constant System_Path := 4; 
  70.     ALLEGRO_USER_DOCUMENTS_PATH : constant System_Path := 5; 
  71.     ALLEGRO_EXENAME_PATH        : constant System_Path := 6; 
  72.  
  73. end Allegro.System;