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. --  <description> 
  26. -- 
  27. -- 
  28. --  </description> 
  29. --  <group>Obsolescent widgets</group> 
  30.  
  31. pragma Warnings (Off, "*is already use-visible*"); 
  32. with Gdk.Bitmap;    use Gdk.Bitmap; 
  33. with Gdk.Pixmap;    use Gdk.Pixmap; 
  34. with Glib;          use Glib; 
  35. with Glib.Types;    use Glib.Types; 
  36. with Gtk.Buildable; use Gtk.Buildable; 
  37. with Gtk.Misc;      use Gtk.Misc; 
  38. with Gtk.Widget;    use Gtk.Widget; 
  39. with Gtk.Window;    use Gtk.Window; 
  40. with Gtkada.Types;  use Gtkada.Types; 
  41.  
  42. package Gtk.Pixmap is 
  43.  
  44.    type Gtk_Pixmap_Record is new Gtk_Misc_Record with null record; 
  45.    type Gtk_Pixmap is access all Gtk_Pixmap_Record'Class; 
  46.  
  47.    ------------------ 
  48.    -- Constructors -- 
  49.    ------------------ 
  50.  
  51.    procedure Gtk_New 
  52.       (Pixmap : out Gtk_Pixmap; 
  53.        Val    : Gdk.Pixmap.Gdk_Pixmap; 
  54.        Mask   : Gdk.Bitmap.Gdk_Bitmap); 
  55.    procedure Initialize 
  56.       (Pixmap : access Gtk_Pixmap_Record'Class; 
  57.        Val    : Gdk.Pixmap.Gdk_Pixmap; 
  58.        Mask   : Gdk.Bitmap.Gdk_Bitmap); 
  59.  
  60.    function Get_Type return Glib.GType; 
  61.    pragma Import (C, Get_Type, "gtk_pixmap_get_type"); 
  62.  
  63.    ------------- 
  64.    -- Methods -- 
  65.    ------------- 
  66.  
  67.    procedure Get 
  68.       (Pixmap : access Gtk_Pixmap_Record; 
  69.        Val    : out Gdk.Pixmap.Gdk_Pixmap; 
  70.        Mask   : out Gdk.Bitmap.Gdk_Bitmap); 
  71.  
  72.    procedure Set 
  73.       (Pixmap : access Gtk_Pixmap_Record; 
  74.        Val    : Gdk.Pixmap.Gdk_Pixmap; 
  75.        Mask   : Gdk.Bitmap.Gdk_Bitmap); 
  76.  
  77.    procedure Set_Build_Insensitive 
  78.       (Pixmap : access Gtk_Pixmap_Record; 
  79.        Build  : Boolean); 
  80.    --  Whether the pixmap should be grayed out, as is done for insensitive 
  81.    --  widgets that do not accept user interaction 
  82.  
  83.    ---------------------- 
  84.    -- GtkAda additions -- 
  85.    ---------------------- 
  86.  
  87.    function Create_Pixmap 
  88.      (Filename : String; 
  89.       Window   : access Gtk.Window.Gtk_Window_Record'Class) return Gtk_Pixmap; 
  90.    --  Create a pixmap given a window and a filename 
  91.  
  92.    function Create_Pixmap 
  93.      (Data     : Gtkada.Types.Chars_Ptr_Array; 
  94.       Window   : access Gtk.Window.Gtk_Window_Record'Class) return Gtk_Pixmap; 
  95.    --  Create a pixmap given a window and a buffer. 
  96.  
  97.    ---------------- 
  98.    -- Interfaces -- 
  99.    ---------------- 
  100.    --  This class implements several interfaces. See Glib.Types 
  101.    -- 
  102.    --  - "Buildable" 
  103.  
  104.    package Implements_Buildable is new Glib.Types.Implements 
  105.      (Gtk.Buildable.Gtk_Buildable, Gtk_Pixmap_Record, Gtk_Pixmap); 
  106.    function "+" 
  107.      (Widget : access Gtk_Pixmap_Record'Class) 
  108.    return Gtk.Buildable.Gtk_Buildable 
  109.    renames Implements_Buildable.To_Interface; 
  110.    function "-" 
  111.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  112.    return Gtk_Pixmap 
  113.    renames Implements_Buildable.To_Object; 
  114.  
  115. end Gtk.Pixmap;