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