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. --  Gtk_Volume_Button is a subclass of Gtk_Scale_Button that has been tailored 
  27. --  for use as a volume control widget with suitable icons, tooltips and 
  28. --  accessible labels. 
  29. -- 
  30. --  </description> 
  31.  
  32. pragma Warnings (Off, "*is already use-visible*"); 
  33. with Glib;             use Glib; 
  34. with Glib.Types;       use Glib.Types; 
  35. with Gtk.Action;       use Gtk.Action; 
  36. with Gtk.Activatable;  use Gtk.Activatable; 
  37. with Gtk.Buildable;    use Gtk.Buildable; 
  38. with Gtk.Enums;        use Gtk.Enums; 
  39. with Gtk.Orientable;   use Gtk.Orientable; 
  40. with Gtk.Scale_Button; use Gtk.Scale_Button; 
  41. with Gtk.Widget;       use Gtk.Widget; 
  42.  
  43. package Gtk.Volume_Button is 
  44.  
  45.    type Gtk_Volume_Button_Record is new Gtk_Scale_Button_Record with null record; 
  46.    type Gtk_Volume_Button is access all Gtk_Volume_Button_Record'Class; 
  47.  
  48.    ------------------ 
  49.    -- Constructors -- 
  50.    ------------------ 
  51.  
  52.    procedure Gtk_New (Widget : out Gtk_Volume_Button); 
  53.    procedure Initialize (Widget : access Gtk_Volume_Button_Record'Class); 
  54.    --  Creates a Gtk.Volume_Button.Gtk_Volume_Button, with a range between 0.0 
  55.    --  and 1.0, with a stepping of 0.02. Volume values can be obtained and 
  56.    --  modified using the functions from Gtk.Scale_Button.Gtk_Scale_Button. 
  57.    --  Since: gtk+ 2.12 
  58.  
  59.    function Get_Type return Glib.GType; 
  60.    pragma Import (C, Get_Type, "gtk_volume_button_get_type"); 
  61.  
  62.    --------------------- 
  63.    -- Interfaces_Impl -- 
  64.    --------------------- 
  65.  
  66.    procedure Do_Set_Related_Action 
  67.       (Self   : access Gtk_Volume_Button_Record; 
  68.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  69.  
  70.    function Get_Related_Action 
  71.       (Self : access Gtk_Volume_Button_Record) return Gtk.Action.Gtk_Action; 
  72.    procedure Set_Related_Action 
  73.       (Self   : access Gtk_Volume_Button_Record; 
  74.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  75.  
  76.    function Get_Use_Action_Appearance 
  77.       (Self : access Gtk_Volume_Button_Record) return Boolean; 
  78.    procedure Set_Use_Action_Appearance 
  79.       (Self           : access Gtk_Volume_Button_Record; 
  80.        Use_Appearance : Boolean); 
  81.  
  82.    procedure Sync_Action_Properties 
  83.       (Self   : access Gtk_Volume_Button_Record; 
  84.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  85.  
  86.    function Get_Orientation 
  87.       (Self : access Gtk_Volume_Button_Record) 
  88.        return Gtk.Enums.Gtk_Orientation; 
  89.    procedure Set_Orientation 
  90.       (Self        : access Gtk_Volume_Button_Record; 
  91.        Orientation : Gtk.Enums.Gtk_Orientation); 
  92.  
  93.    ---------------- 
  94.    -- Interfaces -- 
  95.    ---------------- 
  96.    --  This class implements several interfaces. See Glib.Types 
  97.    -- 
  98.    --  - "Activatable" 
  99.    -- 
  100.    --  - "Buildable" 
  101.    -- 
  102.    --  - "Orientable" 
  103.  
  104.    package Implements_Activatable is new Glib.Types.Implements 
  105.      (Gtk.Activatable.Gtk_Activatable, Gtk_Volume_Button_Record, Gtk_Volume_Button); 
  106.    function "+" 
  107.      (Widget : access Gtk_Volume_Button_Record'Class) 
  108.    return Gtk.Activatable.Gtk_Activatable 
  109.    renames Implements_Activatable.To_Interface; 
  110.    function "-" 
  111.      (Interf : Gtk.Activatable.Gtk_Activatable) 
  112.    return Gtk_Volume_Button 
  113.    renames Implements_Activatable.To_Object; 
  114.  
  115.    package Implements_Buildable is new Glib.Types.Implements 
  116.      (Gtk.Buildable.Gtk_Buildable, Gtk_Volume_Button_Record, Gtk_Volume_Button); 
  117.    function "+" 
  118.      (Widget : access Gtk_Volume_Button_Record'Class) 
  119.    return Gtk.Buildable.Gtk_Buildable 
  120.    renames Implements_Buildable.To_Interface; 
  121.    function "-" 
  122.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  123.    return Gtk_Volume_Button 
  124.    renames Implements_Buildable.To_Object; 
  125.  
  126.    package Implements_Orientable is new Glib.Types.Implements 
  127.      (Gtk.Orientable.Gtk_Orientable, Gtk_Volume_Button_Record, Gtk_Volume_Button); 
  128.    function "+" 
  129.      (Widget : access Gtk_Volume_Button_Record'Class) 
  130.    return Gtk.Orientable.Gtk_Orientable 
  131.    renames Implements_Orientable.To_Interface; 
  132.    function "-" 
  133.      (Interf : Gtk.Orientable.Gtk_Orientable) 
  134.    return Gtk_Volume_Button 
  135.    renames Implements_Orientable.To_Object; 
  136.  
  137. end Gtk.Volume_Button;