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