1. ----------------------------------------------------------------------- 
  2. --               GtkAda - Ada95 binding for Gtk+/Gnome               -- 
  3. --                                                                   -- 
  4. --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   -- 
  5. --                Copyright (C) 2000-2011, AdaCore                   -- 
  6. --                                                                   -- 
  7. -- This library is free software; you can redistribute it and/or     -- 
  8. -- modify it under the terms of the GNU General Public               -- 
  9. -- License as published by the Free Software Foundation; either      -- 
  10. -- version 2 of the License, or (at your option) any later version.  -- 
  11. --                                                                   -- 
  12. -- This library is distributed in the hope that it will be useful,   -- 
  13. -- but WITHOUT ANY WARRANTY; without even the implied warranty of    -- 
  14. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -- 
  15. -- General Public License for more details.                          -- 
  16. --                                                                   -- 
  17. -- You should have received a copy of the GNU General Public         -- 
  18. -- License along with this library; if not, write to the             -- 
  19. -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      -- 
  20. -- Boston, MA 02111-1307, USA.                                       -- 
  21. --                                                                   -- 
  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;