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

« back to all changes in this revision

Viewing changes to app/pdb/grid_cmds.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-10-06 13:30:41 UTC
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: james.westby@ubuntu.com-20081006133041-3panbkcanaymfsmp
Tags: upstream-2.6.0
ImportĀ upstreamĀ versionĀ 2.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* GIMP - The GNU Image Manipulation Program
2
 
 * Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
3
 
 *
4
 
 * This program is free software; you can redistribute it and/or modify
5
 
 * it under the terms of the GNU General Public License as published by
6
 
 * the Free Software Foundation; either version 2 of the License, or
7
 
 * (at your option) any later version.
8
 
 *
9
 
 * This program is distributed in the hope that it will be useful,
10
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
 * GNU General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU General Public License
15
 
 * along with this program; if not, write to the Free Software
16
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
 
 */
18
 
 
19
 
/* NOTE: This file is auto-generated by pdbgen.pl. */
20
 
 
21
 
#include "config.h"
22
 
 
23
 
 
24
 
#include <glib-object.h>
25
 
 
26
 
#include "libgimpbase/gimpbaseenums.h"
27
 
#include "libgimpcolor/gimpcolor.h"
28
 
 
29
 
#include "pdb-types.h"
30
 
#include "gimppdb.h"
31
 
#include "gimpprocedure.h"
32
 
#include "core/gimpparamspecs.h"
33
 
 
34
 
#include "core/gimpgrid.h"
35
 
#include "core/gimpimage-grid.h"
36
 
#include "core/gimpimage.h"
37
 
 
38
 
#include "internal_procs.h"
39
 
 
40
 
 
41
 
static GValueArray *
42
 
image_grid_get_spacing_invoker (GimpProcedure     *procedure,
43
 
                                Gimp              *gimp,
44
 
                                GimpContext       *context,
45
 
                                GimpProgress      *progress,
46
 
                                const GValueArray *args)
47
 
{
48
 
  gboolean success = TRUE;
49
 
  GValueArray *return_vals;
50
 
  GimpImage *image;
51
 
  gdouble xspacing = 0.0;
52
 
  gdouble yspacing = 0.0;
53
 
 
54
 
  image = gimp_value_get_image (&args->values[0], gimp);
55
 
 
56
 
  if (success)
57
 
    {
58
 
      GimpGrid *grid = gimp_image_get_grid (image);
59
 
 
60
 
      if (grid)
61
 
        g_object_get (grid,
62
 
                      "xspacing", &xspacing,
63
 
                      "yspacing", &yspacing,
64
 
                      NULL);
65
 
      else
66
 
        success = FALSE;
67
 
    }
68
 
 
69
 
  return_vals = gimp_procedure_get_return_values (procedure, success);
70
 
 
71
 
  if (success)
72
 
    {
73
 
      g_value_set_double (&return_vals->values[1], xspacing);
74
 
      g_value_set_double (&return_vals->values[2], yspacing);
75
 
    }
76
 
 
77
 
  return return_vals;
78
 
}
79
 
 
80
 
static GValueArray *
81
 
image_grid_set_spacing_invoker (GimpProcedure     *procedure,
82
 
                                Gimp              *gimp,
83
 
                                GimpContext       *context,
84
 
                                GimpProgress      *progress,
85
 
                                const GValueArray *args)
86
 
{
87
 
  gboolean success = TRUE;
88
 
  GimpImage *image;
89
 
  gdouble xspacing;
90
 
  gdouble yspacing;
91
 
 
92
 
  image = gimp_value_get_image (&args->values[0], gimp);
93
 
  xspacing = g_value_get_double (&args->values[1]);
94
 
  yspacing = g_value_get_double (&args->values[2]);
95
 
 
96
 
  if (success)
97
 
    {
98
 
      GimpGrid *grid = gimp_image_get_grid (image);
99
 
 
100
 
      if (grid)
101
 
        g_object_set (grid,
102
 
                      "xspacing", xspacing,
103
 
                      "yspacing", yspacing,
104
 
                      NULL);
105
 
      else
106
 
        success = FALSE;
107
 
    }
108
 
 
109
 
  return gimp_procedure_get_return_values (procedure, success);
110
 
}
111
 
 
112
 
