~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to libgimp/gimpprogress_pdb.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * Boston, MA 02111-1307, USA.
20
20
 */
21
21
 
22
 
/* NOTE: This file is autogenerated by pdbgen.pl */
 
22
/* NOTE: This file is auto-generated by pdbgen.pl */
23
23
 
24
24
#include "config.h"
25
25
 
26
26
#include "gimp.h"
27
27
 
28
28
/**
29
 
 * gimp_progress_init:
 
29
 * _gimp_progress_init:
30
30
 * @message: Message to use in the progress dialog.
31
 
 
 
31
 * @gdisplay_ID: GimpDisplay to update progressbar in, or -1 for a seperate window.
32
32
 *
33
33
 * Initializes the progress bar for the current plug-in.
34
34
 *
38
38
 * Returns: TRUE on success.
39
39
 */
40
40
gboolean
41
 
gimp_progress_init (const gchar *message)
 
41
_gimp_progress_init (const gchar *message,
 
42
                     gint32       gdisplay_ID)
42
43
{
43
44
  GimpParam *return_vals;
44
45
  gint nreturn_vals;
45
46
  gboolean success = TRUE;
46
47
 
47
 
  return_vals = gimp_run_procedure ("gimp_progress_init",
48
 
                                    &nreturn_vals,
49
 
                                    GIMP_PDB_STRING, message,
50
 
                                    GIMP_PDB_INT32, gimp_default_display (),
51
 
                                    GIMP_PDB_END);
 
48
  return_vals = gimp_run_procedure ("gimp-progress-init",
 
49
                                    &nreturn_vals,
 
50
                                    GIMP_PDB_STRING, message,
 
51
                                    GIMP_PDB_DISPLAY, gdisplay_ID,
 
52
                                    GIMP_PDB_END);
52
53
 
53
54
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
54
55
 
58
59
}
59
60
 
60
61
/**
61
 
 * gimp_progress_update:
 
62
 * _gimp_progress_update:
62
63
 * @percentage: Percentage of progress completed which must be between 0.0 and 1.0.
63
64
 *
64
65
 * Updates the progress bar for the current plug-in.
69
70
 * Returns: TRUE on success.
70
71
 */
71
72
gboolean
72
 
gimp_progress_update (gdouble percentage)
73
 
