1 /* GIMP - The GNU Image Manipulation Program
2  * Copyright (C) 1995 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 3 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, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __GIMP_PARAM_SPECS_H__
19 #define __GIMP_PARAM_SPECS_H__
20 
21 
22 /*
23  * Keep in sync with libgimpconfig/gimpconfig-params.h
24  */
25 #define GIMP_PARAM_NO_VALIDATE (1 << (6 + G_PARAM_USER_SHIFT))
26 
27 
28 /*
29  * GIMP_TYPE_INT32
30  */
31 
32 #define GIMP_TYPE_INT32               (gimp_int32_get_type ())
33 #define GIMP_VALUE_HOLDS_INT32(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
34                                        GIMP_TYPE_INT32))
35 
36 GType   gimp_int32_get_type           (void) G_GNUC_CONST;
37 
38 
39 /*
40  * GIMP_TYPE_PARAM_INT32
41  */
42 
43 #define GIMP_TYPE_PARAM_INT32           (gimp_param_int32_get_type ())
44 #define GIMP_PARAM_SPEC_INT32(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_INT32, GimpParamSpecInt32))
45 #define GIMP_IS_PARAM_SPEC_INT32(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_INT32))
46 
47 typedef struct _GimpParamSpecInt32 GimpParamSpecInt32;
48 
49 struct _GimpParamSpecInt32
50 {
51   GParamSpecInt parent_instance;
52 };
53 
54 GType        gimp_param_int32_get_type (void) G_GNUC_CONST;
55 
56 GParamSpec * gimp_param_spec_int32     (const gchar *name,
57                                         const gchar *nick,
58                                         const gchar *blurb,
59                                         gint         minimum,
60                                         gint         maximum,
61                                         gint         default_value,
62                                         GParamFlags  flags);
63 
64 
65 /*
66  * GIMP_TYPE_INT16
67  */
68 
69 #define GIMP_TYPE_INT16               (gimp_int16_get_type ())
70 #define GIMP_VALUE_HOLDS_INT16(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
71                                        GIMP_TYPE_INT16))
72 
73 GType   gimp_int16_get_type           (void) G_GNUC_CONST;
74 
75 
76 /*
77  * GIMP_TYPE_PARAM_INT16
78  */
79 
80 #define GIMP_TYPE_PARAM_INT16           (gimp_param_int16_get_type ())
81 #define GIMP_PARAM_SPEC_INT16(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_INT16, GimpParamSpecInt16))
82 #define GIMP_IS_PARAM_SPEC_INT16(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_INT16))
83 
84 typedef struct _GimpParamSpecInt16 GimpParamSpecInt16;
85 
86 struct _GimpParamSpecInt16
87 {
88   GParamSpecInt parent_instance;
89 };
90 
91 GType        gimp_param_int16_get_type (void) G_GNUC_CONST;
92 
93 GParamSpec * gimp_param_spec_int16     (const gchar *name,
94                                         const gchar *nick,
95                                         const gchar *blurb,
96                                         gint         minimum,
97                                         gint         maximum,
98                                         gint         default_value,
99                                         GParamFlags  flags);
100 
101 
102 /*
103  * GIMP_TYPE_INT8
104  */
105 
106 #define GIMP_TYPE_INT8               (gimp_int8_get_type ())
107 #define GIMP_VALUE_HOLDS_INT8(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
108                                       GIMP_TYPE_INT8))
109 
110 GType   gimp_int8_get_type           (void) G_GNUC_CONST;
111 
112 
113 /*
114  * GIMP_TYPE_PARAM_INT8
115  */
116 
117 #define GIMP_TYPE_PARAM_INT8           (gimp_param_int8_get_type ())
118 #define GIMP_PARAM_SPEC_INT8(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_INT8, GimpParamSpecInt8))
119 #define GIMP_IS_PARAM_SPEC_INT8(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_INT8))
120 
121 typedef struct _GimpParamSpecInt8 GimpParamSpecInt8;
122 
123 struct _GimpParamSpecInt8
124 {
125   GParamSpecUInt parent_instance;
126 };
127 
128 GType        gimp_param_int8_get_type (void) G_GNUC_CONST;
129 
130 GParamSpec * gimp_param_spec_int8     (const gchar *name,
131                                        const gchar *nick,
132                                        const gchar *blurb,
133                                        guint        minimum,
134                                        guint        maximum,
135                                        guint        default_value,
136                                        GParamFlags  flags);
137 
138 
139 /*
140  * GIMP_TYPE_PARAM_STRING
141  */
142 
143 #define GIMP_TYPE_PARAM_STRING           (gimp_param_string_get_type ())
144 #define GIMP_PARAM_SPEC_STRING(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_STRING, GimpParamSpecString))
145 #define GIMP_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_STRING))
146 
147 typedef struct _GimpParamSpecString GimpParamSpecString;
148 
149 struct _GimpParamSpecString
150 {
151   GParamSpecString parent_instance;
152 
153   guint            allow_non_utf8 : 1;
154   guint            non_empty      : 1;
155 };
156 
157 GType        gimp_param_string_get_type (void) G_GNUC_CONST;
158 
159 GParamSpec * gimp_param_spec_string     (const gchar *name,
160                                          const gchar *nick,
161                                          const gchar *blurb,
162                                          gboolean     allow_non_utf8,
163                                          gboolean     null_ok,
164                                          gboolean     non_empty,
165                                          const gchar *default_value,
166                                          GParamFlags  flags);
167 
168 
169 /*
170  * GIMP_TYPE_PARAM_ENUM
171  */
172 
173 #define GIMP_TYPE_PARAM_ENUM           (gimp_param_enum_get_type ())
174 #define GIMP_PARAM_SPEC_ENUM(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_ENUM, GimpParamSpecEnum))
175 
176 #define GIMP_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_ENUM))
177 
178 typedef struct _GimpParamSpecEnum GimpParamSpecEnum;
179 
180 struct _GimpParamSpecEnum
181 {
182   GParamSpecEnum  parent_instance;
183 
184   GSList         *excluded_values;
185 };
186 
187 GType        gimp_param_enum_get_type     (void) G_GNUC_CONST;
188 
189 GParamSpec * gimp_param_spec_enum         (const gchar       *name,
190                                            const gchar       *nick,
191                                            const gchar       *blurb,
192                                            GType              enum_type,
193                                            gint               default_value,
194                                            GParamFlags        flags);
195 
196 void   gimp_param_spec_enum_exclude_value (GimpParamSpecEnum *espec,
197                                            gint               value);
198 
199 
200 /*
201  * GIMP_TYPE_IMAGE_ID
202  */
203 
204 #define GIMP_TYPE_IMAGE_ID               (gimp_image_id_get_type ())
205 #define GIMP_VALUE_HOLDS_IMAGE_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
206                                           GIMP_TYPE_IMAGE_ID))
207 
208 GType   gimp_image_id_get_type           (void) G_GNUC_CONST;
209 
210 
211 /*
212  * GIMP_TYPE_PARAM_IMAGE_ID
213  */
214 
215 #define GIMP_TYPE_PARAM_IMAGE_ID           (gimp_param_image_id_get_type ())
216 #define GIMP_PARAM_SPEC_IMAGE_ID(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_IMAGE_ID, GimpParamSpecImageID))
217 #define GIMP_IS_PARAM_SPEC_IMAGE_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_IMAGE_ID))
218 
219 typedef struct _GimpParamSpecImageID GimpParamSpecImageID;
220 
221 struct _GimpParamSpecImageID
222 {
223   GParamSpecInt  parent_instance;
224 
225   Gimp          *gimp;
226   gboolean       none_ok;
227 };
228 
229 GType        gimp_param_image_id_get_type (void) G_GNUC_CONST;
230 
231 GParamSpec * gimp_param_spec_image_id     (const gchar  *name,
232                                            const gchar  *nick,
233                                            const gchar  *blurb,
234                                            Gimp         *gimp,
235                                            gboolean      none_ok,
236                                            GParamFlags   flags);
237 
238 GimpImage  * gimp_value_get_image         (const GValue *value,
239                                            Gimp         *gimp);
240 void         gimp_value_set_image         (GValue       *value,
241                                            GimpImage    *image);
242 
243 
244 
245 /*
246  * GIMP_TYPE_ITEM_ID
247  */
248 
249 #define GIMP_TYPE_ITEM_ID               (gimp_item_id_get_type ())
250 #define GIMP_VALUE_HOLDS_ITEM_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
251                                          GIMP_TYPE_ITEM_ID))
252 
253 GType   gimp_item_id_get_type           (void) G_GNUC_CONST;
254 
255 
256 /*
257  * GIMP_TYPE_PARAM_ITEM_ID
258  */
259 
260 #define GIMP_TYPE_PARAM_ITEM_ID           (gimp_param_item_id_get_type ())
261 #define GIMP_PARAM_SPEC_ITEM_ID(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_ITEM_ID, GimpParamSpecItemID))
262 #define GIMP_IS_PARAM_SPEC_ITEM_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_ITEM_ID))
263 
264 typedef struct _GimpParamSpecItemID GimpParamSpecItemID;
265 
266 struct _GimpParamSpecItemID
267 {
268   GParamSpecInt  parent_instance;
269 
270   Gimp          *gimp;
271   GType          item_type;
272   gboolean       none_ok;
273 };
274 
275 GType        gimp_param_item_id_get_type (void) G_GNUC_CONST;
276 
277 GParamSpec * gimp_param_spec_item_id     (const gchar  *name,
278                                           const gchar  *nick,
279                                           const gchar  *blurb,
280                                           Gimp         *gimp,
281                                           gboolean      none_ok,
282                                           GParamFlags   flags);
283 
284 GimpItem   * gimp_value_get_item         (const GValue *value,
285                                           Gimp         *gimp);
286 void         gimp_value_set_item         (GValue       *value,
287                                           GimpItem     *item);
288 
289 
290 /*
291  * GIMP_TYPE_DRAWABLE_ID
292  */
293 
294 #define GIMP_TYPE_DRAWABLE_ID               (gimp_drawable_id_get_type ())
295 #define GIMP_VALUE_HOLDS_DRAWABLE_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
296                                              GIMP_TYPE_DRAWABLE_ID))
297 
298 GType   gimp_drawable_id_get_type           (void) G_GNUC_CONST;
299 
300 
301 /*
302  * GIMP_TYPE_PARAM_DRAWABLE_ID
303  */
304 
305 #define GIMP_TYPE_PARAM_DRAWABLE_ID           (gimp_param_drawable_id_get_type ())
306 #define GIMP_PARAM_SPEC_DRAWABLE_ID(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_DRAWABLE_ID, GimpParamSpecDrawableID))
307 #define GIMP_IS_PARAM_SPEC_DRAWABLE_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_DRAWABLE_ID))
308 
309 typedef struct _GimpParamSpecDrawableID GimpParamSpecDrawableID;
310 
311 struct _GimpParamSpecDrawableID
312 {
313   GimpParamSpecItemID parent_instance;
314 };
315 
316 GType         gimp_param_drawable_id_get_type (void) G_GNUC_CONST;
317 
318 GParamSpec  * gimp_param_spec_drawable_id     (const gchar  *name,
319                                                const gchar  *nick,
320                                                const gchar  *blurb,
321                                                Gimp         *gimp,
322                                                gboolean      none_ok,
323                                                GParamFlags   flags);
324 
325 GimpDrawable * gimp_value_get_drawable        (const GValue *value,
326                                                Gimp         *gimp);
327 void           gimp_value_set_drawable        (GValue       *value,
328                                                GimpDrawable *drawable);
329 
330 
331 /*
332  * GIMP_TYPE_LAYER_ID
333  */
334 
335 #define GIMP_TYPE_LAYER_ID               (gimp_layer_id_get_type ())
336 #define GIMP_VALUE_HOLDS_LAYER_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
337                                           GIMP_TYPE_LAYER_ID))
338 
339 GType   gimp_layer_id_get_type           (void) G_GNUC_CONST;
340 
341 
342 /*
343  * GIMP_TYPE_PARAM_LAYER_ID
344  */
345 
346 #define GIMP_TYPE_PARAM_LAYER_ID           (gimp_param_layer_id_get_type ())
347 #define GIMP_PARAM_SPEC_LAYER_ID(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_LAYER_ID, GimpParamSpecLayerID))
348 #define GIMP_IS_PARAM_SPEC_LAYER_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_LAYER_ID))
349 
350 typedef struct _GimpParamSpecLayerID GimpParamSpecLayerID;
351 
352 struct _GimpParamSpecLayerID
353 {
354   GimpParamSpecDrawableID parent_instance;
355 };
356 
357 GType        gimp_param_layer_id_get_type (void) G_GNUC_CONST;
358 
359 GParamSpec * gimp_param_spec_layer_id     (const gchar  *name,
360                                            const gchar  *nick,
361                                            const gchar  *blurb,
362                                            Gimp         *gimp,
363                                            gboolean      none_ok,
364                                            GParamFlags   flags);
365 
366 GimpLayer  * gimp_value_get_layer         (const GValue *value,
367                                            Gimp         *gimp);
368 void         gimp_value_set_layer         (GValue       *value,
369                                            GimpLayer    *layer);
370 
371 
372 /*
373  * GIMP_TYPE_CHANNEL_ID
374  */
375 
376 #define GIMP_TYPE_CHANNEL_ID               (gimp_channel_id_get_type ())
377 #define GIMP_VALUE_HOLDS_CHANNEL_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
378                                             GIMP_TYPE_CHANNEL_ID))
379 
380 GType   gimp_channel_id_get_type           (void) G_GNUC_CONST;
381 
382 
383 /*
384  * GIMP_TYPE_PARAM_CHANNEL_ID
385  */
386 
387 #define GIMP_TYPE_PARAM_CHANNEL_ID           (gimp_param_channel_id_get_type ())
388 #define GIMP_PARAM_SPEC_CHANNEL_ID(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_CHANNEL_ID, GimpParamSpecChannelID))
389 #define GIMP_IS_PARAM_SPEC_CHANNEL_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_CHANNEL_ID))
390 
391 typedef struct _GimpParamSpecChannelID GimpParamSpecChannelID;
392 
393 struct _GimpParamSpecChannelID
394 {
395   GimpParamSpecDrawableID parent_instance;
396 };
397 
398 GType         gimp_param_channel_id_get_type (void) G_GNUC_CONST;
399 
400 GParamSpec  * gimp_param_spec_channel_id     (const gchar  *name,
401                                               const gchar  *nick,
402                                               const gchar  *blurb,
403                                               Gimp         *gimp,
404                                               gboolean      none_ok,
405                                               GParamFlags   flags);
406 
407 GimpChannel * gimp_value_get_channel         (const GValue *value,
408                                               Gimp         *gimp);
409 void          gimp_value_set_channel         (GValue       *value,
410                                               GimpChannel  *channel);
411 
412 
413 /*
414  * GIMP_TYPE_LAYER_MASK_ID
415  */
416 
417 #define GIMP_TYPE_LAYER_MASK_ID               (gimp_layer_mask_id_get_type ())
418 #define GIMP_VALUE_HOLDS_LAYER_MASK_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
419                                                GIMP_TYPE_LAYER_MASK_ID))
420 
421 GType   gimp_layer_mask_id_get_type           (void) G_GNUC_CONST;
422 
423 
424 /*
425  * GIMP_TYPE_PARAM_LAYER_MASK_ID
426  */
427 
428 #define GIMP_TYPE_PARAM_LAYER_MASK_ID           (gimp_param_layer_mask_id_get_type ())
429 #define GIMP_PARAM_SPEC_LAYER_MASK_ID(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_LAYER_MASK_ID, GimpParamSpecLayerMaskID))
430 #define GIMP_IS_PARAM_SPEC_LAYER_MASK_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_LAYER_MASK_ID))
431 
432 typedef struct _GimpParamSpecLayerMaskID GimpParamSpecLayerMaskID;
433 
434 struct _GimpParamSpecLayerMaskID
435 {
436   GimpParamSpecChannelID parent_instance;
437 };
438 
439 GType           gimp_param_layer_mask_id_get_type (void) G_GNUC_CONST;
440 
441 GParamSpec    * gimp_param_spec_layer_mask_id     (const gchar   *name,
442                                                    const gchar   *nick,
443                                                    const gchar   *blurb,
444                                                    Gimp          *gimp,
445                                                    gboolean       none_ok,
446                                                    GParamFlags    flags);
447 
448 GimpLayerMask * gimp_value_get_layer_mask         (const GValue  *value,
449                                                    Gimp          *gimp);
450 void            gimp_value_set_layer_mask         (GValue        *value,
451                                                    GimpLayerMask *layer_mask);
452 
453 
454 /*
455  * GIMP_TYPE_SELECTION_ID
456  */
457 
458 #define GIMP_TYPE_SELECTION_ID               (gimp_selection_id_get_type ())
459 #define GIMP_VALUE_HOLDS_SELECTION_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
460                                               GIMP_TYPE_SELECTION_ID))
461 
462 GType   gimp_selection_id_get_type           (void) G_GNUC_CONST;
463 
464 
465 /*
466  * GIMP_TYPE_PARAM_SELECTION_ID
467  */
468 
469 #define GIMP_TYPE_PARAM_SELECTION_ID           (gimp_param_selection_id_get_type ())
470 #define GIMP_PARAM_SPEC_SELECTION_ID(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_SELECTION_ID, GimpParamSpecSelectionID))
471 #define GIMP_IS_PARAM_SPEC_SELECTION_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_SELECTION_ID))
472 
473 typedef struct _GimpParamSpecSelectionID GimpParamSpecSelectionID;
474 
475 struct _GimpParamSpecSelectionID
476 {
477   GimpParamSpecChannelID parent_instance;
478 };
479 
480 GType           gimp_param_selection_id_get_type (void) G_GNUC_CONST;
481 
482 GParamSpec    * gimp_param_spec_selection_id     (const gchar   *name,
483                                                   const gchar   *nick,
484                                                   const gchar   *blurb,
485                                                   Gimp          *gimp,
486                                                   gboolean       none_ok,
487                                                   GParamFlags    flags);
488 
489 GimpSelection * gimp_value_get_selection         (const GValue  *value,
490                                                   Gimp          *gimp);
491 void            gimp_value_set_selection         (GValue        *value,
492                                                   GimpSelection *selection);
493 
494 
495 /*
496  * GIMP_TYPE_VECTORS_ID
497  */
498 
499 #define GIMP_TYPE_VECTORS_ID               (gimp_vectors_id_get_type ())
500 #define GIMP_VALUE_HOLDS_VECTORS_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
501                                             GIMP_TYPE_VECTORS_ID))
502 
503 GType   gimp_vectors_id_get_type           (void) G_GNUC_CONST;
504 
505 
506 /*
507  * GIMP_TYPE_PARAM_VECTORS_ID
508  */
509 
510 #define GIMP_TYPE_PARAM_VECTORS_ID           (gimp_param_vectors_id_get_type ())
511 #define GIMP_PARAM_SPEC_VECTORS_ID(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_VECTORS_ID, GimpParamSpecVectorsID))
512 #define GIMP_IS_PARAM_SPEC_VECTORS_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_VECTORS_ID))
513 
514 typedef struct _GimpParamSpecVectorsID GimpParamSpecVectorsID;
515 
516 struct _GimpParamSpecVectorsID
517 {
518   GimpParamSpecItemID parent_instance;
519 };
520 
521 GType         gimp_param_vectors_id_get_type (void) G_GNUC_CONST;
522 
523 GParamSpec  * gimp_param_spec_vectors_id     (const gchar  *name,
524                                               const gchar  *nick,
525                                               const gchar  *blurb,
526                                               Gimp         *gimp,
527                                               gboolean      none_ok,
528                                               GParamFlags   flags);
529 
530 GimpVectors * gimp_value_get_vectors         (const GValue *value,
531                                               Gimp         *gimp);
532 void          gimp_value_set_vectors         (GValue       *value,
533                                               GimpVectors  *vectors);
534 
535 
536 /*
537  * GIMP_TYPE_DISPLAY_ID
538  */
539 
540 #define GIMP_TYPE_DISPLAY_ID               (gimp_display_id_get_type ())
541 #define GIMP_VALUE_HOLDS_DISPLAY_ID(value) (G_TYPE_CHECK_VALUE_TYPE ((value),\
542                                             GIMP_TYPE_DISPLAY_ID))
543 
544 GType   gimp_display_id_get_type           (void) G_GNUC_CONST;
545 
546 
547 /*
548  * GIMP_TYPE_PARAM_DISPLAY_ID
549  */
550 
551 #define GIMP_TYPE_PARAM_DISPLAY_ID           (gimp_param_display_id_get_type ())
552 #define GIMP_PARAM_SPEC_DISPLAY_ID(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_DISPLAY_ID, GimpParamSpecDisplayID))
553 #define GIMP_IS_PARAM_SPEC_DISPLAY_ID(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_DISPLAY_ID))
554 
555 typedef struct _GimpParamSpecDisplayID GimpParamSpecDisplayID;
556 
557 struct _GimpParamSpecDisplayID
558 {
559   GParamSpecInt  parent_instance;
560 
561   Gimp          *gimp;
562   gboolean       none_ok;
563 };
564 
565 GType        gimp_param_display_id_get_type (void) G_GNUC_CONST;
566 
567 GParamSpec * gimp_param_spec_display_id     (const gchar  *name,
568                                              const gchar  *nick,
569                                              const gchar  *blurb,
570                                              Gimp         *gimp,
571                                              gboolean      none_ok,
572                                              GParamFlags   flags);
573 
574 GimpObject * gimp_value_get_display         (const GValue *value,
575                                              Gimp         *gimp);
576 void         gimp_value_set_display         (GValue       *value,
577                                              GimpObject   *display);
578 
579 
580 /*
581  * GIMP_TYPE_ARRAY
582  */
583 
584 typedef struct _GimpArray GimpArray;
585 
586 struct _GimpArray
587 {
588   guint8   *data;
589   gsize     length;
590   gboolean  static_data;
591 };
592 
593 GimpArray * gimp_array_new  (const guint8    *data,
594                              gsize            length,
595                              gboolean         static_data);
596 GimpArray * gimp_array_copy (const GimpArray *array);
597 void        gimp_array_free (GimpArray       *array);
598 
599 #define GIMP_TYPE_ARRAY               (gimp_array_get_type ())
600 #define GIMP_VALUE_HOLDS_ARRAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_ARRAY))
601 
602 GType   gimp_array_get_type           (void) G_GNUC_CONST;
603 
604 
605 /*
606  * GIMP_TYPE_PARAM_ARRAY
607  */
608 
609 #define GIMP_TYPE_PARAM_ARRAY           (gimp_param_array_get_type ())
610 #define GIMP_PARAM_SPEC_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_ARRAY, GimpParamSpecArray))
611 #define GIMP_IS_PARAM_SPEC_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_ARRAY))
612 
613 typedef struct _GimpParamSpecArray GimpParamSpecArray;
614 
615 struct _GimpParamSpecArray
616 {
617   GParamSpecBoxed parent_instance;
618 };
619 
620 GType        gimp_param_array_get_type (void) G_GNUC_CONST;
621 
622 GParamSpec * gimp_param_spec_array     (const gchar  *name,
623                                         const gchar  *nick,
624                                         const gchar  *blurb,
625                                         GParamFlags   flags);
626 
627 
628 /*
629  * GIMP_TYPE_INT8_ARRAY
630  */
631 
632 #define GIMP_TYPE_INT8_ARRAY               (gimp_int8_array_get_type ())
633 #define GIMP_VALUE_HOLDS_INT8_ARRAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_INT8_ARRAY))
634 
635 GType   gimp_int8_array_get_type           (void) G_GNUC_CONST;
636 
637 
638 /*
639  * GIMP_TYPE_PARAM_INT8_ARRAY
640  */
641 
642 #define GIMP_TYPE_PARAM_INT8_ARRAY           (gimp_param_int8_array_get_type ())
643 #define GIMP_PARAM_SPEC_INT8_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_INT8_ARRAY, GimpParamSpecInt8Array))
644 #define GIMP_IS_PARAM_SPEC_INT8_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_INT8_ARRAY))
645 
646 typedef struct _GimpParamSpecInt8Array GimpParamSpecInt8Array;
647 
648 struct _GimpParamSpecInt8Array
649 {
650   GimpParamSpecArray parent_instance;
651 };
652 
653 GType          gimp_param_int8_array_get_type  (void) G_GNUC_CONST;
654 
655 GParamSpec   * gimp_param_spec_int8_array      (const gchar  *name,
656                                                 const gchar  *nick,
657                                                 const gchar  *blurb,
658                                                 GParamFlags   flags);
659 
660 const guint8 * gimp_value_get_int8array        (const GValue *value);
661 guint8       * gimp_value_dup_int8array        (const GValue *value);
662 void           gimp_value_set_int8array        (GValue       *value,
663                                                 const guint8 *array,
664                                                 gsize         length);
665 void           gimp_value_set_static_int8array (GValue       *value,
666                                                 const guint8 *array,
667                                                 gsize         length);
668 void           gimp_value_take_int8array       (GValue       *value,
669                                                 guint8       *array,
670                                                 gsize         length);
671 
672 
673 /*
674  * GIMP_TYPE_INT16_ARRAY
675  */
676 
677 #define GIMP_TYPE_INT16_ARRAY               (gimp_int16_array_get_type ())
678 #define GIMP_VALUE_HOLDS_INT16_ARRAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_INT16_ARRAY))
679 
680 GType   gimp_int16_array_get_type           (void) G_GNUC_CONST;
681 
682 
683 /*
684  * GIMP_TYPE_PARAM_INT16_ARRAY
685  */
686 
687 #define GIMP_TYPE_PARAM_INT16_ARRAY           (gimp_param_int16_array_get_type ())
688 #define GIMP_PARAM_SPEC_INT16_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_INT16_ARRAY, GimpParamSpecInt16Array))
689 #define GIMP_IS_PARAM_SPEC_INT16_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_INT16_ARRAY))
690 
691 typedef struct _GimpParamSpecInt16Array GimpParamSpecInt16Array;
692 
693 struct _GimpParamSpecInt16Array
694 {
695   GimpParamSpecArray parent_instance;
696 };
697 
698 GType          gimp_param_int16_array_get_type  (void) G_GNUC_CONST;
699 
700 GParamSpec   * gimp_param_spec_int16_array      (const gchar  *name,
701                                                  const gchar  *nick,
702                                                  const gchar  *blurb,
703                                                  GParamFlags   flags);
704 
705 const gint16 * gimp_value_get_int16array        (const GValue *value);
706 gint16       * gimp_value_dup_int16array        (const GValue *value);
707 void           gimp_value_set_int16array        (GValue       *value,
708                                                  const gint16 *array,
709                                                  gsize         length);
710 void           gimp_value_set_static_int16array (GValue       *value,
711                                                  const gint16 *array,
712                                                  gsize         length);
713 void           gimp_value_take_int16array       (GValue       *value,
714                                                  gint16       *array,
715                                                  gsize         length);
716 
717 
718 /*
719  * GIMP_TYPE_INT32_ARRAY
720  */
721 
722 #define GIMP_TYPE_INT32_ARRAY               (gimp_int32_array_get_type ())
723 #define GIMP_VALUE_HOLDS_INT32_ARRAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_INT32_ARRAY))
724 
725 GType   gimp_int32_array_get_type           (void) G_GNUC_CONST;
726 
727 
728 /*
729  * GIMP_TYPE_PARAM_INT32_ARRAY
730  */
731 
732 #define GIMP_TYPE_PARAM_INT32_ARRAY           (gimp_param_int32_array_get_type ())
733 #define GIMP_PARAM_SPEC_INT32_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_INT32_ARRAY, GimpParamSpecInt32Array))
734 #define GIMP_IS_PARAM_SPEC_INT32_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_INT32_ARRAY))
735 
736 typedef struct _GimpParamSpecInt32Array GimpParamSpecInt32Array;
737 
738 struct _GimpParamSpecInt32Array
739 {
740   GimpParamSpecArray parent_instance;
741 };
742 
743 GType          gimp_param_int32_array_get_type  (void) G_GNUC_CONST;
744 
745 GParamSpec   * gimp_param_spec_int32_array      (const gchar  *name,
746                                                  const gchar  *nick,
747                                                  const gchar  *blurb,
748                                                  GParamFlags   flags);
749 
750 const gint32 * gimp_value_get_int32array        (const GValue *value);
751 gint32       * gimp_value_dup_int32array        (const GValue *value);
752 void           gimp_value_set_int32array        (GValue       *value,
753                                                  const gint32 *array,
754                                                  gsize         length);
755 void           gimp_value_set_static_int32array (GValue       *value,
756                                                  const gint32 *array,
757                                                  gsize         length);
758 void           gimp_value_take_int32array       (GValue       *value,
759                                                  gint32       *array,
760                                                  gsize         length);
761 
762 
763 /*
764  * GIMP_TYPE_FLOAT_ARRAY
765  */
766 
767 #define GIMP_TYPE_FLOAT_ARRAY               (gimp_float_array_get_type ())
768 #define GIMP_VALUE_HOLDS_FLOAT_ARRAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_FLOAT_ARRAY))
769 
770 GType   gimp_float_array_get_type           (void) G_GNUC_CONST;
771 
772 
773 /*
774  * GIMP_TYPE_PARAM_FLOAT_ARRAY
775  */
776 
777 #define GIMP_TYPE_PARAM_FLOAT_ARRAY           (gimp_param_float_array_get_type ())
778 #define GIMP_PARAM_SPEC_FLOAT_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_FLOAT_ARRAY, GimpParamSpecFloatArray))
779 #define GIMP_IS_PARAM_SPEC_FLOAT_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_FLOAT_ARRAY))
780 
781 typedef struct _GimpParamSpecFloatArray GimpParamSpecFloatArray;
782 
783 struct _GimpParamSpecFloatArray
784 {
785   GimpParamSpecArray parent_instance;
786 };
787 
788 GType           gimp_param_float_array_get_type  (void) G_GNUC_CONST;
789 
790 GParamSpec    * gimp_param_spec_float_array      (const gchar  *name,
791                                                   const gchar  *nick,
792                                                   const gchar  *blurb,
793                                                   GParamFlags   flags);
794 
795 const gdouble * gimp_value_get_floatarray        (const GValue  *value);
796 gdouble       * gimp_value_dup_floatarray        (const GValue  *value);
797 void            gimp_value_set_floatarray        (GValue        *value,
798                                                   const gdouble *array,
799                                                   gsize         length);
800 void            gimp_value_set_static_floatarray (GValue        *value,
801                                                   const gdouble *array,
802                                                   gsize         length);
803 void            gimp_value_take_floatarray       (GValue        *value,
804                                                   gdouble       *array,
805                                                   gsize         length);
806 
807 
808 /*
809  * GIMP_TYPE_STRING_ARRAY
810  */
811 
812 GimpArray * gimp_string_array_new  (const gchar     **data,
813                                     gsize             length,
814                                     gboolean          static_data);
815 GimpArray * gimp_string_array_copy (const GimpArray  *array);
816 void        gimp_string_array_free (GimpArray        *array);
817 
818 #define GIMP_TYPE_STRING_ARRAY               (gimp_string_array_get_type ())
819 #define GIMP_VALUE_HOLDS_STRING_ARRAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_STRING_ARRAY))
820 
821 GType   gimp_string_array_get_type           (void) G_GNUC_CONST;
822 
823 
824 /*
825  * GIMP_TYPE_PARAM_STRING_ARRAY
826  */
827 
828 #define GIMP_TYPE_PARAM_STRING_ARRAY           (gimp_param_string_array_get_type ())
829 #define GIMP_PARAM_SPEC_STRING_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_STRING_ARRAY, GimpParamSpecStringArray))
830 #define GIMP_IS_PARAM_SPEC_STRING_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_STRING_ARRAY))
831 
832 typedef struct _GimpParamSpecStringArray GimpParamSpecStringArray;
833 
834 struct _GimpParamSpecStringArray
835 {
836   GParamSpecBoxed parent_instance;
837 };
838 
839 GType          gimp_param_string_array_get_type  (void) G_GNUC_CONST;
840 
841 GParamSpec   * gimp_param_spec_string_array      (const gchar  *name,
842                                                   const gchar  *nick,
843                                                   const gchar  *blurb,
844                                                   GParamFlags   flags);
845 
846 const gchar ** gimp_value_get_stringarray        (const GValue *value);
847 gchar       ** gimp_value_dup_stringarray        (const GValue *value);
848 void           gimp_value_set_stringarray        (GValue       *value,
849                                                   const gchar **array,
850                                                   gsize         length);
851 void           gimp_value_set_static_stringarray (GValue       *value,
852                                                   const gchar **array,
853                                                   gsize         length);
854 void           gimp_value_take_stringarray       (GValue       *value,
855                                                   gchar       **array,
856                                                   gsize         length);
857 
858 
859 /*
860  * GIMP_TYPE_COLOR_ARRAY
861  */
862 
863 #define GIMP_TYPE_COLOR_ARRAY               (gimp_color_array_get_type ())
864 #define GIMP_VALUE_HOLDS_COLOR_ARRAY(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_COLOR_ARRAY))
865 
866 GType   gimp_color_array_get_type           (void) G_GNUC_CONST;
867 
868 
869 /*
870  * GIMP_TYPE_PARAM_COLOR_ARRAY
871  */
872 
873 #define GIMP_TYPE_PARAM_COLOR_ARRAY           (gimp_param_color_array_get_type ())
874 #define GIMP_PARAM_SPEC_COLOR_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GIMP_TYPE_PARAM_COLOR_ARRAY, GimpParamSpecColorArray))
875 #define GIMP_IS_PARAM_SPEC_COLOR_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_COLOR_ARRAY))
876 
877 typedef struct _GimpParamSpecColorArray GimpParamSpecColorArray;
878 
879 struct _GimpParamSpecColorArray
880 {
881   GParamSpecBoxed parent_instance;
882 };
883 
884 GType           gimp_param_color_array_get_type  (void) G_GNUC_CONST;
885 
886 GParamSpec    * gimp_param_spec_color_array      (const gchar   *name,
887                                                   const gchar   *nick,
888                                                   const gchar   *blurb,
889                                                   GParamFlags    flags);
890 
891 const GimpRGB * gimp_value_get_colorarray        (const GValue  *value);
892 GimpRGB       * gimp_value_dup_colorarray        (const GValue  *value);
893 void            gimp_value_set_colorarray        (GValue        *value,
894                                                   const GimpRGB *array,
895                                                   gsize          length);
896 void            gimp_value_set_static_colorarray (GValue        *value,
897                                                   const GimpRGB *array,
898                                                   gsize          length);
899 void            gimp_value_take_colorarray       (GValue        *value,
900                                                   GimpRGB       *array,
901                                                   gsize          length);
902 
903 
904 #endif  /*  __GIMP_PARAM_SPECS_H__  */
905