static GValueArray *
113
 
image_grid_get_offset_invoker (GimpProcedure     *procedure,
114
 
                               Gimp              *gimp,
115
 
                               GimpContext       *context,
116
 
                               GimpProgress      *progress,
117
 
                               const GValueArray *args)
118
 
{
119
 
  gboolean success = TRUE;
120
 
  GValueArray *return_vals;
121
 
  GimpImage *image;
122
 
  gdouble xoffset = 0.0;
123
 
  gdouble yoffset = 0.0;
124
 
 
125
 
  image = gimp_value_get_image (&args->values[0], gimp);
126
 
 
127
 
  if (success)
128
 
    {
129
 
      GimpGrid *grid = gimp_image_get_grid (image);
130
 
 
131
 
      if (grid)
132
 
        g_object_get (grid,
133
 
                      "xoffset", &xoffset,
134
 
                      "yoffset", &yoffset,
135
 
                      NULL);
136
 
      else
137
 
        success = FALSE;
138
 
    }
139
 
 
140
 
  return_vals = gimp_procedure_get_return_values (procedure, success);
141
 
 
142
 
  if (success)
143
 
    {
144
 
      g_value_set_double (&return_vals->values[1], xoffset);
145
 
      g_value_set_double (&return_vals->values[2], yoffset);
146
 
    }
147
 
 
148
 
  return return_vals;
149
 
}
150
 
 
151
 
static GValueArray *
152
 
image_grid_set_offset_invoker (GimpProcedure     *procedure,
153
 
                               Gimp              *gimp,
154
 
                               GimpContext       *context,
155
 
                               GimpProgress      *progress,
156
 
                               const GValueArray *args)
157
 
{
158
 
  gboolean success = TRUE;
159
 
  GimpImage *image;
160
 
  gdouble xoffset;
161
 
  gdouble yoffset;
162
 
 
163
 
  image = gimp_value_get_image (&args->values[0], gimp);
164
 
  xoffset = g_value_get_double (&args->values[1]);
165
 
  yoffset = g_value_get_double (&args->values[2]);
166
 
 
167
 
  if (success)
168
 
    {
169
 
      GimpGrid *grid = gimp_image_get_grid (image);
170
 
 
171
 
      if (grid)
172
 
        g_object_set (grid,
173
 
                      "xoffset", xoffset,
174
 
                      "yoffset", yoffset,
175
 
                      NULL);
176
 
      else
177
 
        success = FALSE;
178
 
    }
179
 
 
180
 
  return gimp_procedure_get_return_values (procedure, success);
181
 
}
182
 
 
183
 
static GValueArray *
184
 
image_grid_get_foreground_color_invoker (GimpProcedure     *procedure,
185
 
                                         Gimp              *gimp,
186
 
                                         GimpContext       *context,
187
 
                                         GimpProgress      *progress,
188
 
                                         const GValueArray *args)
189
 
{
190
 
  gboolean success = TRUE;
191
 
  GValueArray *return_vals;
192
 
  GimpImage *image;
193
 
  GimpRGB fgcolor = { 0.0, 0.0, 0.0, 1.0 };
194
 
 
195
 
  image = gimp_value_get_image (&args->values[0], gimp);
196
 
 
197
 
  if (success)
198
 
    {
199
 
      GimpGrid *grid = gimp_image_get_grid (image);
200
 
 
201
 
      if (grid)
202
 
        fgcolor = grid->fgcolor;
203
 
      else
204
 
        success = FALSE;
205
 
    }
206
 
 
207
 
  return_vals = gimp_procedure_get_return_values (procedure, success);
208
 
 
209
 
  if (success)
210
 
    gimp_value_set_rgb (&return_vals->values[1], &fgcolor);
211
 
 
212
 
  return return_vals;
213
 
}
214
 
 
215
 
static GValueArray *
216
 
image_grid_set_foreground_color_invoker (GimpProcedure     *procedure,
217
 
                                         Gimp              *gimp,
218
 
                                         GimpContext       *context,
219
 
                                         GimpProgress      *progress,
220
 
                                         const GValueArray *args)
221
 
