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. --  <description> 
  26. -- 
  27. --  Pixmaps are off-screen drawables. They can be drawn upon with the standard 
  28. --  drawing primitives, then copied to another drawable (such as a Gdk_Window) 
  29. --  with Gdk.Drawable.Draw_Drawable. The depth of a pixmap is the number of 
  30. --  bits per pixels. Bitmaps are simply pixmaps with a depth of 1. (That is, 
  31. --  they are monochrome bitmaps - each pixel can be either on or off). 
  32. --  See Gdk.Pixmap for more details on pixmap handling. 
  33. -- 
  34. --  </description> 
  35. --  <c_version>1.3.6</c_version> 
  36. --  <group>Gdk, the low-level API</group> 
  37.  
  38. with Glib; use Glib; 
  39.  
  40. with Gdk.Window; 
  41.  
  42. package Gdk.Bitmap is 
  43.  
  44.    subtype Gdk_Bitmap is Gdk.Gdk_Bitmap; 
  45.    --  A black and white image. 
  46.    --  This type is mainly used as a mask when drawing other colored images. 
  47.    --  Each pixel can have two values, 0 or 1. 
  48.  
  49.    Null_Bitmap : constant Gdk_Bitmap; 
  50.  
  51.    procedure Gdk_New 
  52.      (Bitmap : out Gdk_Bitmap; 
  53.       Window : Gdk.Window.Gdk_Window; 
  54.       Width  : Gint; 
  55.       Height : Gint); 
  56.    --  Create a new bitmap with a given size. 
  57.    --  Window is used to determine default values for the new bitmap. 
  58.    --  Can be eventually null in which case the root window is used. 
  59.    --  Width is the width of the new bitmap in pixels. 
  60.    --  Height is the height of the new bitmap in pixels. 
  61.  
  62.    procedure Ref (Bitmap : Gdk_Bitmap); 
  63.    --  Add a reference to a bitmap. 
  64.  
  65.    procedure Unref (Bitmap : Gdk_Bitmap); 
  66.    --  This is the usual way to destroy a bitmap. The memory is freed when 
  67.    --  there is no more reference 
  68.  
  69.    procedure Create_From_Data 
  70.      (Bitmap : out Gdk_Bitmap; 
  71.       Window : Gdk.Window.Gdk_Window; 
  72.       Data   : String; 
  73.       Width  : Gint; 
  74.       Height : Gint); 
  75.    --  Create a bitmap from data in XBM format. 
  76.    --  Window is used to determine default values for the new bitmap, can be 
  77.    --  null in which case the root window is used. 
  78.    --  Data is the XBM data. 
  79.    --  Width is the width of the new bitmap in pixels. 
  80.    --  Height is the height of the new bitmap in pixels. 
  81.  
  82. private 
  83.    Null_Bitmap : constant Gdk_Bitmap := null; 
  84.    pragma Import (C, Ref, "gdk_drawable_ref"); 
  85.    pragma Import (C, Unref, "gdk_drawable_unref"); 
  86. end Gdk.Bitmap;