<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkProgressBar">
<refmeta>
<refentrytitle role="top_of_page" id="GtkProgressBar.top_of_page">GtkProgressBar</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkProgressBar</refname>
<refpurpose>A widget which indicates progress visually</refpurpose>
</refnamediv>

<refsect1 id="GtkProgressBar.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-progress-bar-new">gtk_progress_bar_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-pulse">gtk_progress_bar_pulse</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-set-fraction">gtk_progress_bar_set_fraction</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-get-fraction">gtk_progress_bar_get_fraction</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-set-inverted">gtk_progress_bar_set_inverted</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-get-inverted">gtk_progress_bar_get_inverted</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-set-show-text">gtk_progress_bar_set_show_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-get-show-text">gtk_progress_bar_get_show_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-set-text">gtk_progress_bar_set_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-progress-bar-get-text">gtk_progress_bar_get_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-set-ellipsize">gtk_progress_bar_set_ellipsize</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoEllipsizeMode"><returnvalue>PangoEllipsizeMode</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-get-ellipsize">gtk_progress_bar_get_ellipsize</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-set-pulse-step">gtk_progress_bar_set_pulse_step</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-progress-bar-get-pulse-step">gtk_progress_bar_get_pulse_step</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkProgressBar.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link></entry><entry role="property_name"><link linkend="GtkProgressBar--ellipsize">ellipsize</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gdouble"><type>gdouble</type></link></entry><entry role="property_name"><link linkend="GtkProgressBar--fraction">fraction</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkProgressBar--inverted">inverted</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gdouble"><type>gdouble</type></link></entry><entry role="property_name"><link linkend="GtkProgressBar--pulse-step">pulse-step</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkProgressBar--show-text">show-text</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkProgressBar--text">text</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkProgressBar.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkProgressBar-struct">GtkProgressBar</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkProgressBar.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkProgressBar
</screen>
</refsect1>
<refsect1 id="GtkProgressBar.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkProgressBar implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link> and  <link linkend="GtkOrientable">GtkOrientable</link>.</para>

</refsect1>

<refsect1 id="GtkProgressBar.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkProgressBar.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> is typically used to display the progress of a long
running operation. It provides a visual clue that processing is underway.
The GtkProgressBar 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 GtkProgressBar 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"><function>gtk_progress_bar_set_fraction()</function></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"><type>GtkProgressBar</type></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"><function>gtk_progress_bar_pulse()</function></link>
periodically to update the progress bar.</para>
<para>There is quite a bit of flexibility provided to control the appearance
of the <link linkend="GtkProgressBar"><type>GtkProgressBar</type></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>
<refsect2><title>CSS nodes</title><informalexample><programlisting role="example"><![CDATA[
progressbar[.osd]
├── [text]
╰── trough[.empty][.full]
    ╰── progress[.pulse]
]]></programlisting></informalexample>
<para></para>
<para>GtkProgressBar has a main CSS node with name progressbar and subnodes with
names text and trough, of which the latter has a subnode named progress. The
text subnode is only present if text is shown. The progress subnode has the
style class .pulse when in activity mode. It gets the style classes .left,
.right, .top or .bottom added when the progress 'touches' the corresponding
end of the GtkProgressBar. The .osd class on the progressbar node is for use
in overlays like the one Epiphany has for page loading progress.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkProgressBar.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-progress-bar-new" role="function">
<title>gtk_progress_bar_new&#160;()</title>
<indexterm zone="gtk-progress-bar-new"><primary>gtk_progress_bar_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_progress_bar_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link>.</para>
<refsect3 id="gtk-progress-bar-new.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link>.</para>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-pulse" role="function">
<title>gtk_progress_bar_pulse&#160;()</title>
<indexterm zone="gtk-progress-bar-pulse"><primary>gtk_progress_bar_pulse</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_progress_bar_pulse (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>);</programlisting>
<para>Indicates that some progress has been 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"><function>gtk_progress_bar_pulse()</function></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"><function>gtk_progress_bar_set_pulse_step()</function></link>).</para>
<refsect3 id="gtk-progress-bar-pulse.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-set-fraction" role="function">
<title>gtk_progress_bar_set_fraction&#160;()</title>
<indexterm zone="gtk-progress-bar-set-fraction"><primary>gtk_progress_bar_set_fraction</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_progress_bar_set_fraction (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>,
                               <parameter><link linkend="gdouble"><type>gdouble</type></link> fraction</parameter>);</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>
