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