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. --  A GtkSpinner widget displays an icon-size spinning animation. It is often 
  26. --  used as an alternative to a Gtk.Progress_Bar.Gtk_Progress_Bar for 
  27. --  displaying indefinite activity, instead of actual progress. 
  28. -- 
  29. --  To start the animation, use Gtk.Spinner.Start, to stop it use 
  30. --  Gtk.Spinner.Stop. 
  31. -- 
  32. --  </description> 
  33. --  <group>Ornaments</group> 
  34. pragma Ada_2005; 
  35.  
  36. pragma Warnings (Off, "*is already use-visible*"); 
  37. with Glib;            use Glib; 
  38. with Glib.Properties; use Glib.Properties; 
  39. with Glib.Types;      use Glib.Types; 
  40. with Gtk.Buildable;   use Gtk.Buildable; 
  41. with Gtk.Widget;      use Gtk.Widget; 
  42.  
  43. package Gtk.Spinner is 
  44.  
  45.    type Gtk_Spinner_Record is new Gtk_Widget_Record with null record; 
  46.    type Gtk_Spinner is access all Gtk_Spinner_Record'Class; 
  47.  
  48.    ------------------ 
  49.    -- Constructors -- 
  50.    ------------------ 
  51.  
  52.    procedure Gtk_New (Spinner : out Gtk_Spinner); 
  53.    procedure Initialize (Spinner : not null access Gtk_Spinner_Record'Class); 
  54.    --  Returns a new spinner widget. Not yet started. 
  55.    --  Since: gtk+ 2.20 
  56.  
  57.    function Gtk_Spinner_New return Gtk_Spinner; 
  58.    --  Returns a new spinner widget. Not yet started. 
  59.    --  Since: gtk+ 2.20 
  60.  
  61.    function Get_Type return Glib.GType; 
  62.    pragma Import (C, Get_Type, "gtk_spinner_get_type"); 
  63.  
  64.    ------------- 
  65.    -- Methods -- 
  66.    ------------- 
  67.  
  68.    procedure Start (Spinner : not null access Gtk_Spinner_Record); 
  69.    --  Starts the animation of the spinner. 
  70.    --  Since: gtk+ 2.20 
  71.  
  72.    procedure Stop (Spinner : not null access Gtk_Spinner_Record); 
  73.    --  Stops the animation of the spinner. 
  74.    --  Since: gtk+ 2.20 
  75.  
  76.    ---------------- 
  77.    -- Properties -- 
  78.    ---------------- 
  79.    --  The following properties are defined for this widget. See 
  80.    --  Glib.Properties for more information on properties) 
  81.  
  82.    Active_Property : constant Glib.Properties.Property_Boolean; 
  83.  
  84.    ---------------- 
  85.    -- Interfaces -- 
  86.    ---------------- 
  87.    --  This class implements several interfaces. See Glib.Types 
  88.    -- 
  89.    --  - "Buildable" 
  90.  
  91.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  92.      (Gtk.Buildable.Gtk_Buildable, Gtk_Spinner_Record, Gtk_Spinner); 
  93.    function "+" 
  94.      (Widget : access Gtk_Spinner_Record'Class) 
  95.    return Gtk.Buildable.Gtk_Buildable 
  96.    renames Implements_Gtk_Buildable.To_Interface; 
  97.    function "-" 
  98.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  99.    return Gtk_Spinner 
  100.    renames Implements_Gtk_Buildable.To_Object; 
  101.  
  102. private 
  103.    Active_Property : constant Glib.Properties.Property_Boolean := 
  104.      Glib.Properties.Build ("active"); 
  105. end Gtk.Spinner;