<refentry id="GtkProgressBar">
<refmeta>
<refentrytitle>GtkProgressBar</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkProgressBar</refname><refpurpose>a widget which indicates progress visually.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gtk/gtk.h&gt;


struct      <link linkend="GtkProgressBar-struct">GtkProgressBar</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-progress-bar-new">gtk_progress_bar_new</link>            (void);
void        <link linkend="gtk-progress-bar-pulse">gtk_progress_bar_pulse</link>          (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar);
void        <link linkend="gtk-progress-bar-set-text">gtk_progress_bar_set_text</link>       (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             const <link linkend="gchar">gchar</link> *text);
void        <link linkend="gtk-progress-bar-set-fraction">gtk_progress_bar_set_fraction</link>   (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="gdouble">gdouble</link> fraction);
void        <link linkend="gtk-progress-bar-set-pulse-step">gtk_progress_bar_set_pulse_step</link> (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="gdouble">gdouble</link> fraction);
void        <link linkend="gtk-progress-bar-set-orientation">gtk_progress_bar_set_orientation</link>
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="GtkProgressBarOrientation">GtkProgressBarOrientation</link> orientation);
enum        <link linkend="GtkProgressBarOrientation">GtkProgressBarOrientation</link>;
G_CONST_RETURN <link linkend="gchar">gchar</link>* <link linkend="gtk-progress-bar-get-text">gtk_progress_bar_get_text</link>
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar);
<link linkend="gdouble">gdouble</link>     <link linkend="gtk-progress-bar-get-fraction">gtk_progress_bar_get_fraction</link>   (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar);
<link linkend="gdouble">gdouble</link>     <link linkend="gtk-progress-bar-get-pulse-step">gtk_progress_bar_get_pulse_step</link> (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar);
<link linkend="GtkProgressBarOrientation">GtkProgressBarOrientation</link> <link linkend="gtk-progress-bar-get-orientation">gtk_progress_bar_get_orientation</link>
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar);
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-progress-bar-new-with-adjustment">gtk_progress_bar_new_with_adjustment</link>
                                            (<link linkend="GtkAdjustment">GtkAdjustment</link> *adjustment);
void        <link linkend="gtk-progress-bar-set-bar-style">gtk_progress_bar_set_bar_style</link>  (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="GtkProgressBarStyle">GtkProgressBarStyle</link> style);
enum        <link linkend="GtkProgressBarStyle">GtkProgressBarStyle</link>;
void        <link linkend="gtk-progress-bar-set-discrete-blocks">gtk_progress_bar_set_discrete_blocks</link>
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="guint">guint</link> blocks);
void        <link linkend="gtk-progress-bar-set-activity-step">gtk_progress_bar_set_activity_step</link>
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="guint">guint</link> step);
void        <link linkend="gtk-progress-bar-set-activity-blocks">gtk_progress_bar_set_activity_blocks</link>
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="guint">guint</link> blocks);
void        <link linkend="gtk-progress-bar-update">gtk_progress_bar_update</link>         (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="gdouble">gdouble</link> percentage);


</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="GtkObject">GtkObject</link>
         +----<link linkend="GtkWidget">GtkWidget</link>
               +----<link linkend="GtkProgress">GtkProgress</link>
                     +----GtkProgressBar
</synopsis>

</refsect1>

<refsect1>
<title>Properties</title>
<synopsis>

  &quot;<link linkend="GtkProgressBar--fraction">fraction</link>&quot;             <link linkend="gdouble">gdouble</link>              : Read / Write
  &quot;<link linkend="GtkProgressBar--pulse-step">pulse-step</link>&quot;           <link linkend="gdouble">gdouble</link>              : Read / Write
  &quot;<link linkend="GtkProgressBar--orientation">orientation</link>&quot;          <link linkend="GtkProgressBarOrientation">GtkProgressBarOrientation</link> : Read / Write
  &quot;<link linkend="GtkProgressBar--text">text</link>&quot;                 <link linkend="gchararray">gchararray</link>           : Read / Write
  &quot;<link linkend="GtkProgressBar--adjustment">adjustment</link>&quot;           <link linkend="GtkAdjustment">GtkAdjustment</link>        : Read / Write
  &quot;<link linkend="GtkProgressBar--bar-style">bar-style</link>&quot;            <link linkend="GtkProgressBarStyle">GtkProgressBarStyle</link>  : Read / Write
  &quot;<link linkend="GtkProgressBar--activity-step">activity-step</link>&quot;        <link linkend="guint">guint</link>                : Read / Write
  &quot;<link linkend="GtkProgressBar--activity-blocks">activity-blocks</link>&quot;      <link linkend="guint">guint</link>                : Read / Write
  &quot;<link linkend="GtkProgressBar--discrete-blocks">discrete-blocks</link>&quot;      <link linkend="guint">guint</link>                : Read / Write
