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. --  Gtk.Volume_Button.Gtk_Volume_Button is a subclass of 
  26. --  Gtk.Scale_Button.Gtk_Scale_Button that has been tailored for use as a 
  27. --  volume control widget with suitable icons, tooltips and accessible labels. 
  28. -- 
  29. --  </description> 
  30. pragma Ada_2005; 
  31.  
  32. pragma Warnings (Off, "*is already use-visible*"); 
  33. with Glib;             use Glib; 
  34. with Glib.Properties;  use Glib.Properties; 
  35. with Glib.Types;       use Glib.Types; 
  36. with Glib.Variant;     use Glib.Variant; 
  37. with Gtk.Action;       use Gtk.Action; 
  38. with Gtk.Actionable;   use Gtk.Actionable; 
  39. with Gtk.Activatable;  use Gtk.Activatable; 
  40. with Gtk.Buildable;    use Gtk.Buildable; 
  41. with Gtk.Enums;        use Gtk.Enums; 
  42. with Gtk.Orientable;   use Gtk.Orientable; 
  43. with Gtk.Scale_Button; use Gtk.Scale_Button; 
  44.  
  45. package Gtk.Volume_Button is 
  46.  
  47.    type Gtk_Volume_Button_Record is new Gtk_Scale_Button_Record with null record; 
  48.    type Gtk_Volume_Button is access all Gtk_Volume_Button_Record'Class; 
  49.  
  50.    ------------------ 
  51.    -- Constructors -- 
  52.    ------------------ 
  53.  
  54.    procedure Gtk_New (Widget : out Gtk_Volume_Button); 
  55.    procedure Initialize 
  56.       (Widget : not null access Gtk_Volume_Button_Record'Class); 
  57.    --  Creates a Gtk.Volume_Button.Gtk_Volume_Button, with a range between 0.0 
  58.    --  and 1.0, with a stepping of 0.02. Volume values can be obtained and 
  59.    --  modified using the functions from Gtk.Scale_Button.Gtk_Scale_Button. 
  60.    --  Since: gtk+ 2.12 
  61.  
  62.    function Gtk_Volume_Button_New return Gtk_Volume_Button; 
  63.    --  Creates a Gtk.Volume_Button.Gtk_Volume_Button, with a range between 0.0 
  64.    --  and 1.0, with a stepping of 0.02. Volume values can be obtained and 
  65.    --  modified using the functions from Gtk.Scale_Button.Gtk_Scale_Button. 
  66.    --  Since: gtk+ 2.12 
  67.  
  68.    function Get_Type return Glib.GType; 
  69.    pragma Import (C, Get_Type, "gtk_volume_button_get_type"); 
  70.  
  71.    --------------------------------------------- 
  72.    -- Inherited subprograms (from interfaces) -- 
  73.    --------------------------------------------- 
  74.    --  Methods inherited from the Buildable interface are not duplicated here 
  75.    --  since they are meant to be used by tools, mostly. If you need to call 
  76.    --  them, use an explicit cast through the "-" operator below. 
  77.  
  78.    function Get_Action_Name 
  79.       (Self : not null access Gtk_Volume_Button_Record) return UTF8_String; 
  80.  
  81.    procedure Set_Action_Name 
  82.       (Self        : not null access Gtk_Volume_Button_Record; 
  83.        Action_Name : UTF8_String); 
  84.  
  85.    function Get_Action_Target_Value 
  86.       (Self : not null access Gtk_Volume_Button_Record) 
  87.        return Glib.Variant.Gvariant; 
  88.  
  89.    procedure Set_Action_Target_Value 
  90.       (Self         : not null access Gtk_Volume_Button_Record; 
  91.        Target_Value : Glib.Variant.Gvariant); 
  92.  
  93.    procedure Set_Detailed_Action_Name 
  94.       (Self                 : not null access Gtk_Volume_Button_Record; 
  95.        Detailed_Action_Name : UTF8_String); 
  96.  
  97.    procedure Do_Set_Related_Action 
  98.       (Self   : not null access Gtk_Volume_Button_Record; 
  99.        Action : not null access Gtk.Action.Gtk_Action_Record'Class); 
  100.  
  101.    function Get_Related_Action 
  102.       (Self : not null access Gtk_Volume_Button_Record) 
  103.        return Gtk.Action.Gtk_Action; 
  104.  
  105.    procedure Set_Related_Action 
  106.       (Self   : not null access Gtk_Volume_Button_Record; 
  107.        Action : not null access Gtk.Action.Gtk_Action_Record'Class); 
  108.  
  109.    function Get_Use_Action_Appearance 
  110.       (Self : not null access Gtk_Volume_Button_Record) return Boolean; 
  111.  
  112.    procedure Set_Use_Action_Appearance 
  113.       (Self           : not null access Gtk_Volume_Button_Record; 
  114.        Use_Appearance : Boolean); 
  115.  
  116.    procedure Sync_Action_Properties 
  117.       (Self   : not null access Gtk_Volume_Button_Record; 
  118.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  119.  
  120.    function Get_Orientation 
  121.       (Self : not null access Gtk_Volume_Button_Record) 
  122.        return Gtk.Enums.Gtk_Orientation; 
  123.  
  124.    procedure Set_Orientation 
  125.       (Self        : not null access Gtk_Volume_Button_Record; 
  126.        Orientation : Gtk.Enums.Gtk_Orientation); 
  127.  
  128.    ---------------- 
  129.    -- Properties -- 
  130.    ---------------- 
  131.    --  The following properties are defined for this widget. See 
  132.    --  Glib.Properties for more information on properties) 
  133.  
  134.    Use_Symbolic_Property : constant Glib.Properties.Property_Boolean; 
  135.    --  Whether to use symbolic icons as the icons. Note that if the symbolic 
  136.    --  icons are not available in your installed theme, then the normal 
  137.    --  (potentially colorful) icons will be used. 
  138.  
  139.    ---------------- 
  140.    -- Interfaces -- 
  141.    ---------------- 
  142.    --  This class implements several interfaces. See Glib.Types 
  143.    -- 
  144.    --  - "Actionable" 
  145.    -- 
  146.    --  - "Activatable" 
  147.    -- 
  148.    --  - "Buildable" 
  149.    -- 
  150.    --  - "Orientable" 
  151.  
  152.    package Implements_Gtk_Actionable is new Glib.Types.Implements 
  153.      (Gtk.Actionable.Gtk_Actionable, Gtk_Volume_Button_Record, Gtk_Volume_Button); 
  154.    function "+" 
  155.      (Widget : access Gtk_Volume_Button_Record'Class) 
  156.    return Gtk.Actionable.Gtk_Actionable 
  157.    renames Implements_Gtk_Actionable.To_Interface; 
  158.    function "-" 
  159.      (Interf : Gtk.Actionable.Gtk_Actionable) 
  160.    return Gtk_Volume_Button 
  161.    renames Implements_Gtk_Actionable.To_Object; 
  162.  
  163.    package Implements_Gtk_Activatable is new Glib.Types.Implements 
  164.      (Gtk.Activatable.Gtk_Activatable, Gtk_Volume_Button_Record, Gtk_Volume_Button); 
  165.    function "+" 
  166.      (Widget : access Gtk_Volume_Button_Record'Class) 
  167.    return Gtk.Activatable.Gtk_Activatable 
  168.    renames Implements_Gtk_Activatable.To_Interface; 
  169.    function "-" 
  170.      (Interf : Gtk.Activatable.Gtk_Activatable) 
  171.    return Gtk_Volume_Button 
  172.    renames Implements_Gtk_Activatable.To_Object; 
  173.  
  174.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  175.      (Gtk.Buildable.Gtk_Buildable, Gtk_Volume_Button_Record, Gtk_Volume_Button); 
  176.    function "+" 
  177.      (Widget : access Gtk_Volume_Button_Record'Class) 
  178.    return Gtk.Buildable.Gtk_Buildable 
  179.    renames Implements_Gtk_Buildable.To_Interface; 
  180.    function "-" 
  181.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  182.    return Gtk_Volume_Button 
  183.    renames Implements_Gtk_Buildable.To_Object; 
  184.  
  185.    package Implements_Gtk_Orientable is new Glib.Types.Implements 
  186.      (Gtk.Orientable.Gtk_Orientable, Gtk_Volume_Button_Record, Gtk_Volume_Button); 
  187.    function "+" 
  188.      (Widget : access Gtk_Volume_Button_Record'Class) 
  189.    return Gtk.Orientable.Gtk_Orientable 
  190.    renames Implements_Gtk_Orientable.To_Interface; 
  191.    function "-" 
  192.      (Interf : Gtk.Orientable.Gtk_Orientable) 
  193.    return Gtk_Volume_Button 
  194.    renames Implements_Gtk_Orientable.To_Object; 
  195.  
  196. private 
  197.    Use_Symbolic_Property : constant Glib.Properties.Property_Boolean := 
  198.      Glib.Properties.Build ("use-symbolic"); 
  199. end Gtk.Volume_Button;