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