</synopsis>
</refsect1>



<refsect1>
<title>Description</title>
<para>
The <link linkend="GtkProgressBar">GtkProgressBar</link> is typically used to display the progress of a long
running operation.  It provides a visual clue that processing
is underway.  The <link linkend="GtkProgressBar">GtkProgressBar</link> can be used in two different
modes: percentage mode and activity mode.
</para>

<para>
When an application can determine how much work needs to take place 
(e.g. read a fixed number of bytes from a file) and can monitor its
progress, it can use the <link linkend="GtkProgressBar">GtkProgressBar</link> in percentage mode and the user
sees a growing bar indicating the percentage of the work that has
been completed.  In this mode, the application is required to call
<link linkend="gtk-progress-bar-set-fraction">gtk_progress_bar_set_fraction</link>() periodically to update the progress bar.
</para>

<para>
When an application has no accurate way of knowing the amount of work
to do, it can use the <link linkend="GtkProgressBar">GtkProgressBar</link> in activity mode, which shows activity 
by a block moving back and forth within the progress area. In this mode,
the application is required to call <link linkend="gtk-progress-bar-pulse">gtk_progress_bar_pulse</link>() perodically
to update the progress bar.
</para>

<para>
There is quite a bit of flexibility provided to control the appearance
of the <link linkend="GtkProgressBar">GtkProgressBar</link>.  Functions are provided to control the 
orientation of the bar, optional text can be displayed along with
the bar, and the step size used in activity mode can be set.
</para>