<refsect3 id="gtk-progress-bar-set-fraction.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>fraction</para></entry>
<entry role="parameter_description"><para>fraction of the task that’s been completed</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-get-fraction" role="function">
<title>gtk_progress_bar_get_fraction&#160;()</title>
<indexterm zone="gtk-progress-bar-get-fraction"><primary>gtk_progress_bar_get_fraction</primary></indexterm>
<programlisting language="C"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
gtk_progress_bar_get_fraction (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>);</programlisting>
<para>Returns the current fraction of the task that’s been completed.</para>
<refsect3 id="gtk-progress-bar-get-fraction.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-progress-bar-get-fraction.returns" role="returns">
<title>Returns</title>
<para> a fraction from 0.0 to 1.0</para>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-set-inverted" role="function">
<title>gtk_progress_bar_set_inverted&#160;()</title>
<indexterm zone="gtk-progress-bar-set-inverted"><primary>gtk_progress_bar_set_inverted</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_progress_bar_set_inverted (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>,
                               <parameter><link linkend="gboolean"><type>gboolean</type></link> inverted</parameter>);</programlisting>
<para>Progress bars normally grow from top to bottom or left to right.
Inverted progress bars grow in the opposite direction.</para>
<refsect3 id="gtk-progress-bar-set-inverted.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>inverted</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to invert the progress bar</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-get-inverted" role="function">
<title>gtk_progress_bar_get_inverted&#160;()</title>
<indexterm zone="gtk-progress-bar-get-inverted"><primary>gtk_progress_bar_get_inverted</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_progress_bar_get_inverted (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>);</programlisting>
<para>Gets the value set by <link linkend="gtk-progress-bar-set-inverted"><function>gtk_progress_bar_set_inverted()</function></link>.</para>
<refsect3 id="gtk-progress-bar-get-inverted.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-progress-bar-get-inverted.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the progress bar is inverted</para>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-set-show-text" role="function">
<title>gtk_progress_bar_set_show_text&#160;()</title>
<indexterm zone="gtk-progress-bar-set-show-text"><primary>gtk_progress_bar_set_show_text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_progress_bar_set_show_text (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> show_text</parameter>);</programlisting>
<para>Sets whether the progress bar will show text next to the bar.
The shown text is either the value of the <link linkend="GtkProgressBar--text"><type>“text”</type></link>
property or, if that is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, the <link linkend="GtkProgressBar--fraction"><type>“fraction”</type></link> value,
as a percentage.</para>
<para>To make a progress bar that is styled and sized suitably for containing
text (even if the actual text is blank), set <link linkend="GtkProgressBar--show-text"><type>“show-text”</type></link> to
<link linkend="TRUE:CAPS"><literal>TRUE</literal></link> and <link linkend="GtkProgressBar--text"><type>“text”</type></link> to the empty string (not <link linkend="NULL:CAPS"><literal>NULL</literal></link>).</para>
<refsect3 id="gtk-progress-bar-set-show-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>show_text</para></entry>
<entry role="parameter_description"><para>whether to show text</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-get-show-text" role="function">
<title>gtk_progress_bar_get_show_text&#160;()</title>
<indexterm zone="gtk-progress-bar-get-show-text"><primary>gtk_progress_bar_get_show_text</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_progress_bar_get_show_text (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>);</programlisting>
<para>Gets the value of the <link linkend="GtkProgressBar--show-text"><type>“show-text”</type></link> property.
See <link linkend="gtk-progress-bar-set-show-text"><function>gtk_progress_bar_set_show_text()</function></link>.</para>
<refsect3 id="gtk-progress-bar-get-show-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-progress-bar-get-show-text.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if text is shown in the progress bar</para>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-set-text" role="function">
<title>gtk_progress_bar_set_text&#160;()</title>
<indexterm zone="gtk-progress-bar-set-text"><primary>gtk_progress_bar_set_text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_progress_bar_set_text (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>,
                           <parameter>const <link linkend="gchar"><type>gchar</type></link> *text</parameter>);</programlisting>
<para>Causes the given <parameter>text</parameter>
 to appear next to the progress bar.</para>