{
222
 
  gboolean success = TRUE;
223
 
  GimpImage *image;
224
 
  GimpRGB fgcolor;
225
 
 
226
 
  image = gimp_value_get_image (&args->values[0], gimp);
227
 
  gimp_value_get_rgb (&args->values[1], &fgcolor);
228
 
 
229
 
  if (success)
230
 
    {
231
 
      GimpGrid *grid = gimp_image_get_grid (image);
232
 
 
233
 
      if (grid)
234
 
        g_object_set (grid, "fgcolor", &fgcolor, NULL);
235
 
      else
236
 
        success = FALSE;
237
 
    }
238
 
 
239
 
  return gimp_procedure_get_return_values (procedure, success);
240
 
}
241
 
 
242
 
static GValueArray *
243
 
image_grid_get_background_color_invoker (GimpProcedure     *procedure,
244
 
                                         Gimp              *gimp,
245
 
                                         GimpContext       *context,
246
 
                                         GimpProgress      *progress,
247
 
                                         const GValueArray *args)
248
 
{
249
 
  gboolean success = TRUE;
250
 
  GValueArray *return_vals;
251
 
  GimpImage *image;
252
 
  GimpRGB bgcolor = { 0.0, 0.0, 0.0, 1.0 };
253
 
 
254
 
  image = gimp_value_get_image (&args->values[0], gimp);
255
 
 
256
 
  if (success)
257
 
    {
258
 
      GimpGrid *grid = gimp_image_get_grid (image);
259
 
 
260
 
      if (grid)
261
 
        bgcolor = grid->bgcolor;
262
 
      else
263
 
        success = FALSE;
264
 
    }
265
 
 
266
 
  return_vals = gimp_procedure_get_return_values (procedure, success);
267
 
 
268
 
  if (success)
269
 
    gimp_value_set_rgb (&return_vals->values[1], &bgcolor);
270
 
 
271
 
  return return_vals;
272
 
}
273
 
 
274
 
static GValueArray *
275
 
image_grid_set_background_color_invoker (GimpProcedure     *procedure,
276
 
                                         Gimp              *gimp,
277
 
                                         GimpContext       *context,
278
 
                                         GimpProgress      *progress,
279
 
                                         const GValueArray *args)
280
 
{
281
 
  gboolean success = TRUE;
282
 
  GimpImage *image;
283
 
  GimpRGB bgcolor;
284
 
 
285
 
  image = gimp_value_get_image (&args->values[0], gimp);
286
 
  gimp_value_get_rgb (&args->values[1], &bgcolor);
287
 
 
288
 
  if (success)
289
 
    {
290
 
      GimpGrid *grid = gimp_image_get_grid (image);
291
 
 
292
 
      if (grid)
293
 
        g_object_set (grid, "bgcolor", &bgcolor, NULL);
294
 
      else
295
 
        success = FALSE;
296
 
    }
297
 
 
298
 
  return gimp_procedure_get_return_values (procedure, success);
299
 
}
300
 
 
301
 
static GValueArray *
302
 
image_grid_get_style_invoker (GimpProcedure     *procedure,
303
 
                              Gimp              *gimp,
304
 
                              GimpContext       *context,
305
 
                              GimpProgress      *progress,
306
 
                              const GValueArray *args)
307
 
{
308
 
  gboolean success = TRUE;
309
 
  GValueArray *return_vals;
310
 
  GimpImage *image;
311
 
  gint32 style = 0;
312
 
 
313
 
  image = gimp_value_get_image (&args->values[0], gimp);
314
 
 
315
 
  if (success)
316
 
    {
317
 
      GimpGrid *grid = gimp_image_get_grid (image);
318
 
 
319
 
      if (grid)
320
 
        g_object_get (grid, "style", &style, NULL);
321
 
      else
322
 
        success = FALSE;
323
 
    }
324
 
 
325
 
  return_vals = gimp_procedure_get_return_values (procedure, success);
326
 
 
327
 
  if (success)
328
 
    g_value_set_enum (&return_vals->values[1], style);
329
 
 
330
 
  return return_vals;
331
 
}
332
 
 
333
 
static GValueArray *
334
 
