| GIMP Library Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
GimpProgressVtable; gboolean gimp_progress_init (const gchar *message); gboolean gimp_progress_init_printf (const gchar *format,...); gboolean gimp_progress_update (gdouble percentage); gboolean gimp_progress_pulse (void); gboolean gimp_progress_set_text (const gchar *message); gboolean gimp_progress_set_text_printf (const gchar *format,...); gboolean gimp_progress_end (void); gint gimp_progress_get_window_handle (void); 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); const gchar * gimp_progress_install_vtable (const GimpProgressVtable *vtable,gpointer user_data); 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);
typedef struct {
void (* start) (const gchar *message,
gboolean cancelable,
gpointer user_data);
void (* end) (gpointer user_data);
void (* set_text) (const gchar *message,
gpointer user_data);
void (* set_value) (gdouble percentage,
gpointer user_data);
void (* pulse) (gpointer user_data);
guint32 (* get_window) (gpointer user_data);
/* Padding for future expansion. Must be initialized with NULL! */
void (* _gimp_reserved1) (void);
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
void (* _gimp_reserved5) (void);
void (* _gimp_reserved6) (void);
void (* _gimp_reserved7) (void);
void (* _gimp_reserved8) (void);
} GimpProgressVtable;
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 to use in the progress dialog. |
Returns : |
TRUE on success. |
gboolean gimp_progress_init_printf (const gchar *format,...);
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.
|
a standard printf() format string
|
|
arguments for format
|
Returns : |
TRUE on success.
|
Since GIMP 2.4
gboolean gimp_progress_update (gdouble percentage);
Updates the progress bar for the current plug-in.
|
Percentage of progress completed (in the range from 0.0 to 1.0). |
Returns : |
TRUE on success. |
gboolean gimp_progress_pulse (void);
Pulses 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. Use this function instead of
gimp_progress_update() if you cannot tell how much progress has been
made. This usually causes the the progress bar to enter \"activity
mode\", where a block bounces back and forth.
Returns : |
TRUE on success. |
Since GIMP 2.4
gboolean gimp_progress_set_text (const gchar *message);
Changes the text in the progress bar for the current plug-in.
This function allows to change the text in the progress bar for the
current plug-in. Unlike gimp_progress_init() it does not change the
displayed value.
|
Message to use in the progress dialog. |
Returns : |
TRUE on success. |
Since GIMP 2.4
gboolean gimp_progress_set_text_printf (const gchar *format,...);
Changes the text in the progress bar for the current plug-in.
This function allows to change the text in the progress bar for the
current plug-in. Unlike gimp_progress_init() it does not change the
displayed value.
|
a standard printf() format string
|
|
arguments for format
|
Returns : |
TRUE on success.
|
Since GIMP 2.4
gboolean gimp_progress_end (void);
Ends the progress bar for the current plug-in.
Ends the progress display for the current plug-in. Most plug-ins don't need to call this, they just exit when the work is done. It is only valid to call this procedure from a plug-in.
Returns : |
TRUE on success. |
Since GIMP 2.4
gint gimp_progress_get_window_handle (void);
Returns the native window ID of the toplevel window this plug-in's progress is displayed in.
This function returns the native window ID of the toplevel window this plug-in\'s progress is displayed in.
Returns : |
The progress bar's toplevel window. |
Since GIMP 2.2
void (*GimpProgressStartCallback) (const gchar *message,gboolean cancelable,gpointer user_data);
GimpProgressStartCallback is deprecated and should not be used in newly-written code.
|
|
|
|
|
void (*GimpProgressEndCallback) (gpointer user_data);
GimpProgressEndCallback is deprecated and should not be used in newly-written code.
|
void (*GimpProgressTextCallback) (const gchar *message,gpointer user_data);
GimpProgressTextCallback is deprecated and should not be used in newly-written code.
|
|
|
void (*GimpProgressValueCallback) (gdouble percentage,gpointer user_data);
GimpProgressValueCallback is deprecated and should not be used in newly-written code.
|
|
|
const gchar * gimp_progress_install_vtable (const GimpProgressVtable *vtable,gpointer user_data);
|
a pointer to a GimpProgressVtable.
|
|
a pointer that is passed as user_data to all vtable functions. |
Returns : |
the name of the temporary procedure that's been installed |
Since GIMP 2.4
const gchar * gimp_progress_install (GimpProgressStartCallback start_callback,GimpProgressEndCallback end_callback,GimpProgressTextCallback text_callback,GimpProgressValueCallback value_callback,gpointer user_data);
gimp_progress_install is deprecated and should not be used in newly-written code.
|
the function to call when progress starts |
|
the function to call when progress finishes |
|
the function to call to change the text |
|
the function to call to change the value |
|
a pointer that is returned when uninstalling the progress |
Returns : |
the name of the temporary procedure that's been installed |
Since GIMP 2.2
gpointer gimp_progress_uninstall (const gchar *progress_callback);
Uninstalls a temporary progress procedure that was installed using
gimp_progress_install().
|
the name of the temporary procedure to uninstall |
Returns : |
the user_data that was passed to gimp_progress_install().
|
Since GIMP 2.2