<para>If <parameter>text</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link> and <link linkend="GtkProgressBar--show-text"><type>“show-text”</type></link> is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, the current
value of <link linkend="GtkProgressBar--fraction"><type>“fraction”</type></link> will be displayed as a percentage.</para>
<para>If <parameter>text</parameter>
 is non-<link linkend="NULL:CAPS"><literal>NULL</literal></link> and <link linkend="GtkProgressBar--show-text"><type>“show-text”</type></link> is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, the text
will be displayed. In this case, it will not display the progress
percentage. If <parameter>text</parameter>
 is the empty string, the progress bar will still
be styled and sized suitably for containing text, as long as
<link linkend="GtkProgressBar--show-text"><type>“show-text”</type></link> is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>.</para>
<refsect3 id="gtk-progress-bar-set-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>a UTF-8 string, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-get-text" role="function">
<title>gtk_progress_bar_get_text&#160;()</title>
<indexterm zone="gtk-progress-bar-get-text"><primary>gtk_progress_bar_get_text</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_progress_bar_get_text (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>);</programlisting>
<para>Retrieves the text that is displayed with the progress bar,
if any, otherwise <link linkend="NULL:CAPS"><literal>NULL</literal></link>. 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>
<refsect3 id="gtk-progress-bar-get-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-progress-bar-get-text.returns" role="returns">
<title>Returns</title>
<para>text, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>; this string is owned by the widget
and should not be modified or freed. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-set-ellipsize" role="function">
<title>gtk_progress_bar_set_ellipsize&#160;()</title>
<indexterm zone="gtk-progress-bar-set-ellipsize"><primary>gtk_progress_bar_set_ellipsize</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_progress_bar_set_ellipsize (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>,
                                <parameter><link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link> mode</parameter>);</programlisting>
<para>Sets the mode used to ellipsize (add an ellipsis: "...") the
text if there is not enough space to render the entire string.</para>
<refsect3 id="gtk-progress-bar-set-ellipsize.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mode</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-get-ellipsize" role="function">
<title>gtk_progress_bar_get_ellipsize&#160;()</title>
<indexterm zone="gtk-progress-bar-get-ellipsize"><primary>gtk_progress_bar_get_ellipsize</primary></indexterm>
<programlisting language="C"><link linkend="PangoEllipsizeMode"><returnvalue>PangoEllipsizeMode</returnvalue></link>
gtk_progress_bar_get_ellipsize (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>);</programlisting>
<para>Returns the ellipsizing position of the progress bar.
See <link linkend="gtk-progress-bar-set-ellipsize"><function>gtk_progress_bar_set_ellipsize()</function></link>.</para>
<refsect3 id="gtk-progress-bar-get-ellipsize.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-progress-bar-get-ellipsize.returns" role="returns">
<title>Returns</title>
<para> <link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-set-pulse-step" role="function">
<title>gtk_progress_bar_set_pulse_step&#160;()</title>
<indexterm zone="gtk-progress-bar-set-pulse-step"><primary>gtk_progress_bar_set_pulse_step</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_progress_bar_set_pulse_step (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>,
                                 <parameter><link linkend="gdouble"><type>gdouble</type></link> fraction</parameter>);</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"><function>gtk_progress_bar_pulse()</function></link>.</para>