<note>
<para>
The <link linkend="GtkProgressBar">GtkProgressBar</link>/<link linkend="GtkProgress">GtkProgress</link> API in GTK 1.2 was bloated, needlessly complex
and hard to use properly.  Therefore <link linkend="GtkProgress">GtkProgress</link> has been deprecated
completely and the <link linkend="GtkProgressBar">GtkProgressBar</link> API has been reduced to the following 9
functions: <link linkend="gtk-progress-bar-new">gtk_progress_bar_new</link>(), <link linkend="gtk-progress-bar-pulse">gtk_progress_bar_pulse</link>(), <link linkend="gtk-progress-bar-set-text">gtk_progress_bar_set_text</link>(),
<link linkend="gtk-progress-bar-set-fraction">gtk_progress_bar_set_fraction</link>(), <link linkend="gtk-progress-bar-set-pulse-step">gtk_progress_bar_set_pulse_step</link>(),
<link linkend="gtk-progress-bar-set-orientation">gtk_progress_bar_set_orientation</link>(), <link linkend="gtk-progress-bar-get-text">gtk_progress_bar_get_text</link>(),
<link linkend="gtk-progress-bar-get-fraction">gtk_progress_bar_get_fraction</link>(), <link linkend="gtk-progress-bar-get-pulse-step">gtk_progress_bar_get_pulse_step</link>(). These have
been grouped at the beginning of this section, followed by a large chunk of 
deprecated 1.2 compatibility functions.
</para>
</note>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GtkProgressBar-struct">struct GtkProgressBar</title>
<programlisting>struct GtkProgressBar;</programlisting>
<para>
The <link linkend="GtkProgressBar-struct">GtkProgressBar</link> struct contains private data only, 
and should be accessed using the functions below.
</para></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-new">gtk_progress_bar_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_progress_bar_new            (void);</programlisting>
<para>
Creates a new <link linkend="GtkProgressBar">GtkProgressBar</link>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>a <link linkend="GtkProgressBar">GtkProgressBar</link>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-pulse">gtk_progress_bar_pulse ()</title>
<programlisting>void        gtk_progress_bar_pulse          (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar);</programlisting>
<para>
Indicates that some progress is made, but you don't know how much.
Causes the progress bar to enter "activity mode," where a block
bounces back and forth. Each call to <link linkend="gtk-progress-bar-pulse">gtk_progress_bar_pulse</link>()
causes the block to move by a little bit (the amount of movement
per pulse is determined by <link linkend="gtk-progress-bar-set-pulse-step">gtk_progress_bar_set_pulse_step</link>()).</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkProgressBar">GtkProgressBar</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-set-text">gtk_progress_bar_set_text ()</title>
<programlisting>void        gtk_progress_bar_set_text       (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             const <link linkend="gchar">gchar</link> *text);</programlisting>
<para>
Causes the given <parameter>text</parameter> to appear superimposed on the progress bar.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkProgressBar">GtkProgressBar</link>
</entry></row>
<row><entry align="right"><parameter>text</parameter>&nbsp;:</entry>
<entry> a UTF-8 string
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-set-fraction">gtk_progress_bar_set_fraction ()</title>
<programlisting>void        gtk_progress_bar_set_fraction   (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="gdouble">gdouble</link> fraction);</programlisting>
<para>
Causes the progress bar to "fill in" the given fraction
of the bar. The fraction should be between 0.0 and 1.0,
inclusive.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkProgressBar">GtkProgressBar</link>
</entry></row>
<row><entry align="right"><parameter>fraction</parameter>&nbsp;:</entry>
<entry> fraction of the task that's been completed
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-set-pulse-step">gtk_progress_bar_set_pulse_step ()</title>
<programlisting>void        gtk_progress_bar_set_pulse_step (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="gdouble">gdouble</link> fraction);</programlisting>
<para>
Sets the fraction of total progress bar length to move the
bouncing block for each call to <link linkend="gtk-progress-bar-pulse">gtk_progress_bar_pulse</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkProgressBar">GtkProgressBar</link>
</entry></row>
<row><entry align="right"><parameter>fraction</parameter>&nbsp;:</entry>
<entry> fraction between 0.0 and 1.0
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-set-orientation">gtk_progress_bar_set_orientation ()</title>
<programlisting>void        gtk_progress_bar_set_orientation
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="GtkProgressBarOrientation">GtkProgressBarOrientation</link> orientation);</programlisting>
<para>
Causes the progress bar to switch to a different orientation
(left-to-right, right-to-left, top-to-bottom, or bottom-to-top).</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkProgressBar">GtkProgressBar</link>
</entry></row>
<row><entry align="right"><parameter>orientation</parameter>&nbsp;:</entry>
<entry> orientation of the progress bar
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="GtkProgressBarOrientation">enum GtkProgressBarOrientation</title>
<programlisting>typedef enum
{
  GTK_PROGRESS_LEFT_TO_RIGHT,
  GTK_PROGRESS_RIGHT_TO_LEFT,
  GTK_PROGRESS_BOTTOM_TO_TOP,
  GTK_PROGRESS_TOP_TO_BOTTOM
} GtkProgressBarOrientation;
</programlisting>
<para>
An enumeration representing possible orientations and growth
directions for the visible progress bar.

<informaltable pgwide=1 frame="none" role="enum">
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
<tbody>

<row>
<entry>GTK_PROGRESS_LEFT_TO_RIGHT</entry>
<entry>A horizontal progress bar growing from left to right.</entry>
</row>

<row>
<entry>GTK_PROGRESS_RIGHT_TO_LEFT</entry>
<entry>A horizontal progress bar growing from right to left.</entry>
</row>

<row>
<entry>GTK_PROGRESS_BOTTOM_TO_TOP</entry>
<entry>A vertical progress bar growing from bottom to top.</entry>
</row>

<row>
<entry>GTK_PROGRESS_TOP_TO_BOTTOM</entry>
<entry>A vertical progress bar growing from top to bottom.</entry>
</row>

