1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. pragma Ada_2005; 
  25.  
  26. pragma Warnings (Off, "*is already use-visible*"); 
  27. with Pango.Enums; use Pango.Enums; 
  28.  
  29. package Pango.Coverage is 
  30.  
  31.    type Pango_Coverage is new Glib.C_Boxed with null record; 
  32.    Null_Pango_Coverage : constant Pango_Coverage; 
  33.  
  34.    function From_Object (Object : System.Address) return Pango_Coverage; 
  35.    function From_Object_Free (B : access Pango_Coverage'Class) return Pango_Coverage; 
  36.    pragma Inline (From_Object_Free, From_Object); 
  37.  
  38.    ------------- 
  39.    -- Methods -- 
  40.    ------------- 
  41.  
  42.    function Copy (Self : Pango_Coverage) return Pango_Coverage; 
  43.    --  Copy an existing Pango.Coverage.Pango_Coverage. (This function may now 
  44.    --  be unnecessary since we refcount the structure. File a bug if you use 
  45.    --  it.) 
  46.  
  47.    function Get 
  48.       (Self  : Pango_Coverage; 
  49.        Index : Gint) return Pango.Enums.Coverage_Level; 
  50.    --  Determine whether a particular index is covered by Coverage 
  51.    --  "index_": the index to check 
  52.  
  53.    procedure Max (Self : Pango_Coverage; Other : Pango_Coverage); 
  54.    --  Set the coverage for each index in Coverage to be the max (better) 
  55.    --  value of the current coverage for the index and the coverage for the 
  56.    --  corresponding index in Other. 
  57.    --  "other": another Pango.Coverage.Pango_Coverage 
  58.  
  59.    function Ref (Self : Pango_Coverage) return Pango_Coverage; 
  60.    --  Increase the reference count on the Pango.Coverage.Pango_Coverage by 
  61.    --  one 
  62.  
  63.    procedure Set 
  64.       (Self  : Pango_Coverage; 
  65.        Index : Gint; 
  66.        Level : Pango.Enums.Coverage_Level); 
  67.    --  Modify a particular index within Coverage 
  68.    --  "index_": the index to modify 
  69.    --  "level": the new level for Index_ 
  70.  
  71.    procedure Unref (Self : Pango_Coverage); 
  72.    --  Decrease the reference count on the Pango.Coverage.Pango_Coverage by 
  73.    --  one. If the result is zero, free the coverage and all associated memory. 
  74.  
  75.    --------------- 
  76.    -- Functions -- 
  77.    --------------- 
  78.  
  79.    function Pango_New return Pango_Coverage; 
  80.    --  Create a new Pango.Coverage.Pango_Coverage 
  81.  
  82. private 
  83.  
  84.    Null_Pango_Coverage : constant Pango_Coverage := (Glib.C_Boxed with null record); 
  85.  
  86. end Pango.Coverage;