gimpprogress

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

Functions

Types and Values

Description

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

Functions

GimpProgressVtableEndFunc ()

void
(*GimpProgressVtableEndFunc) (gpointer user_data);

Ends the progress

Parameters

user_data

User data.

[closure]

GimpProgressVtableGetWindowFunc ()

guint32
(*GimpProgressVtableGetWindowFunc) (gpointer user_data);

Parameters

user_data

User data.

[closure]

Returns

the ID of the window where the progress is displayed.


GimpProgressVtablePulseFunc ()

void
(*GimpProgressVtablePulseFunc) (gpointer user_data);

Makes the progress pulse

Parameters

user_data

User data.

[closure]

GimpProgressVtableSetTextFunc ()

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

Sets a new text on the progress.

Parameters

message

The new text

 

user_data

User data.

[closure]

GimpProgressVtableSetValueFunc ()

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

Sets a new percentage on the progress.

Parameters

percentage

The progress in percent

 

user_data

User data.

[closure]

GimpProgressVtableStartFunc ()

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

Starts the progress

Parameters

message

The message to show

 

cancelable

Whether the procedure is cancelable

 

user_data

User data.

[closure]

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.

Parameters

message

Message to use in the progress dialog.

 

Returns

TRUE on success.


gimp_progress_init_printf ()

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.

Parameters

format

a standard printf() format string

 

...

arguments for format

 

Returns

TRUE on success.

Since: 2.4


gimp_progress_update ()

gboolean
gimp_progress_update (gdouble percentage);

Updates the progress bar for the current plug-in.

Parameters

percentage

Percentage of progress completed (in the range from 0.0 to 1.0).

 

Returns

TRUE on success.


gimp_progress_pulse ()

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: 2.4


gimp_progress_set_text ()

gboolean
gimp_progress_set_text (const gchar *message);

Changes the text in the progress bar for the current plug-in.

This function changes the text in the progress bar for the current plug-in. Unlike gimp_progress_init() it does not change the displayed value.

Parameters

message

Message to use in the progress dialog.

 

Returns

TRUE on success.

Since: 2.4


gimp_progress_set_text_printf ()

gboolean
gimp_progress_set_text_printf (const gchar *format,
                               ...);

Changes the text in the progress bar for the current plug-in.

This function changes the text in the progress bar for the current plug-in. Unlike gimp_progress_init() it does not change the displayed value.

Parameters

format

a standard printf() format string

 

...

arguments for format

 

Returns

TRUE on success.

Since: 2.4


gimp_progress_end ()

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: 2.4


gimp_progress_get_window_handle ()

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: 2.2


gimp_progress_install_vtable ()

const gchar *
gimp_progress_install_vtable (const GimpProgressVtable *vtable,
                              gpointer user_data,
                              GDestroyNotify user_data_destroy);

Parameters

vtable

a pointer to a GimpProgressVtable .

 

user_data

a pointer that is passed as user_data to all vtable functions.

 

user_data_destroy

destroy function for user_data , or NULL.

[nullable]

Returns

the name of the temporary procedure that's been installed

Since: 2.4


gimp_progress_uninstall ()

void
gimp_progress_uninstall (const gchar *progress_callback);

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

Parameters

progress_callback

the name of the temporary procedure to uninstall

 

Since: 2.2


gimp_progress_cancel ()

gboolean
gimp_progress_cancel (const gchar *progress_callback);

Cancels a running progress.

This function cancels the currently running progress.

Parameters

progress_callback

The name of the callback registered for this progress.

 

Returns

TRUE on success.

Since: 2.2

Types and Values

struct GimpProgressVtable

struct GimpProgressVtable {
  GimpProgressVtableStartFunc     start;
  GimpProgressVtableEndFunc       end;
  GimpProgressVtableSetTextFunc   set_text;
  GimpProgressVtableSetValueFunc  set_value;
  GimpProgressVtablePulseFunc     pulse;
  GimpProgressVtableGetWindowFunc get_window;

  /* 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);
};

Members

GimpProgressVtableStartFunc start;

starts the progress.

 

GimpProgressVtableEndFunc end;

ends the progress.

 

GimpProgressVtableSetTextFunc set_text;

sets a new text on the progress.

 

GimpProgressVtableSetValueFunc set_value;

sets a new percentage on the progress.

 

GimpProgressVtablePulseFunc pulse;

makes the progress pulse.

 

GimpProgressVtableGetWindowFunc get_window;

returns the ID of the window where the progress is displayed.

 

_gimp_reserved1 ()

reserved pointer for future expansion.

 

_gimp_reserved2 ()

reserved pointer for future expansion.

 

_gimp_reserved3 ()

reserved pointer for future expansion.

 

_gimp_reserved4 ()

reserved pointer for future expansion.

 

_gimp_reserved5 ()

reserved pointer for future expansion.

 

_gimp_reserved6 ()

reserved pointer for future expansion.

 

_gimp_reserved7 ()

reserved pointer for future expansion.

 

_gimp_reserved8 ()

reserved pointer for future expansion.