1
/* LIBGIMP - The GIMP Library
2
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the
18
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, USA.
22
/* NOTE: This file is autogenerated by pdbgen.pl */
30
* @message: Message to use in the progress dialog.
33
* Initializes the progress bar for the current plug-in.
35
* Initializes the progress bar for the current plug-in. It is only
36
* valid to call this procedure from a plug-in.
38
* Returns: TRUE on success.
41
gimp_progress_init (const gchar *message)
43
GimpParam *return_vals;
45
gboolean success = TRUE;
47
return_vals = gimp_run_procedure ("gimp_progress_init",
49
GIMP_PDB_STRING, message,
50
GIMP_PDB_INT32, gimp_default_display (),
53
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
55
gimp_destroy_params (return_vals, nreturn_vals);
61
* gimp_progress_update:
62
* @percentage: Percentage of progress completed which must be between 0.0 and 1.0.
64
* Updates the progress bar for the current plug-in.
66
* Updates the progress bar for the current plug-in. It is only valid
67
* to call this procedure from a plug-in.
69
* Returns: TRUE on success.
72
gimp_progress_update (gdouble percentage)
74
GimpParam *return_vals;
76
gboolean success = TRUE;
78
return_vals = gimp_run_procedure ("gimp_progress_update",
80
GIMP_PDB_FLOAT, percentage,
83
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
85
gimp_destroy_params (return_vals, nreturn_vals);
91
* _gimp_progress_install:
92
* @progress_callback: The callback PDB proc to call.
94
* Installs a progress callback for the current plug-in.
96
* This function installs a temporary PDB procedure which will handle
97
* all progress calls made by this plug-in and any procedure it calls.
98
* Calling this function multiple times simply replaces the old
101
* Returns: TRUE on success.
106
_gimp_progress_install (const gchar *progress_callback)
108
GimpParam *return_vals;
110
gboolean success = TRUE;
112
return_vals = gimp_run_procedure ("gimp_progress_install",
114
GIMP_PDB_STRING, progress_callback,
117
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
119
gimp_destroy_params (return_vals, nreturn_vals);
125
* _gimp_progress_uninstall:
126
* @progress_callback: The name of the callback registered for this progress.
128
* Uninstalls the progress callback for the current plug-in.
130
* This function uninstalls any progress callback installed with
131
* gimp_progress_install() before.
133
* Returns: TRUE on success.
138
_gimp_progress_uninstall (const gchar *progress_callback)
140
GimpParam *return_vals;
142
gboolean success = TRUE;
144
return_vals = gimp_run_procedure ("gimp_progress_uninstall",
146
GIMP_PDB_STRING, progress_callback,
149
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
151
gimp_destroy_params (return_vals, nreturn_vals);
157
* gimp_progress_cancel:
158
* @progress_callback: The name of the callback registered for this progress.
160
* Cancels a running progress.
162
* This function cancels the currently running progress.
164
* Returns: TRUE on success.
169
gimp_progress_cancel (const gchar *progress_callback)
171
GimpParam *return_vals;
173
gboolean success = TRUE;
175
return_vals = gimp_run_procedure ("gimp_progress_cancel",
177
GIMP_PDB_STRING, progress_callback,
180
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
182
gimp_destroy_params (return_vals, nreturn_vals);