1. -- 
  2. -- Copyright (c) 2012 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.Bitmaps;                   use Allegro.Bitmaps; 
  10. with Allegro.Fonts;                     use Allegro.Fonts; 
  11. with Allegro.Truecolor;                 use Allegro.Truecolor; 
  12.  
  13. -- Allegro 4.4.2 - Text output 
  14. -- This package is missing: 
  15. -- textprintf_ex, textprintf_centre_ex, textprintf_right_ex 
  16. -- textprintf_justify_ex 
  17. package Allegro.Text_IO is 
  18.  
  19.     function Get_Allegro_404_Char return Integer; 
  20.  
  21.     function Get_Font return A_Font; 
  22.  
  23.     procedure Set_Allegro_404_Char( c : Integer ); 
  24.  
  25.     procedure Set_Font( f : A_Font ); 
  26.  
  27.     function Text_Height( f : not null A_Font ) return Natural; 
  28.  
  29.     function Text_Length( f : not null A_Font; str : String ) return Natural; 
  30.  
  31.     procedure Textout_Ex( bmp   : not null A_Bitmap; 
  32.                           f     : not null A_Font; 
  33.                           s     : String; 
  34.                           x, y  : Integer; 
  35.                           color : Color_Type; 
  36.                           bg    : Integer ); 
  37.  
  38.     procedure Textout_Centre_Ex( bmp   : not null A_Bitmap; 
  39.                                  f     : not null A_Font; 
  40.                                  s     : String; 
  41.                                  x, y  : Integer; 
  42.                                  color : Color_Type; 
  43.                                  bg    : Integer ); 
  44.  
  45.     procedure Textout_Justify_Ex( bmp    : not null A_Bitmap; 
  46.                                   f      : not null A_Font; 
  47.                                   s      : String; 
  48.                                   x1, x2 : Integer; 
  49.                                   y      : Integer; 
  50.                                   diff   : Integer; 
  51.                                   color  : Color_Type; 
  52.                                   bg     : Integer ); 
  53.  
  54.     procedure Textout_Right_Ex( bmp   : not null A_Bitmap; 
  55.                                 f     : not null A_Font; 
  56.                                 s     : String; 
  57.                                 x, y  : Integer; 
  58.                                 color : Color_Type; 
  59.                                 bg    : Integer ); 
  60.  
  61. private 
  62.  
  63.     pragma Import( C, Get_Allegro_404_Char, "get_allegro_404_char" ); 
  64.     pragma Import( C, Get_Font, "get_font" ); 
  65.     pragma Import( C, Set_Allegro_404_Char, "set_allegro_404_char" ); 
  66.     pragma Import( C, Set_Font, "set_font" ); 
  67.     pragma Import( C, Text_Height, "text_height" ); 
  68.  
  69. end Allegro.Text_IO;