1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. --  <description> 
  25. --  The Gtk.Orientable.Gtk_Orientable interface is implemented by all widgets 
  26. --  that can be oriented horizontally or vertically. Historically, such widgets 
  27. --  have been realized as subclasses of a common base class (e.g 
  28. --  Gtk.Box.Gtk_Box/Gtk.Box.Gtk_Hbox/Gtk.Box.Gtk_Vbox or 
  29. --  Gtk.Scale.Gtk_Scale/Gtk.Scale.Gtk_Hscale/Gtk.Scale.Gtk_Vscale). 
  30. --  Gtk.Orientable.Gtk_Orientable is more flexible in that it allows the 
  31. --  orientation to be changed at runtime, allowing the widgets to 'flip'. 
  32. -- 
  33. --  Gtk.Orientable.Gtk_Orientable was introduced in GTK+ 2.16. 
  34. -- 
  35. --  </description> 
  36. pragma Ada_2005; 
  37.  
  38. pragma Warnings (Off, "*is already use-visible*"); 
  39. with Glib;       use Glib; 
  40. with Glib.Types; use Glib.Types; 
  41. with Gtk.Enums;  use Gtk.Enums; 
  42.  
  43. package Gtk.Orientable is 
  44.  
  45.    type Gtk_Orientable is new Glib.Types.GType_Interface; 
  46.    Null_Gtk_Orientable : constant Gtk_Orientable; 
  47.  
  48.    ------------------ 
  49.    -- Constructors -- 
  50.    ------------------ 
  51.  
  52.    function Get_Type return Glib.GType; 
  53.    pragma Import (C, Get_Type, "gtk_orientable_get_type"); 
  54.  
  55.    ------------- 
  56.    -- Methods -- 
  57.    ------------- 
  58.  
  59.    function Get_Orientation 
  60.       (Self : Gtk_Orientable) return Gtk.Enums.Gtk_Orientation; 
  61.    pragma Import (C, Get_Orientation, "gtk_orientable_get_orientation"); 
  62.    --  Retrieves the orientation of the Orientable. 
  63.    --  Since: gtk+ 2.16 
  64.  
  65.    procedure Set_Orientation 
  66.       (Self        : Gtk_Orientable; 
  67.        Orientation : Gtk.Enums.Gtk_Orientation); 
  68.    pragma Import (C, Set_Orientation, "gtk_orientable_set_orientation"); 
  69.    --  Sets the orientation of the Orientable. 
  70.    --  Since: gtk+ 2.16 
  71.    --  "orientation": the orientable's new orientation. 
  72.  
  73.    ---------------- 
  74.    -- Properties -- 
  75.    ---------------- 
  76.    --  The following properties are defined for this widget. See 
  77.    --  Glib.Properties for more information on properties) 
  78.  
  79.    Orientation_Property : constant Gtk.Enums.Property_Gtk_Orientation; 
  80.    --  The orientation of the orientable. 
  81.  
  82.    ---------------- 
  83.    -- Interfaces -- 
  84.    ---------------- 
  85.    --  This class implements several interfaces. See Glib.Types 
  86.    -- 
  87.    --  - "Gtk_Orientable" 
  88.  
  89.    function "+" (W : Gtk_Orientable) return Gtk_Orientable; 
  90.    pragma Inline ("+"); 
  91.  
  92. private 
  93.    Orientation_Property : constant Gtk.Enums.Property_Gtk_Orientation := 
  94.      Gtk.Enums.Build ("orientation"); 
  95.  
  96. Null_Gtk_Orientable : constant Gtk_Orientable := 
  97.    Gtk_Orientable (Glib.Types.Null_Interface); 
  98. end Gtk.Orientable;