</tbody></tgroup></informaltable>
</para></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-get-text">gtk_progress_bar_get_text ()</title>
<programlisting>G_CONST_RETURN <link linkend="gchar">gchar</link>* gtk_progress_bar_get_text
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar);</programlisting>
<para>
Retrieves the text displayed superimposed on the progress bar,
if any, otherwise <literal>NULL</literal>. The return value is a reference
to the text, not a copy of it, so will become invalid
if you change the text in the progress bar.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkProgressBar">GtkProgressBar</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> text, or <literal>NULL</literal>; don't free the string
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-get-fraction">gtk_progress_bar_get_fraction ()</title>
<programlisting><link linkend="gdouble">gdouble</link>     gtk_progress_bar_get_fraction   (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar);</programlisting>
<para>
Returns the current fraction of the task that's been completed.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkProgressBar">GtkProgressBar</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a fraction from 0.0 to 1.0
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-get-pulse-step">gtk_progress_bar_get_pulse_step ()</title>
<programlisting><link linkend="gdouble">gdouble</link>     gtk_progress_bar_get_pulse_step (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar);</programlisting>
<para>
Retrieves the pulse step set with <link linkend="gtk-progress-bar-set-pulse-step">gtk_progress_bar_set_pulse_step</link>()</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkProgressBar">GtkProgressBar</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a fraction from 0.0 to 1.0
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-get-orientation">gtk_progress_bar_get_orientation ()</title>
<programlisting><link linkend="GtkProgressBarOrientation">GtkProgressBarOrientation</link> gtk_progress_bar_get_orientation
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar);</programlisting>
<para>
Retrieves the current progress bar orientation.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkProgressBar">GtkProgressBar</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> orientation of the progress bar
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-new-with-adjustment">gtk_progress_bar_new_with_adjustment ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_progress_bar_new_with_adjustment
                                            (<link linkend="GtkAdjustment">GtkAdjustment</link> *adjustment);</programlisting>
<warning>
<para>
<literal>gtk_progress_bar_new_with_adjustment</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Creates a new <link linkend="GtkProgressBar">GtkProgressBar</link> with an associated <link linkend="GtkAdjustment">GtkAdjustment</link>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>adjustment</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkAdjustment">GtkAdjustment</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>a <link linkend="GtkProgressBar">GtkProgressBar</link>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-set-bar-style">gtk_progress_bar_set_bar_style ()</title>
<programlisting>void        gtk_progress_bar_set_bar_style  (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="GtkProgressBarStyle">GtkProgressBarStyle</link> style);</programlisting>
<warning>
<para>
<literal>gtk_progress_bar_set_bar_style</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Sets the style of the <link linkend="GtkProgressBar">GtkProgressBar</link>.  The default style is
<literal>GTK_PROGRESS_CONTINUOUS</literal>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkProgressBar">GtkProgressBar</link>.
</entry></row>
<row><entry align="right"><parameter>style</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkProgressBarStyle">GtkProgressBarStyle</link> value indicating the desired style.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="GtkProgressBarStyle">enum GtkProgressBarStyle</title>
<programlisting>typedef enum
{
  GTK_PROGRESS_CONTINUOUS,
  GTK_PROGRESS_DISCRETE
} GtkProgressBarStyle;
</programlisting>
<para>
An enumeration representing the styles for drawing the progress bar.

<informaltable pgwide=1 frame="none" role="enum">
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
<tbody>

<row>
<entry>GTK_PROGRESS_CONTINUOUS</entry>
<entry>The progress bar grows in a smooth, continuous manner.</entry>
</row>

<row>
<entry>GTK_PROGRESS_DISCRETE</entry>
<entry>The progress bar grows in discrete, visible blocks.</entry>
</row>

</tbody></tgroup></informaltable>
</para></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-set-discrete-blocks">gtk_progress_bar_set_discrete_blocks ()</title>
<programlisting>void        gtk_progress_bar_set_discrete_blocks
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="guint">guint</link> blocks);</programlisting>
<warning>
<para>
<literal>gtk_progress_bar_set_discrete_blocks</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Sets the number of blocks that the progress bar is divided into
when the style is <literal>GTK_PROGRESS_DISCRETE</literal>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkProgressBar">GtkProgressBar</link>.
</entry></row>
<row><entry align="right"><parameter>blocks</parameter>&nbsp;:</entry>
<entry>number of individual blocks making up the bar.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-set-activity-step">gtk_progress_bar_set_activity_step ()</title>
<programlisting>void        gtk_progress_bar_set_activity_step
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="guint">guint</link> step);</programlisting>
<warning>
<para>
<literal>gtk_progress_bar_set_activity_step</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Sets the step value used when the progress bar is in activity
mode.  The step is the amount by which the progress is incremented
each iteration.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkProgressBar">GtkProgressBar</link>.
</entry></row>
<row><entry align="right"><parameter>step</parameter>&nbsp;:</entry>
<entry>the amount which the progress is incremented in activity
mode.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-set-activity-blocks">gtk_progress_bar_set_activity_blocks ()</title>
<programlisting>void        gtk_progress_bar_set_activity_blocks
                                            (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="guint">guint</link> blocks);</programlisting>
