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. --  GtkCellRendererSpinner renders a spinning animation in a cell, very 
  26. --  similar to Gtk.Spinner.Gtk_Spinner. It can often be used as an alternative 
  27. --  to a Gtk.Cell_Renderer_Progress.Gtk_Cell_Renderer_Progress for displaying 
  28. --  indefinite activity, instead of actual progress. 
  29. -- 
  30. --  To start the animation in a cell, set the 
  31. --  Gtk.Cell_Renderer_Spinner.Gtk_Cell_Renderer_Spinner:active property to True 
  32. --  and increment the Gtk.Cell_Renderer_Spinner.Gtk_Cell_Renderer_Spinner:pulse 
  33. --  property at regular intervals. The usual way to set the cell renderer 
  34. --  properties for each cell is to bind them to columns in your tree model 
  35. --  using e.g. gtk_tree_view_column_add_attribute. 
  36. -- 
  37. --  </description> 
  38. pragma Ada_2005; 
  39.  
  40. pragma Warnings (Off, "*is already use-visible*"); 
  41. with Glib;              use Glib; 
  42. with Glib.Properties;   use Glib.Properties; 
  43. with Gtk.Cell_Renderer; use Gtk.Cell_Renderer; 
  44. with Gtk.Enums;         use Gtk.Enums; 
  45.  
  46. package Gtk.Cell_Renderer_Spinner is 
  47.  
  48.    type Gtk_Cell_Renderer_Spinner_Record is new Gtk_Cell_Renderer_Record with null record; 
  49.    type Gtk_Cell_Renderer_Spinner is access all Gtk_Cell_Renderer_Spinner_Record'Class; 
  50.  
  51.    ------------------ 
  52.    -- Constructors -- 
  53.    ------------------ 
  54.  
  55.    procedure Gtk_New (Self : out Gtk_Cell_Renderer_Spinner); 
  56.    procedure Initialize 
  57.       (Self : not null access Gtk_Cell_Renderer_Spinner_Record'Class); 
  58.    --  Returns a new cell renderer which will show a spinner to indicate 
  59.    --  activity. 
  60.    --  Since: gtk+ 2.20 
  61.  
  62.    function Gtk_Cell_Renderer_Spinner_New return Gtk_Cell_Renderer_Spinner; 
  63.    --  Returns a new cell renderer which will show a spinner to indicate 
  64.    --  activity. 
  65.    --  Since: gtk+ 2.20 
  66.  
  67.    function Get_Type return Glib.GType; 
  68.    pragma Import (C, Get_Type, "gtk_cell_renderer_spinner_get_type"); 
  69.  
  70.    ---------------- 
  71.    -- Properties -- 
  72.    ---------------- 
  73.    --  The following properties are defined for this widget. See 
  74.    --  Glib.Properties for more information on properties) 
  75.  
  76.    Active_Property : constant Glib.Properties.Property_Boolean; 
  77.  
  78.    Pulse_Property : constant Glib.Properties.Property_Uint; 
  79.    --  Pulse of the spinner. Increment this value to draw the next frame of 
  80.    --  the spinner animation. Usually, you would update this value in a 
  81.    --  timeout. 
  82.    -- 
  83.    --  By default, the Gtk.Spinner.Gtk_Spinner widget draws one full cycle of 
  84.    --  the animation, consisting of 12 frames, in 750 milliseconds. 
  85.  
  86.    Size_Property : constant Gtk.Enums.Property_Gtk_Icon_Size; 
  87.    --  The Gtk.Enums.Gtk_Icon_Size value that specifies the size of the 
  88.    --  rendered spinner. 
  89.  
  90. private 
  91.    Size_Property : constant Gtk.Enums.Property_Gtk_Icon_Size := 
  92.      Gtk.Enums.Build ("size"); 
  93.    Pulse_Property : constant Glib.Properties.Property_Uint := 
  94.      Glib.Properties.Build ("pulse"); 
  95.    Active_Property : constant Glib.Properties.Property_Boolean := 
  96.      Glib.Properties.Build ("active"); 
  97. end Gtk.Cell_Renderer_Spinner;