{
74
 
  GimpParam *return_vals;
75
 
  gint nreturn_vals;
76
 
  gboolean success = TRUE;
77
 
 
78
 
  return_vals = gimp_run_procedure ("gimp_progress_update",
79
 
                                    &nreturn_vals,
80
 
                                    GIMP_PDB_FLOAT, percentage,
81
 
                                    GIMP_PDB_END);
82
 
 
83
 
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
84
 
 
85
 
  gimp_destroy_params (return_vals, nreturn_vals);
86
 
 
87
 
  return success;
 
73
_gimp_progress_update (gdouble percentage)
 
74
{
 
75
  GimpParam *return_vals;
 
76
  gint nreturn_vals;
 
77
  gboolean success = TRUE;
 
78
 
 
79
  return_vals = gimp_run_procedure ("gimp-progress-update",
 
80
                                    &nreturn_vals,
 
81
                                    GIMP_PDB_FLOAT, percentage,
 
82
                                    GIMP_PDB_END);
 
83
 
 
84
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
 
85
 
 
86
  gimp_destroy_params (return_vals, nreturn_vals);
 
87
 
 
88
  return success;
 
89
}
 
90
 
 
91
/**
 
92
 * gimp_progress_pulse:
 
93
 *
 
94
 * Pulses the progress bar for the current plug-in.
 
95
 *
 
96
 * Updates the progress bar for the current plug-in. It is only valid
 
97
 * to call this procedure from a plug-in. Use this function instead of
 
98
 * gimp_progress_update() if you cannot tell how much progress has been
 
99
 * made. This usually causes the the progress bar to enter \"activity
 
100
 * mode\", where a block bounces back and forth.
 
101
 *
 
102
 * Returns: TRUE on success.
 
103
 *
 
104
 * Since: GIMP 2.4
 
105
 */
 
106
gboolean
 
107
gimp_progress_pulse (void)
 
108
{
 
109
  GimpParam *return_vals;
 
110
  gint nreturn_vals;
 
111
  gboolean success = TRUE;
 
112
 
 
113
  return_vals = gimp_run_procedure ("gimp-progress-pulse",
 
114
                                    &nreturn_vals,
 
115
                                    GIMP_PDB_END);
 
116
 
 
117
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
 
118
 
 
119
  gimp_destroy_params (return_vals, nreturn_vals);
 
120
 
 
121
  return success;
 
122
}
 
123
 
 
124
/**
 
125
 * gimp_progress_set_text:
 
126
 * @message: Message to use in the progress dialog.
 
127
 *
 
128
 * Changes the text in the progress bar for the current plug-in.
 
129
 *
 
130
 * This function allows to change the text in the progress bar for the
 
131
 * current plug-in. Unlike gimp_progress_init() it does not change the
 
132
 * displayed value.
 
133
 *
 
134
 * Returns: TRUE on success.
 
135
 *
 
136
 * Since: GIMP 2.4
 
137
 */
 
138
gboolean
 
139
gimp_progress_set_text (const gchar *message)
 
140
{
 
141
  GimpParam *return_vals;
 
142
  gint nreturn_vals;
 
143
  gboolean success = TRUE;
 
144
 
 
145
  return_vals = gimp_run_procedure ("gimp-progress-set-text",
 
146
                                    &nreturn_vals,
 
147
                                    GIMP_PDB_STRING, message,
 
148
                                    GIMP_PDB_END);
 
149
 
 
150
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
 
151
 
 
152
  gimp_destroy_params (return_vals, nreturn_vals);
 
153
 
 
154
  return success;
 
155
}
 
156
 
 
157
/**
 
158
 * gimp_progress_get_window_handle:
 
159
 *
 
160
 * Returns the native window ID of the toplevel window this plug-in's
 
161
 * progress is displayed in.
 
162
 *
 
163
 * This function returns the native window ID of the toplevel window
 
164
 * this plug-in\'s progress is displayed in.
 
165
 *
 
166
 * Returns: The progress bar's toplevel window.
 
167
 *
 
168
 * Since: GIMP 2.2
 
169
 */
 
170
gint
 
171
gimp_progress_get_window_handle (void)
 
172
{
 
173
  GimpParam *return_vals;
 
174
  gint nreturn_vals;
 
175
  gint window = 0;
 
176
 
 
177
  return_vals = gimp_run_procedure ("gimp-progress-get-window-handle",
 
178
                                    &nreturn_vals,
 
179
                                    GIMP_PDB_END);
 
180
 
 
181
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
 
182
    window = return_vals[1].data.d_int32;
 
183
 
 
184
  gimp_destroy_params (return_vals, nreturn_vals);
 
185
 
 
186
  return window;
88
187
}
89
188
 
90
189
/**
109
208
  gint nreturn_vals;
110
209
  gboolean success = TRUE;
111
210
 
112
 
  return_vals = gimp_run_procedure ("gimp_progress_install",
113
 
                                    &nreturn_vals,
114
 
                                    GIMP_PDB_STRING, progress_callback,
115
 
                                    GIMP_PDB_END);
 
211
  return_vals = gimp_run_procedure ("gimp-progress-install",
 
212
                                    &nreturn_vals,
 
213
                                    GIMP_PDB_STRING, progress_callback,
 
214
                                    GIMP_PDB_END);
116
215
 
117
216
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
118
217
 
141
240
  gint nreturn_vals;
142
241
  gboolean success = TRUE;
143
242
 
144
 
  return_vals = gimp_run_procedure ("gimp_progress_uninstall",
145
 
                                    &nreturn_vals,
146
 
                                    GIMP_PDB_STRING, progress_callback,
147
 
                                    GIMP_PDB_END);
 
243
  return_vals = gimp_run_procedure ("gimp-progress-uninstall",
 
244
                                    &nreturn_vals,
 
245
                                    GIMP_PDB_STRING, progress_callback,
 
246
                                    GIMP_PDB_END);
148
247
 
149
248
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
150
249
 
172
271
  gint nreturn_vals;
173
272
  gboolean success = TRUE;
174
273
 
175
 
  return_vals = gimp_run_procedure ("gimp_progress_cancel",
176
 
                                    &nreturn_vals,
177
 
                                    GIMP_PDB_STRING, progress_callback,
178
 
                                    GIMP_PDB_END);
 
274
  return_vals = gimp_run_procedure ("gimp-progress-cancel",
 
275
                                    &nreturn_vals,
 
276
                                    GIMP_PDB_STRING, progress_callback,
 
277
                                    GIMP_PDB_END);
179
278
 
180
279
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
181
280