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. --  Base class for containers that have only one child. This widget can not be 
  27. --  instantiated directly. 
  28. -- 
  29. --  </description> 
  30. --  <group>Abstract base classes</group> 
  31.  
  32. pragma Warnings (Off, "*is already use-visible*"); 
  33. with Glib;          use Glib; 
  34. with Glib.Types;    use Glib.Types; 
  35. with Gtk.Buildable; use Gtk.Buildable; 
  36. with Gtk.Container; use Gtk.Container; 
  37. with Gtk.Widget;    use Gtk.Widget; 
  38.  
  39. package Gtk.Bin is 
  40.  
  41.    type Gtk_Bin_Record is new Gtk_Container_Record with null record; 
  42.    type Gtk_Bin is access all Gtk_Bin_Record'Class; 
  43.  
  44.    ------------------ 
  45.    -- Constructors -- 
  46.    ------------------ 
  47.  
  48.    function Get_Type return Glib.GType; 
  49.    pragma Import (C, Get_Type, "gtk_bin_get_type"); 
  50.  
  51.    ------------- 
  52.    -- Methods -- 
  53.    ------------- 
  54.  
  55.    function Get_Child 
  56.       (Bin : access Gtk_Bin_Record) return Gtk.Widget.Gtk_Widget; 
  57.    --  Gets the child of the Gtk.Bin.Gtk_Bin, or null if the bin contains no 
  58.    --  child widget. The returned widget does not have a reference added, so 
  59.    --  you do not need to unref it. 
  60.    --  Returns pointer to child of the Gtk.Bin.Gtk_Bin 
  61.  
  62.    ---------------- 
  63.    -- Interfaces -- 
  64.    ---------------- 
  65.    --  This class implements several interfaces. See Glib.Types 
  66.    -- 
  67.    --  - "Buildable" 
  68.  
  69.    package Implements_Buildable is new Glib.Types.Implements 
  70.      (Gtk.Buildable.Gtk_Buildable, Gtk_Bin_Record, Gtk_Bin); 
  71.    function "+" 
  72.      (Widget : access Gtk_Bin_Record'Class) 
  73.    return Gtk.Buildable.Gtk_Buildable 
  74.    renames Implements_Buildable.To_Interface; 
  75.    function "-" 
  76.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  77.    return Gtk_Bin 
  78.    renames Implements_Buildable.To_Object; 
  79.  
  80. end Gtk.Bin;