GimpPreviewProgressUpdater

Name

GimpPreviewProgressUpdater -- A simpler wrapper to show progress for both the GIMP and the GimpPreview.

Synopsis



void        gimp_preview_progress_updater_init_for_gimp
                                            (GimpPreviewProgressUpdater *updater);
void        gimp_preview_progress_updater_init_for_preview
                                            (GimpPreviewProgressUpdater *updater,
                                             GimpPreview *preview);
gboolean    gimp_preview_progress_updater_set_fraction
                                            (GimpPreviewProgressUpdater *updater,
                                             gdouble fraction);

Description

This is a simple wrapper object that can be used by a rendering function to show its progress. The rendering function can simply call progress_updater_set_fraction() without having to know if it is rendering for the Gimp or to a GimpPreview. Simply pass the GimpPreviewProgressUpdater as argument to the rendering function. Before this you must initialize the GimpPreviewProgressUpdater with either gimp_preview_progress_updater_init_for_preview() or gimp_preview_progress_updater_init_for_gimp().

Details

gimp_preview_progress_updater_init_for_gimp ()

void        gimp_preview_progress_updater_init_for_gimp
                                            (GimpPreviewProgressUpdater *updater);

Initialize the GimpPreviewProgressUpdater to use the GIMP for showing the progress.


gimp_preview_progress_updater_init_for_preview ()

void        gimp_preview_progress_updater_init_for_preview
                                            (GimpPreviewProgressUpdater *updater,
                                             GimpPreview *preview);

Initialize the GimpPreviewProgressUpdater to use the preview for showing the progress.

updater : A GimpPreviewProgressUpdater.
preview : The GimpPreview.


gimp_preview_progress_updater_set_fraction ()

gboolean    gimp_preview_progress_updater_set_fraction
                                            (GimpPreviewProgressUpdater *updater,
                                             gdouble fraction);

Update the progress bar to fraction completed.

updater : A GimpPreviewProgressUpdater.
fraction : The fraction that has been completed. This must be a value in the range 0 to 1.
Returns : Returns FALSE when the rendering progress should halt.

See Also

GimpPreview.