![]() |
![]() |
Gwyddion Application Library Reference Manual |
---|
waitwait — Informing the world we are busy |
void gwy_app_wait_start (GtkWidget *window, const gchar *message); void gwy_app_wait_finish (void); gboolean gwy_app_wait_switch_widget (GtkWidget *window, const gchar *message); gboolean gwy_app_wait_set_fraction (gdouble fraction); gboolean gwy_app_wait_set_message (const gchar *message); gboolean gwy_app_wait_set_message_prefix (const gchar *prefix);
void gwy_app_wait_start (GtkWidget *window, const gchar *message);
Starts waiting for a window window, creating a dialog with a progress bar.
Waiting is global, there can be only one at a time.
window : | A window. |
message : | A message to show in the wait dialog. |
void gwy_app_wait_finish (void);
Finishes waiting, closing the dialog.
No function like gwy_app_wait_set_message() should be call after that.
This function must be called even if user cancelled the operation.
gboolean gwy_app_wait_switch_widget (GtkWidget *window, const gchar *message);
Switches the waiting window.
FIXME: This is probably both broken and nonsense.
window : | A window. |
message : | A mesage to show now (NULL for keep the present one). |
Returns : | TRUE if the operation can continue, FALSE if user cancelled it meanwhile. |
gboolean gwy_app_wait_set_fraction (gdouble fraction);
Sets the amount of progress the progress bar on the dialog displays.
fraction : | The progress of the operation, as a number from 0 to 1. |
Returns : | TRUE if the operation can continue, FALSE if user cancelled it meanwhile. |
gboolean gwy_app_wait_set_message (const gchar *message);
Sets the message shown on the progress dialog.
See also gwy_app_wait_set_message_prefix() which makes this function more usable directly as a callback.
message : | A mesage to show in the progress dialog. |
Returns : | TRUE if the operation can continue, FALSE if user cancelled it meanwhile. |
gboolean gwy_app_wait_set_message_prefix (const gchar *prefix);
Sets prefix for the messages shown in the progress dialog.
The prefix will take effect in the next gwy_app_wait_set_message() call.
prefix : | The prefix for new messages. |
Returns : | TRUE if the operation can continue, FALSE if user cancelled it meanwhile. |
<< Unitool |