<refsect3 id="gtk-progress-bar-set-pulse-step.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>fraction</para></entry>
<entry role="parameter_description"><para>fraction between 0.0 and 1.0</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-progress-bar-get-pulse-step" role="function">
<title>gtk_progress_bar_get_pulse_step&#160;()</title>
<indexterm zone="gtk-progress-bar-get-pulse-step"><primary>gtk_progress_bar_get_pulse_step</primary></indexterm>
<programlisting language="C"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
gtk_progress_bar_get_pulse_step (<parameter><link linkend="GtkProgressBar"><type>GtkProgressBar</type></link> *pbar</parameter>);</programlisting>
<para>Retrieves the pulse step set with <link linkend="gtk-progress-bar-set-pulse-step"><function>gtk_progress_bar_set_pulse_step()</function></link>.</para>
<refsect3 id="gtk-progress-bar-get-pulse-step.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>pbar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkProgressBar"><type>GtkProgressBar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-progress-bar-get-pulse-step.returns" role="returns">
<title>Returns</title>
<para> a fraction from 0.0 to 1.0</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkProgressBar.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkProgressBar-struct" role="struct">
<title>GtkProgressBar</title>
<indexterm zone="GtkProgressBar-struct"><primary>GtkProgressBar</primary></indexterm>
<programlisting language="C">typedef struct _GtkProgressBar GtkProgressBar;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkProgressBar.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkProgressBar--ellipsize" role="property"><title>The <literal>“ellipsize”</literal> property</title>
<indexterm zone="GtkProgressBar--ellipsize"><primary>GtkProgressBar:ellipsize</primary></indexterm>
<programlisting>  “ellipsize”                <link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link></programlisting>
<para>The preferred place to ellipsize the string, if the progress bar does
not have enough room to display the entire string, specified as a
<link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link>.</para>
<para>Note that setting this property to a value other than
<link linkend="PANGO-ELLIPSIZE-NONE:CAPS"><literal>PANGO_ELLIPSIZE_NONE</literal></link> has the side-effect that the progress bar requests
only enough space to display the ellipsis ("..."). Another means to set a
progress bar's width is <link linkend="gtk-widget-set-size-request"><function>gtk_widget_set_size_request()</function></link>.</para>
<para>Owner: GtkProgressBar</para>
<para>Flags: Read / Write</para>
<para>Default value: PANGO_ELLIPSIZE_NONE</para>
</refsect2>
<refsect2 id="GtkProgressBar--fraction" role="property"><title>The <literal>“fraction”</literal> property</title>
<indexterm zone="GtkProgressBar--fraction"><primary>GtkProgressBar:fraction</primary></indexterm>
<programlisting>  “fraction”                 <link linkend="gdouble"><type>gdouble</type></link></programlisting>
<para>The fraction of total work that has been completed.</para><para>Owner: GtkProgressBar</para>
<para>Flags: Read / Write</para>
<para>Allowed values: [0,1]</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkProgressBar--inverted" role="property"><title>The <literal>“inverted”</literal> property</title>
<indexterm zone="GtkProgressBar--inverted"><primary>GtkProgressBar:inverted</primary></indexterm>
<programlisting>  “inverted”                 <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Invert the direction in which the progress bar grows.</para><para>Owner: GtkProgressBar</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkProgressBar--pulse-step" role="property"><title>The <literal>“pulse-step”</literal> property</title>
<indexterm zone="GtkProgressBar--pulse-step"><primary>GtkProgressBar:pulse-step</primary></indexterm>
<programlisting>  “pulse-step”               <link linkend="gdouble"><type>gdouble</type></link></programlisting>
<para>The fraction of total progress to move the bouncing block when pulsed.</para><para>Owner: GtkProgressBar</para>
<para>Flags: Read / Write</para>
<para>Allowed values: [0,1]</para>
<para>Default value: 0.1</para>
</refsect2>
<refsect2 id="GtkProgressBar--show-text" role="property"><title>The <literal>“show-text”</literal> property</title>
<indexterm zone="GtkProgressBar--show-text"><primary>GtkProgressBar:show-text</primary></indexterm>
<programlisting>  “show-text”                <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Sets whether the progress bar will show a text in addition
to the bar itself. The shown text is either the value of
the <link linkend="GtkProgressBar--text"><type>“text”</type></link> property or, if that is <link linkend="NULL:CAPS"><literal>NULL</literal></link>,
the <link linkend="GtkProgressBar--fraction"><type>“fraction”</type></link> value, as a percentage.</para>
<para>To make a progress bar that is styled and sized suitably for
showing text (even if the actual text is blank), set
<link linkend="GtkProgressBar--show-text"><type>“show-text”</type></link> to <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> and <link linkend="GtkProgressBar--text"><type>“text”</type></link>
to the empty string (not <link linkend="NULL:CAPS"><literal>NULL</literal></link>).</para>
<para>Owner: GtkProgressBar</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkProgressBar--text" role="property"><title>The <literal>“text”</literal> property</title>
<indexterm zone="GtkProgressBar--text"><primary>GtkProgressBar:text</primary></indexterm>
<programlisting>  “text”                     <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>Text to be displayed in the progress bar.</para><para>Owner: GtkProgressBar</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>

</refsect1>

</refentry>
