1. ------------------------------------------------------------------------------ 
  2. --                  GtkAda - Ada95 binding for Gtk+/Gnome                   -- 
  3. --                                                                          -- 
  4. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  5. --                     Copyright (C) 1998-2014, AdaCore                     -- 
  6. --                                                                          -- 
  7. -- This library is free software;  you can redistribute it and/or modify it -- 
  8. -- under terms of the  GNU General Public License  as published by the Free -- 
  9. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  10. -- version. This library is distributed in the hope that it will be useful, -- 
  11. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  12. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  13. --                                                                          -- 
  14. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  15. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  16. -- version 3.1, as published by the Free Software Foundation.               -- 
  17. --                                                                          -- 
  18. -- You should have received a copy of the GNU General Public License and    -- 
  19. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  20. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  21. -- <http://www.gnu.org/licenses/>.                                          -- 
  22. --                                                                          -- 
  23. ------------------------------------------------------------------------------ 
  24.  
  25. --  <group>Gdk, the low-level API</group> 
  26. with Glib; use Glib; 
  27. with Cairo.Region; use Cairo.Region; 
  28.  
  29. package Gdk.Rectangle is 
  30.  
  31.    subtype Gdk_Rectangle is Cairo_Rectangle_Int; 
  32.  
  33.    type Gdk_Rectangle_Access is access all Gdk_Rectangle; 
  34.    pragma Convention (C, Gdk_Rectangle_Access); 
  35.  
  36.    type Gdk_Rectangle_Array is array (Natural range <>) of Gdk_Rectangle; 
  37.    --  This type is used by Gdk.Region. 
  38.  
  39.    Full_Area : constant Gdk_Rectangle; 
  40.    --  The constant above can be used in Gtk.Widget.Draw when you want to 
  41.    --  redraw the whole widget 
  42.  
  43.    procedure Intersect 
  44.      (Src1      : Gdk_Rectangle; 
  45.       Src2      : Gdk_Rectangle; 
  46.       Dest      : out Gdk_Rectangle; 
  47.       Intersect : out Boolean); 
  48.  
  49.    procedure Union 
  50.      (Src1 : Gdk_Rectangle; 
  51.       Src2 : Gdk_Rectangle; 
  52.       Dest : out Gdk_Rectangle); 
  53.  
  54. private 
  55.  
  56.    Full_Area : constant Gdk_Rectangle := 
  57.      (Gint'First, Gint'First, Gint'Last, Gint'Last); 
  58.  
  59.    pragma Import (C, Union, "gdk_rectangle_union"); 
  60.  
  61. end Gdk.Rectangle;