gimpprogress

## gimpprogress gimpprogress — Functions for embedding the progress bar into a plug-in's GUI. |

## Synopsis

    void        (*GimpProgressStartCallback)    (const gchar *message,
                                                 gboolean cancelable,
                                                 gpointer user_data);
    void        (*GimpProgressEndCallback)      (gpointer user_data);
    void        (*GimpProgressTextCallback)     (const gchar *message,
                                                 gpointer user_data);
    void        (*GimpProgressValueCallback)    (gdouble percentage,
                                                 gpointer user_data);
    gboolean    gimp_progress_init              (const gchar *message);
    gboolean    gimp_progress_update            (gdouble percentage);
    const gchar* gimp_progress_install          (GimpProgressStartCallback start_callback,
                                                 GimpProgressEndCallback end_callback,
                                                 GimpProgressTextCallback text_callback,
                                                 GimpProgressValueCallback value_callback,
                                                 gpointer user_data);
    gpointer    gimp_progress_uninstall         (const gchar *progress_callback);
    gboolean    gimp_progress_cancel            (const gchar *progress_callback);

## Description

Functions for embedding the progress bar into a plug-in's GUI.

## Details

### GimpProgressStartCallback ()

    void        (*GimpProgressStartCallback)    (const gchar *message,
                                                 gboolean cancelable,
                                                 gpointer user_data);

`message` : |
`cancelable` : |
`user_data` : |

### GimpProgressEndCallback ()

    void        (*GimpProgressEndCallback)      (gpointer user_data);

`user_data` : |

### GimpProgressTextCallback ()

    void        (*GimpProgressTextCallback)     (const gchar *message,
                                                 gpointer user_data);

`message` : |
`user_data` : |

### GimpProgressValueCallback ()

    void        (*GimpProgressValueCallback)    (gdouble percentage,
                                                 gpointer user_data);

`percentage` : |
`user_data` : |

### gimp_progress_init ()

    gboolean    gimp_progress_init              (const gchar *message);

Initializes the progress bar for the current plug-in.

Initializes the progress bar for the current plug-in. It is only valid to call this procedure from a plug-in.

`message` : | Message to use in the progress dialog.
Returns : | TRUE on success.

### gimp_progress_update ()

    gboolean    gimp_progress_update            (gdouble percentage);

Updates the progress bar for the current plug-in.

Updates the progress bar for the current plug-in. It is only valid to call this procedure from a plug-in.

`percentage` : | Percentage of progress completed which must be between 0.0 and 1.0.
Returns : | TRUE on success.

### gimp_progress_install ()

    const gchar* gimp_progress_install          (GimpProgressStartCallback start_callback,
                                                 GimpProgressEndCallback end_callback,
                                                 GimpProgressTextCallback text_callback,
                                                 GimpProgressValueCallback value_callback,
                                                 gpointer user_data);

`start_callback` : | the function to call when progress starts
`end_callback` : | the function to call when progress finishes
`text_callback` : | the function to call to change the text
`value_callback` : | the function to call to change the value
`user_data` : | a pointer that is returned when uninstalling the progress
Returns : | the name of the temporary procedure that's been installed

Since GIMP 2.2

### gimp_progress_uninstall ()

    gpointer    gimp_progress_uninstall         (const gchar *progress_callback);

Uninstalls a temporary progress procedure that was installed using `gimp_progress_install()`.

`progress_callback` : | the name of the temporary procedure to uninstall
Returns : | the `user_data` that was passed to `gimp_progress_install()`.

Since GIMP 2.2

### gimp_progress_cancel ()

    gboolean    gimp_progress_cancel            (const gchar *progress_callback);

Cancels a running progress.

This function cancels the currently running progress.

`progress_callback` : | The name of the callback registered for this progress.
Returns : | TRUE on success.

Since GIMP 2.2