<warning>
<para>
<literal>gtk_progress_bar_set_activity_blocks</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Sets the number of blocks used when the progress bar is in activity
mode.  Larger numbers make the visible block smaller.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkProgressBar">GtkProgressBar</link>.
</entry></row>
<row><entry align="right"><parameter>blocks</parameter>&nbsp;:</entry>
<entry>number of blocks which can fit within the progress bar area.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-progress-bar-update">gtk_progress_bar_update ()</title>
<programlisting>void        gtk_progress_bar_update         (<link linkend="GtkProgressBar">GtkProgressBar</link> *pbar,
                                             <link linkend="gdouble">gdouble</link> percentage);</programlisting>
<warning>
<para>
<literal>gtk_progress_bar_update</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
This function is deprecated.  Please use <link linkend="gtk-progress-set-value">gtk_progress_set_value</link>() or
<link linkend="gtk-progress-set-percentage">gtk_progress_set_percentage</link>() instead.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pbar</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkProgressBar">GtkProgressBar</link>.
</entry></row>
<row><entry align="right"><parameter>percentage</parameter>&nbsp;:</entry>
<entry>the new percent complete value.


</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>
<refsect1>
<title>Properties</title>
<variablelist>
<varlistentry><term><anchor id="GtkProgressBar--fraction">&quot;<literal>fraction</literal>&quot; (<link linkend="gdouble">gdouble</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkProgressBar--pulse-step">&quot;<literal>pulse-step</literal>&quot; (<link linkend="gdouble">gdouble</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkProgressBar--orientation">&quot;<literal>orientation</literal>&quot; (<link linkend="GtkProgressBarOrientation">GtkProgressBarOrientation</link> : Read / Write)</term>
<listitem>
<para>
a <link linkend="GtkProgressBarOrientation">GtkProgressBarOrientation</link> value which specifies the
orientation and growth direction of the bar.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkProgressBar--text">&quot;<literal>text</literal>&quot; (<link linkend="gchararray">gchararray</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkProgressBar--adjustment">&quot;<literal>adjustment</literal>&quot; (<link linkend="GtkAdjustment">GtkAdjustment</link> : Read / Write)</term>
<listitem>
<para>
a <link linkend="GtkAdjustment">GtkAdjustment</link> to be used with the <link linkend="GtkProgressBar">GtkProgressBar</link>.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkProgressBar--bar-style">&quot;<literal>bar-style</literal>&quot; (<link linkend="GtkProgressBarStyle">GtkProgressBarStyle</link> : Read / Write)</term>
<listitem>
<para>
a <link linkend="GtkProgressBarStyle">GtkProgressBarStyle</link> value which specifies the
visual style of the bar in percentage mode.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkProgressBar--activity-step">&quot;<literal>activity-step</literal>&quot; (<link linkend="guint">guint</link> : Read / Write)</term>
<listitem>
<para>
The increment used for each iteration in activity mode.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkProgressBar--activity-blocks">&quot;<literal>activity-blocks</literal>&quot; (<link linkend="guint">guint</link> : Read / Write)</term>
<listitem>
<para>
The number of blocks which can fit in the progress bar
area in activity mode.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkProgressBar--discrete-blocks">&quot;<literal>discrete-blocks</literal>&quot; (<link linkend="guint">guint</link> : Read / Write)</term>
<listitem>
<para>
The number of blocks which which make up progress bar
when it is shown in <literal>GTK_PROGRESS_DISCRETE</literal> style.
</para></listitem></varlistentry>

</variablelist>
</refsect1>




</refentry>
