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

« back to all changes in this revision

Viewing changes to libgimp/gimpbrushes_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 <string.h>
27
27
 
28
28
#include "gimp.h"
 
29
#undef GIMP_DISABLE_DEPRECATED
 
30
#undef __GIMP_BRUSHES_PDB_H__
 
31
#include "gimpbrushes_pdb.h"
29
32
 
30
33
/**
31
34
 * gimp_brushes_refresh:
44
47
  gint nreturn_vals;
45
48
  gboolean success = TRUE;
46
49
 
47
 
  return_vals = gimp_run_procedure ("gimp_brushes_refresh",
48
 
                                    &nreturn_vals,
49
 
                                    GIMP_PDB_END);
 
50
  return_vals = gimp_run_procedure ("gimp-brushes-refresh",
 
51
                                    &nreturn_vals,
 
52
                                    GIMP_PDB_END);
50
53
 
51
54
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
52
55
 
64
67
 *
65
68
 * This procedure returns a complete listing of available GIMP brushes.
66
69
 * Each name returned can be used as input to the
67
 
 * 'gimp_context_set_brush' procedure.
 
70
 * gimp_context_set_brush() procedure.
68
71
 *
69
72
 * Returns: The list of brush names.
70
73
 */
71
74
gchar **
72
75
gimp_brushes_get_list (const gchar *filter,
73
 
                       gint        *num_brushes)
 
76
                       gint        *num_brushes)
74
77
{
75
78
  GimpParam *return_vals;
76
79
  gint nreturn_vals;
77
80
  gchar **brush_list = NULL;
78
81
  gint i;
79
82
 
80
 
  return_vals = gimp_run_procedure ("gimp_brushes_get_list",
81
 
                                    &nreturn_vals,
82
 
                                    GIMP_PDB_STRING, filter,
83
 
                                    GIMP_PDB_END);
 
83
  return_vals = gimp_run_procedure ("gimp-brushes-get-list",
 
84
                                    &nreturn_vals,
 
85
                                    GIMP_PDB_STRING, filter,
 
86
                                    GIMP_PDB_END);
84
87
 
85
88
  *num_brushes = 0;
86
89
 
89
92
      *num_brushes = return_vals[1].data.d_int32;
90
93
      brush_list = g_new (gchar *, *num_brushes);
91
94
      for (i = 0; i < *num_brushes; i++)
92
 
        brush_list[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
 
95
        brush_list[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
93
96
    }
94
97
 
95
98
  gimp_destroy_params (return_vals, nreturn_vals);
109
112
 */
110
113
gchar *
111
114
gimp_brushes_get_brush (gint *width,
112
 
                        gint *height,
113
 
                        gint *spacing)
 
115
                        gint *height,
 
116
                        gint *spacing)
114
117
{
115
118
  GimpParam *return_vals;
116
119
  gint nreturn_vals;
117
120
  gchar *name = NULL;
118
121
 
119
 
  return_vals = gimp_run_procedure ("gimp_brushes_get_brush",
120
 
                                    &nreturn_vals,
121
 
                                    GIMP_PDB_END);
 
122
  return_vals = gimp_run_procedure ("gimp-brushes-get-brush",
 
123
                                    &nreturn_vals,
 
124
                                    GIMP_PDB_END);
122
125
 
123
126
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
124
127
    {
147
150
  gint nreturn_vals;
148
151
  gint spacing = 0;
149
152
 
150
 
  return_vals = gimp_run_procedure ("gimp_brushes_get_spacing",
151
 
                                    &nreturn_vals,
152
 
                                    GIMP_PDB_END);
 
153
  return_vals = gimp_run_procedure ("gimp-brushes-get-spacing",
 
154
                                    &nreturn_vals,
 
155
                                    GIMP_PDB_END);
153
156
 
154
157
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
155
158
    spacing = return_vals[1].data.d_int32;
174
177
  gint nreturn_vals;
175
178
  gboolean success = TRUE;
176
179
 
177
 
  return_vals = gimp_run_procedure ("gimp_brushes_set_spacing",
178
 
                                    &nreturn_vals,
179
 
                                    GIMP_PDB_INT32, spacing,
180
 
                                    GIMP_PDB_END);
 
180
  return_vals = gimp_run_procedure ("gimp-brushes-set-spacing",
 
181
                                    &nreturn_vals,
 
182
                                    GIMP_PDB_INT32, spacing,
 
183
                                    GIMP_PDB_END);
181
184
 
182
185
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
183
186
 
203
206
 */
204
207
gchar *
205
208
gimp_brushes_get_brush_data (const gchar           *name,
206
 
                             gdouble               *opacity,
207
 
                             gint                  *spacing,
208
 
                             GimpLayerModeEffects  *paint_mode,
209
 
                             gint                  *width,
210
 
                             gint                  *height,
211
 
                             gint                  *length,
212
 
                             guint8               **mask_data)
 
209
                             gdouble               *opacity,
 
210
                             gint                  *spacing,
 
211
                             GimpLayerModeEffects  *paint_mode,
 
212
                             gint                  *width,
 
213
                             gint                  *height,
 
214
                             gint                  *length,
 
215
                             guint8               **mask_data)
213
216
{
214
217
  GimpParam *return_vals;
215
218
  gint nreturn_vals;
216
 
  gchar *ret_name = NULL;
 
219
  gchar *actual_name = NULL;
217
220
 
218
 
  return_vals = gimp_run_procedure ("gimp_brushes_get_brush_data",
219
 
                                    &nreturn_vals,
220
 
                                    GIMP_PDB_STRING, name,
221
 
                                    GIMP_PDB_END);
 
221
  return_vals = gimp_run_procedure ("gimp-brushes-get-brush-data",
 
222
                                    &nreturn_vals,
 
223
                                    GIMP_PDB_STRING, name,
 
224
                                    GIMP_PDB_END);
222
225
 
223
226
  *length = 0;
224
227
 
225
228
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
226
229
    {
227
 
      ret_name = g_strdup (return_vals[1].data.d_string);
 
230
      actual_name = g_strdup (return_vals[1].data.d_string);
228
231
      *opacity = return_vals[2].data.d_float;
229
232
      *spacing = return_vals[3].data.d_int32;
230
233
      *paint_mode = return_vals[4].data.d_int32;
232
235
      *height = return_vals[6].data.d_int32;
233
236
      *length = return_vals[7].data.d_int32;
234
237
      *mask_data = g_new (guint8, *length);
235
 
      memcpy (*mask_data, return_vals[8].data.d_int8array,
236
 
              *length * sizeof (guint8));
 
238
      memcpy (*mask_data,
 
239
              return_vals[8].data.d_int8array,
 
240
              *length * sizeof (guint8));
237
241
    }
238
242
 
239
243
  gimp_destroy_params (return_vals, nreturn_vals);
240
244
 
241
 
  return ret_name;
 
245
  return actual_name;
242
246
}