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-2006 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. --  This package is deprecated. It now only acts as an abstract base class 
  27. --  for other widgets. 
  28. --  </description> 
  29. --  <c_version>2.8.17</c_version> 
  30. --  <group>Obsolescent widgets</group> 
  31.  
  32. with Gtk.Adjustment; 
  33. with Gtk.Widget; 
  34. with Glib.Properties; 
  35.  
  36. package Gtk.Progress is 
  37.    pragma Obsolescent; --  Gtk.Progress 
  38.  
  39.    type Gtk_Progress_Record is new Gtk.Widget.Gtk_Widget_Record with private; 
  40.    type Gtk_Progress is access all Gtk_Progress_Record'Class; 
  41.  
  42.    function Get_Type return Glib.GType; 
  43.    --  Return the internal value associated with a Gtk_Progress. 
  44.  
  45.    function Get_Current_Percentage 
  46.      (Progress : access Gtk_Progress_Record) return Gdouble; 
  47.  
  48.    function Get_Current_Text 
  49.      (Progress : access Gtk_Progress_Record) return UTF8_String; 
  50.  
  51.    function Get_Percentage_From_Value 
  52.      (Progress : access Gtk_Progress_Record; 
  53.       Value    : Gdouble) return Gdouble; 
  54.  
  55.    function Get_Text_From_Value 
  56.      (Progress : access Gtk_Progress_Record; 
  57.       Value    : Gdouble) return UTF8_String; 
  58.  
  59.    function Get_Value (Progress : access Gtk_Progress_Record) return Gdouble; 
  60.  
  61.    function Get_Adjustment 
  62.      (Widget : access Gtk_Progress_Record) 
  63.       return Gtk.Adjustment.Gtk_Adjustment; 
  64.  
  65.    procedure Configure 
  66.      (Progress : access Gtk_Progress_Record; 
  67.       Value    : Gdouble; 
  68.       Min      : Gdouble; 
  69.       Max      : Gdouble); 
  70.  
  71.    procedure Set_Activity_Mode 
  72.      (Progress      : access Gtk_Progress_Record; 
  73.       Activity_Mode : Boolean); 
  74.  
  75.    function Get_Activity_Mode 
  76.      (Progress : access Gtk_Progress_Record) return Boolean; 
  77.  
  78.    procedure Set_Adjustment 
  79.      (Progress   : access Gtk_Progress_Record; 
  80.       Adjustment : Gtk.Adjustment.Gtk_Adjustment); 
  81.  
  82.    procedure Set_Format_String 
  83.      (Progress : access Gtk_Progress_Record; 
  84.       Format   : UTF8_String); 
  85.  
  86.    procedure Set_Percentage 
  87.      (Progress   : access Gtk_Progress_Record; 
  88.       Percentage : Gdouble); 
  89.  
  90.    procedure Set_Show_Text 
  91.      (Progress  : access Gtk_Progress_Record; 
  92.       Show_Text : Boolean); 
  93.  
  94.    procedure Set_Text_Alignment 
  95.      (Progress : access Gtk_Progress_Record; 
  96.       X_Align  : Gfloat; 
  97.       Y_Align  : Gfloat); 
  98.  
  99.    procedure Set_Value 
  100.      (Progress : access Gtk_Progress_Record; 
  101.       Value    : Gdouble); 
  102.  
  103.    ---------------- 
  104.    -- Properties -- 
  105.    ---------------- 
  106.  
  107.    --  <properties> 
  108.    --  The following properties are defined for this widget. See 
  109.    --  Glib.Properties for more information on properties. 
  110.    -- 
  111.    --  - Name:  Activity_Mode_Property 
  112.    --    Type:  Boolean 
  113.    --    Flags: read-write 
  114.    --    Descr: If true the Gtk_Progress is in activity mode, meaning that 
  115.    --           it signals something is happening, but not how much of the 
  116.    --           activity is finished. This is used when you're doing something 
  117.    --           that you don't know how long it will take. 
  118.    --    See also: Set_Activity_Mode and Get_Activity_Mode 
  119.    -- 
  120.    --  - Name:  Show_Text_Property 
  121.    --    Type:  Boolean 
  122.    --    Flags: read-write 
  123.    --    Descr: Whether the progress is shown as text 
  124.    --    See also: Set_Show_Text 
  125.    -- 
  126.    --  - Name:  Text_Xalign_Property 
  127.    --    Type:  Gfloat 
  128.    --    Flags: read-write 
  129.    --    Descr: A number between 0.0 and 1.0 specifying the horizontal 
  130.    --           alignment of the text in the progress widget 
  131.    --    See also: Set_Set_Text_Alignment 
  132.    -- 
  133.    --  - Name:  Text_Yalign_Property 
  134.    --    Type:  Gfloat 
  135.    --    Flags: read-write 
  136.    --    Descr: A number between 0.0 and 1.0 specifying the vertical alignment 
  137.    --           of the text in the progress widget 
  138.    --    See also: Set_Set_Text_Alignment 
  139.    -- 
  140.    --  </properties> 
  141.  
  142.    Activity_Mode_Property : constant Glib.Properties.Property_Boolean; 
  143.    Show_Text_Property     : constant Glib.Properties.Property_Boolean; 
  144.    Text_Xalign_Property   : constant Glib.Properties.Property_Float; 
  145.    Text_Yalign_Property   : constant Glib.Properties.Property_Float; 
  146.  
  147. private 
  148.    type Gtk_Progress_Record is new Gtk.Widget.Gtk_Widget_Record 
  149.      with null record; 
  150.  
  151.    Activity_Mode_Property : constant Glib.Properties.Property_Boolean := 
  152.      Glib.Properties.Build ("activity_mode"); 
  153.    Show_Text_Property     : constant Glib.Properties.Property_Boolean := 
  154.      Glib.Properties.Build ("show_text"); 
  155.    Text_Xalign_Property   : constant Glib.Properties.Property_Float := 
  156.      Glib.Properties.Build ("text_xalign"); 
  157.    Text_Yalign_Property   : constant Glib.Properties.Property_Float := 
  158.      Glib.Properties.Build ("text_xalign"); 
  159.  
  160.    pragma Import (C, Get_Type, "gtk_progress_get_type"); 
  161. end Gtk.Progress;