wait

wait — Informing the world we are busy

Functions

Includes

#include <app/gwyapp.h>

Description

Functions

gwy_app_wait_start ()

void
gwy_app_wait_start (GtkWindow *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.

Parameters

window

A window.

 

message

A message to show in the wait dialog.

 

gwy_app_wait_finish ()

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.


gwy_app_wait_set_fraction ()

gboolean
gwy_app_wait_set_fraction (gdouble fraction);

Sets the amount of progress the progress bar on the dialog displays.

Parameters

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.


gwy_app_wait_set_message ()

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.

Parameters

message

A mesage to show in the progress dialog.

 

Returns

TRUE if the operation can continue, FALSE if user cancelled it meanwhile.


gwy_app_wait_set_message_prefix ()

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.

Parameters

prefix

The prefix for new messages.

 

Returns

TRUE if the operation can continue, FALSE if user cancelled it meanwhile.


gwy_app_wait_cursor_start ()

void
gwy_app_wait_cursor_start (GtkWindow *window);

Changes the cursor for a window to indicate work.

This function lets the Gtk+ main loop to run.

Parameters

window

A window.

 

Since: 2.3


gwy_app_wait_cursor_finish ()

void
gwy_app_wait_cursor_finish (GtkWindow *window);

Resets the cursor for a window.

This function lets the Gtk+ main loop to run.

If the window cursor was non-default before gwy_app_wait_cursor_start(), it is not restored and has to be set manually. This limitation is due to the nonexistence of a method to obtain the current cursor.

Parameters

window

A window.

 

Since: 2.3

Types and Values