image_grid_set_style_invoker (GimpProcedure     *procedure,
335
 
                              Gimp              *gimp,
336
 
                              GimpContext       *context,
337
 
                              GimpProgress      *progress,
338
 
                              const GValueArray *args)
339
 
{
340
 
  gboolean success = TRUE;
341
 
  GimpImage *image;
342
 
  gint32 style;
343
 
 
344
 
  image = gimp_value_get_image (&args->values[0], gimp);
345
 
  style = g_value_get_enum (&args->values[1]);
346
 
 
347
 
  if (success)
348
 
    {
349
 
      GimpGrid *grid = gimp_image_get_grid (image);
350
 
 
351
 
      if (grid)
352
 
        g_object_set (grid, "style", style, NULL);
353
 
      else
354
 
        success = FALSE;
355
 
    }
356
 
 
357
 
  return gimp_procedure_get_return_values (procedure, success);
358
 
}
359
 
 
360
 
void
361
 
register_grid_procs (GimpPDB *pdb)
362
 
{
363
 
  GimpProcedure *procedure;
364
 
 
365
 
  /*
366
 
   * gimp-image-grid-get-spacing
367
 
   */
368
 
  procedure = gimp_procedure_new (image_grid_get_spacing_invoker);
369
 
  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-image-grid-get-spacing");
370
 
  gimp_procedure_set_static_strings (procedure,
371
 
                                     "gimp-image-grid-get-spacing",
372
 
                                     "Gets the spacing of an image's grid.",
373
 
                                     "This procedure retrieves the horizontal and vertical spacing of an image's grid. It takes the image as parameter.",
374
 
                                     "Sylvain Foret",
375
 
                                     "Sylvain Foret",
376
 
                                     "2005",
377
 
                                     NULL);
378
 
  gimp_procedure_add_argument (procedure,
379
 
                               gimp_param_spec_image_id ("image",
380
 
                                                         "image",
381
 
                                                         "The image",
382
 
                                                         pdb->gimp, FALSE,
383
 
                                                         GIMP_PARAM_READWRITE));
384
 
  gimp_procedure_add_return_value (procedure,
385
 
                                   g_param_spec_double ("xspacing",
386
 
                                                        "xspacing",
387
 
                                                        "The image's grid horizontal spacing",
388
 
                                                        -G_MAXDOUBLE, G_MAXDOUBLE, 0,
389
 
                                                        GIMP_PARAM_READWRITE));
390
 
  gimp_procedure_add_return_value (procedure,
391
 
                                   g_param_spec_double ("yspacing",
392
 
                                                        "yspacing",
393
 
                                                        "The image's grid vertical spacing",
394
 
                                                        -G_MAXDOUBLE, G_MAXDOUBLE, 0,
395
 
                                                        GIMP_PARAM_READWRITE));
396
 
  gimp_pdb_register_procedure (pdb, procedure);
397
 
  g_object_unref (procedure);
398
 
 
399
 
  /*
400
 
   * gimp-image-grid-set-spacing
401
 
   */
402
 
  procedure = gimp_procedure_new (image_grid_set_spacing_invoker);
403
 
  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-image-grid-set-spacing");
404
 
  gimp_procedure_set_static_strings (procedure,
405
 
                                     "gimp-image-grid-set-spacing",
406
 
                                     "Sets the spacing of an image's grid.",
407
 
                                     "This procedure sets the horizontal and vertical spacing of an image's grid.",
408
 
                                     "Sylvain Foret",
409
 
                                     "Sylvain Foret",
410
 
                                     "2005",
411
 
                                     NULL);
412
 
  gimp_procedure_add_argument (procedure,
413
 
                               gimp_param_spec_image_id ("image",
414
 
                                                         "image",
415
 
                                                         "The image",
416
 
                                                         pdb->gimp, FALSE,
417
 
                                                         GIMP_PARAM_READWRITE));
418
 
  gimp_procedure_add_argument (procedure,
419
 
                               g_param_spec_double ("xspacing",
420
 
                                                    "xspacing",
421
 
                                                    "The image's grid horizontal spacing",
422
 
                                                    -G_MAXDOUBLE, G_MAXDOUBLE, 0,
423
 
                                                    GIMP_PARAM_READWRITE));
424
 
  gimp_procedure_add_argument (procedure,
425
 
                               g_param_spec_double ("yspacing",
426
 
                                                    "yspacing",
427
 
                                                    "The image's grid vertical spacing",
428
 
                                                    -G_MAXDOUBLE, G_MAXDOUBLE, 0,
429
 
                                                    GIMP_PARAM_READWRITE));
430
 
  gimp_pdb_register_procedure (pdb, procedure);
431
 
  g_object_unref (procedure);
432
 
 
433
 
  /*
434
 
   * gimp-image-grid-get-offset
435
 
   */
436
 
  procedure = gimp_procedure_new (image_grid_get_offset_invoker);
437
 
  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-image-grid-get-offset");
438
 
  gimp_procedure_set_static_strings (procedure,
439
 
                                     "gimp-image-grid-get-offset",
440
 
                                     "Gets the offset of an image's grid.",
441
 
                                     "This procedure retrieves the horizontal and vertical offset of an image's grid. It takes the image as parameter.",
442
 
                                     "Sylvain Foret",
443
 
                                     "Sylvain Foret",
444
 
                                     "2005",
445
 
                                     NULL);
446
 
  gimp_procedure_add_argument (procedure,
447
 
                               gimp_param_spec_image_id ("image",
448
 
                                                         "image",
449
 
                                                         "The image",
450
 
                                                         pdb->gimp, FALSE,
451
 
                                                         GIMP_PARAM_READWRITE));
452
 
  gimp_procedure_add_return_value (procedure,
453
 
                                   g_param_spec_double ("xoffset",
454
 
                                                        "xoffset",
455
 
                                                        "The image's grid horizontal offset",
456
 
                                                        -G_MAXDOUBLE, G_MAXDOUBLE, 0,
457
 
                                                        GIMP_PARAM_READWRITE));
458
 
  gimp_procedure_add_return_value (procedure,
459
 
                                   g_param_spec_double ("yoffset",
460
 
                                                        "yoffset",
461
 
                                                        "The image's grid vertical offset",
462
 
                                                        -G_MAXDOUBLE, G_MAXDOUBLE, 0,
463
 
                                                        GIMP_PARAM_READWRITE));
464
 
  gimp_pdb_register_procedure (pdb, procedure);
465
 
  g_object_unref (procedure);
466
 
 
467
 
  /*
468
 
   * gimp-image-grid-set-offset
469
 
   */
470
 
  procedure = gimp_procedure_new (image_grid_set_offset_invoker);
471
 
  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-image-grid-set-offset");
472
 
  gimp_procedure_set_static_strings (procedure,
473
 
                                     "gimp-image-grid-set-offset",
474
 
                                     "Sets the offset of an image's grid.",
475
 
                                     "This procedure sets the horizontal and vertical offset of an image's grid.",
476
 
                                     "Sylvain Foret",
477
 
                                     "Sylvain Foret",
478
 
                                     "2005",
479
 
                                     NULL);
480
 
  gimp_procedure_add_argument (procedure,
481
 
                               gimp_param_spec_image_id ("image",
482
 
                                                         "image",
483
 
                                                         "The image",
484
 
                                                         pdb->gimp, FALSE,
485
 
                                                         GIMP_PARAM_READWRITE));
486
 
  gimp_procedure_add_argument (procedure,
487
 
                               g_param_spec_double ("xoffset",
488
 
                                                    "xoffset",
489
 
                                                    "The image's grid horizontal offset",
490
 
                                                    -G_MAXDOUBLE, G_MAXDOUBLE, 0,
491
 
                                                    GIMP_PARAM_READWRITE));
492
 
  gimp_procedure_add_argument (procedure,
493
 
                               g_param_spec_double ("yoffset",
494
 
                                                    "yoffset",
495
 
                                                    "The image's grid vertical offset",
496
 
                                                    -G_MAXDOUBLE, G_MAXDOUBLE, 0,
497
 
                                                    GIMP_PARAM_READWRITE));
498
 
  gimp_pdb_register_procedure (pdb, procedure);
499
 
  g_object_unref (procedure);
500
 
 
501
 
  /*
502
 
   * gimp-image-grid-get-foreground-color
503
 
   */
504
 
  procedure = gimp_procedure_new (image_grid_get_foreground_color_invoker);
505
 
  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-image-grid-get-foreground-color");
506
 
  gimp_procedure_set_static_strings (procedure,
507
 
                                     "gimp-image-grid-get-foreground-color",
508
 
                                     "Sets the foreground color of an image's grid.",
509
 
                                     "This procedure gets the foreground color of an image's grid.",
510
 
                                     "Sylvain Foret",
511
 
                                     "Sylvain Foret",
512
 
                                     "2005",
513
 
                                     NULL);
514
 
  gimp_procedure_add_argument (procedure,
515
 
                               gimp_param_spec_image_id ("image",
516
 
                                                         "image",
517
 
                                                         "The image",
518
 
                                                         pdb->gimp, FALSE,
519
 
                                                         GIMP_PARAM_READWRITE));
520
 
  gimp_procedure_add_return_value (procedure,
521
 
                                   gimp_param_spec_rgb ("fgcolor",
522
 
                                                        "fgcolor",
523
 
                                                        "The image's grid foreground color",
524
 
                                                        TRUE,
525
 
                                                        NULL,
526
 
                                                        GIMP_PARAM_READWRITE));
527
 
  gimp_pdb_register_procedure (pdb, procedure);
528
 
  g_object_unref (procedure);
529
 
 
530
 
  /*
531
 
   * gimp-image-grid-set-foreground-color
532
 
   */
533
 
  procedure = gimp_procedure_new (image_grid_set_foreground_color_invoker);
534
 
  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-image-grid-set-foreground-color");
535
 
  gimp_procedure_set_static_strings (procedure,
536
 
                                     "gimp-image-grid-set-foreground-color",
537
 
                                     "Gets the foreground color of an image's grid.",
538
 
                                     "This procedure sets the foreground color of an image's grid.",
539
 
                                     "Sylvain Foret",
540
 
                                     "Sylvain Foret",
541
 
                                     "2005",
542
 
                                     NULL);
543
 
  gimp_procedure_add_argument (procedure,
544
 
                               gimp_param_spec_image_id ("image",
545
 
                                                         "image",
546
 
                                                         "The image",
547
 
                                                         pdb->gimp, FALSE,
548
 
                                                         GIMP_PARAM_READWRITE));
549
 
  gimp_procedure_add_argument (procedure,
550
 
                               gimp_param_spec_rgb ("fgcolor",
551
 
                                                    "fgcolor",
552
 
                                                    "The new foreground color",
553
 
                                                    TRUE,
554
 
                                                    NULL,
555
 
                                                    GIMP_PARAM_READWRITE));
556
 
  gimp_pdb_register_procedure (pdb, procedure);
557
 
  g_object_unref (procedure);
558
 
 
559
 
  /*
560
 
   * gimp-image-grid-get-background-color
561
 
   */
562
 
  procedure = gimp_procedure_new (image_grid_get_background_color_invoker);
563
 
  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-image-grid-get-background-color");
564
 
  gimp_procedure_set_static_strings (procedure,
565
 
                                     "gimp-image-grid-get-background-color",
566
 
                                     "Sets the background color of an image's grid.",
567
 
                                     "This procedure gets the background color of an image's grid.",
568
 
                                     "Sylvain Foret",
569
 
                                     "Sylvain Foret",
570
 
                                     "2005",
571
 
                                     NULL);
572
 
  gimp_procedure_add_argument (procedure,
573
 
                               gimp_param_spec_image_id ("image",
574
 
                                                         "image",
575
 
                                                         "The image",
576
 
                                                         pdb->gimp, FALSE,
577
 
                                                         GIMP_PARAM_READWRITE));
578
 
  gimp_procedure_add_return_value (procedure,
579
 
                                   gimp_param_spec_rgb ("bgcolor",
580
 
                                                        "bgcolor",
581
 
                                                        "The image's grid background color",
582
 
                                                        TRUE,
583
 
                                                        NULL,
584
 
                                                        GIMP_PARAM_READWRITE));
585
 
  gimp_pdb_register_procedure (pdb, procedure);
586
 
  g_object_unref (procedure);
587
 
 
588
 
  /*
589
 
   * gimp-image-grid-set-background-color
590
 
   */
591
 
  procedure = gimp_procedure_new (image_grid_set_background_color_invoker);
592
 
  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-image-grid-set-background-color");
593
 
  gimp_procedure_set_static_strings (procedure,
594
 
                                     "gimp-image-grid-set-background-color",
595
 
                                     "Gets the background color of an image's grid.",
596
 
                                     "This procedure sets the background color of an image's grid.",
597
 
                                     "Sylvain Foret",
598
 
                                     "Sylvain Foret",
599
 
                                     "2005",
600
 
                                     NULL);
601
 
  gimp_procedure_add_argument (procedure,
602
 
                               gimp_param_spec_image_id ("image",
603
 
                                                         "image",
604
 
                                                         "The image",
605
 
                                                         pdb->gimp, FALSE,
606
 
                                                         GIMP_PARAM_READWRITE));
607
 
  gimp_procedure_add_argument (procedure,
608
 
                               gimp_param_spec_rgb ("bgcolor",
609
 
                                                    "bgcolor",
610
 
                                                    "The new background color",
611
 
                                                    TRUE,
612
 
                                                    NULL,
613
 
                                                    GIMP_PARAM_READWRITE));
614
 
  gimp_pdb_register_procedure (pdb, procedure);
615
 
  g_object_unref (procedure);
616
 
 
617
 
  /*
618
 
   * gimp-image-grid-get-style
619
 
   */
620
 
  procedure = gimp_procedure_new (image_grid_get_style_invoker);
621
 
  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-image-grid-get-style");
622
 
  gimp_procedure_set_static_strings (procedure,
623
 
                                     "gimp-image-grid-get-style",
624
 
                                     "Gets the style of an image's grid.",
625
 
                                     "This procedure retrieves the style of an image's grid.",
626
 
                                     "Sylvain Foret",
627
 
                                     "Sylvain Foret",
628
 
                                     "2005",
629
 
                                     NULL);
630
 
  gimp_procedure_add_argument (procedure,
631
 
                               gimp_param_spec_image_id ("image",
632
 
                                                         "image",
633
 
                                                         "The image",
634
 
                                                         pdb->gimp, FALSE,
635
 
                                                         GIMP_PARAM_READWRITE));
636
 
  gimp_procedure_add_return_value (procedure,
637
 
                                   g_param_spec_enum ("style",
638
 
                                                      "style",
639
 
                                                      "The image's grid style",
640
 
                                                      GIMP_TYPE_GRID_STYLE,
641
 
                                                      GIMP_GRID_DOTS,
642
 
                                                      GIMP_PARAM_READWRITE));
643
 
  gimp_pdb_register_procedure (pdb, procedure);
644
 
  g_object_unref (procedure);
645
 
 
646
 
  /*
647
 
   * gimp-image-grid-set-style
648
 
   */
649
 
  procedure = gimp_procedure_new (image_grid_set_style_invoker);
650
 
  gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-image-grid-set-style");
651
 
  gimp_procedure_set_static_strings (procedure,
652
 
                                     "gimp-image-grid-set-style",
653
 
                                     "Sets the style unit of an image's grid.",
654
 
                                     "This procedure sets the style of an image's grid. It takes the image and the new style as parameters.",
655
 
                                     "Sylvain Foret",
656
 
                                     "Sylvain Foret",
657
 
                                     "2005",
658
 
                                     NULL);
659
 
  gimp_procedure_add_argument (procedure,
660
 
                               gimp_param_spec_image_id ("image",
661
 
                                                         "image",
662
 
                                                         "The image",
663
 
                                                         pdb->gimp, FALSE,
664
 
                                                         GIMP_PARAM_READWRITE));
665
 
  gimp_procedure_add_argument (procedure,
666
 
                               g_param_spec_enum ("style",
667
 
                                                  "style",
668
 
                                                  "The image's grid style",
669
 
                                                  GIMP_TYPE_GRID_STYLE,
670
 
                                                  GIMP_GRID_DOTS,
671
 
                                                  GIMP_PARAM_READWRITE));
672
 
  gimp_pdb_register_procedure (pdb, procedure);
673
 
  g_object_unref (procedure);
674
 
}