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-2002 ACT-Europe                 -- 
  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. --  The Gdk_Image type represents an area for drawing graphics. 
  26. --  It has now been superceded to a large extent by the much more flexible 
  27. --  Gdk.RGB functions. 
  28. -- 
  29. --  To create an empty Gdk_Image use Gdk_New. To create an image from part of 
  30. --  a Gdk_Window, use Get. 
  31. -- 
  32. --  To draw a Gdk_Image in a Gdk_Window or Gdk_Pixmap use 
  33. --  Gdk.Drawable.Draw_Image. 
  34.  
  35. --  <c_version>1.3.6</c_version> 
  36. --  <group>Gdk, the low-level API</group> 
  37.  
  38. with Glib; use Glib; 
  39.  
  40. package Gdk.Image is 
  41.  
  42.    subtype Gdk_Image is Gdk.Gdk_Image; 
  43.    Null_Image : constant Gdk_Image; 
  44.  
  45.    type Gdk_Image_Type is (Image_Normal, Image_Shared, Image_Fastest); 
  46.    pragma Convention (C, Gdk_Image_Type); 
  47.  
  48.    procedure Gdk_New 
  49.      (Image      : out Gdk_Image; 
  50.       Image_Type : Gdk_Image_Type; 
  51.       Visual     : Gdk.Gdk_Visual; 
  52.       Width      : Gint; 
  53.       Height     : Gint); 
  54.  
  55.    function Get_Type return Glib.GType; 
  56.    --  Return the internal value associated with a Gdk_Image. 
  57.  
  58.    procedure Get 
  59.      (Image    : out Gdk_Image; 
  60.       Drawable : Gdk.Gdk_Drawable; 
  61.       X        : Gint; 
  62.       Y        : Gint; 
  63.       Width    : Gint; 
  64.       Height   : Gint); 
  65.  
  66.    procedure Ref (Image : Gdk_Image); 
  67.    --  Increment the reference counting for the image. 
  68.  
  69.    procedure Unref (Image : Gdk_Image); 
  70.    --  Decrement the reference counting for the image. 
  71.    --  When this reaches 0, the image is destroyed. 
  72.  
  73.    procedure Destroy (Image : Gdk_Image); 
  74.    --  Deprecated. Use Unref instead. 
  75.  
  76.    procedure Put_Pixel 
  77.      (Image : Gdk_Image; 
  78.       X     : Gint; 
  79.       Y     : Gint; 
  80.       Pixel : Guint32); 
  81.  
  82.    function Get_Pixel (Image : Gdk_Image; X : Gint; Y : Gint) return Guint32; 
  83.  
  84. private 
  85.    Null_Image : constant Gdk_Image := null; 
  86.    pragma Import (C, Get_Type, "gdk_image_get_type"); 
  87.    pragma Import (C, Destroy, "gdk_image_unref"); 
  88.    pragma Import (C, Ref, "gdk_image_ref"); 
  89.    pragma Import (C, Unref, "gdk_image_unref"); 
  90.    pragma Import (C, Get_Pixel, "gdk_image_get_pixel"); 
  91.    pragma Import (C, Put_Pixel, "gdk_image_put_pixel"); 
  92. end Gdk.Image;