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