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

« back to all changes in this revision

Viewing changes to app/config/gimpconfig-params.h

  • 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:
1
 
/* The GIMP -- an image manipulation program
2
 
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
 
 *
4
 
 * ParamSpecs for config objects
5
 
 * Copyright (C) 2001  Sven Neumann <sven@gimp.org>
6
 
 *
7
 
 * This program is free software; you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation; either version 2 of the License, or
10
 
 * (at your option) any later version.
11
 
 *
12
 
 * This program is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program; if not, write to the Free Software
19
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
 
 */
21
 
 
22
 
#ifndef __GIMP_CONFIG_PARAMS_H__
23
 
#define __GIMP_CONFIG_PARAMS_H__
24
 
 
25
 
 
26
 
/*
27
 
 * GIMP_PARAM_SERIALIZE - A property that can and should be
28
 
 *                        serialized and deserialized.
29
 
 * GIMP_PARAM_AGGREGATE - The object property is to be treated as
30
 
 *                        part of the parent object.
31
 
 * GIMP_PARAM_RESTART   - Changes to this property take effect only
32
 
 *                        after a restart.
33
 
 * GIMP_PARAM_CONFIRM   - Changes to this property should be
34
 
 *                        confirmed by the user before being applied.
35
 
 * GIMP_PARAM_DEFAULTS  - Don't serialize this property if it has the
36
 
 *                        default value.
37
 
 * GIMP_PARAM_IGNORE    - This property exists for obscure reasons
38
 
 *                        and is needed for backward compatibility.
39
 
 *                        Ignore the value read and don't serialize it.
40
 
 */
41
 
 
42
 
#define GIMP_PARAM_SERIALIZE    (1 << (0 + G_PARAM_USER_SHIFT))
43
 
#define GIMP_PARAM_AGGREGATE    (1 << (1 + G_PARAM_USER_SHIFT))
44
 
#define GIMP_PARAM_RESTART      (1 << (2 + G_PARAM_USER_SHIFT))
45
 
#define GIMP_PARAM_CONFIRM      (1 << (3 + G_PARAM_USER_SHIFT))
46
 
#define GIMP_PARAM_DEFAULTS     (1 << (4 + G_PARAM_USER_SHIFT))
47
 
#define GIMP_PARAM_IGNORE       (1 << (5 + G_PARAM_USER_SHIFT))
48
 
 
49
 
#define GIMP_CONFIG_PARAM_FLAGS (G_PARAM_READWRITE | \
50
 
                                 G_PARAM_CONSTRUCT | \
51
 
                                 GIMP_PARAM_SERIALIZE)
52
 
 
53
 
 
54
 
/*
55
 
 * GIMP_TYPE_PARAM_RGB
56
 
 */
57
 
 
58
 
#define GIMP_TYPE_PARAM_RGB               (gimp_param_rgb_get_type ())
59
 
#define GIMP_IS_PARAM_SPEC_RGB(pspec)     (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_RGB))
60
 
 
61
 
GType        gimp_param_rgb_get_type      (void) G_GNUC_CONST;
62
 
 
63
 
GParamSpec * gimp_param_spec_rgb          (const gchar    *name,
64
 
                                           const gchar    *nick,
65
 
                                           const gchar    *blurb,
66
 
                                           const GimpRGB  *default_value,
67
 
                                           GParamFlags     flags);
68
 
 
69
 
 
70
 
/*
71
 
 * GIMP_TYPE_PARAM_MATRIX2
72
 
 */
73
 
 
74
 
#define GIMP_TYPE_PARAM_MATRIX2            (gimp_param_matrix2_get_type ())
75
 
#define GIMP_IS_PARAM_SPEC_MATRIX2(pspec)  (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_MATRIX2))
76
 
 
77
 
GType        gimp_param_matrix2_get_type   (void) G_GNUC_CONST;
78
 
 
79
 
GParamSpec * gimp_param_spec_matrix2       (const gchar        *name,
80
 
                                            const gchar        *nick,
81
 
                                            const gchar        *blurb,
82
 
                                            const GimpMatrix2  *default_value,
83
 
                                            GParamFlags         flags);
84
 
 
85
 
 
86
 
/*
87
 
 * GIMP_TYPE_PARAM_MEMSIZE
88
 
 */
89
 
 
90
 
#define GIMP_TYPE_PARAM_MEMSIZE           (gimp_param_memsize_get_type ())
91
 
#define GIMP_IS_PARAM_SPEC_MEMSIZE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_MEMSIZE))
92
 
 
93
 
GType        gimp_param_memsize_get_type  (void) G_GNUC_CONST;
94
 
 
95
 
GParamSpec * gimp_param_spec_memsize      (const gchar  *name,
96
 
                                           const gchar  *nick,
97
 
                                           const gchar  *blurb,
98
 
                                           guint64       minimum,
99
 
                                           guint64       maximum,
100
 
                                           guint64       default_value,
101
 
                                           GParamFlags   flags);
102
 
 
103
 
 
104
 
/*
105
 
 * GIMP_TYPE_PARAM_PATH
106
 
 */
107
 
 
108
 
typedef enum
109
 
{
110
 
  GIMP_PARAM_PATH_FILE,
111
 
  GIMP_PARAM_PATH_FILE_LIST,
112
 
  GIMP_PARAM_PATH_DIR,
113
 
  GIMP_PARAM_PATH_DIR_LIST
114
 
} GimpParamPathType;
115
 
 
116
 
#define GIMP_TYPE_PARAM_PATH              (gimp_param_path_get_type ())
117
 
#define GIMP_IS_PARAM_SPEC_PATH(pspec)    (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_PATH))
118
 
 
119
 
GType        gimp_param_path_get_type     (void) G_GNUC_CONST;
120
 
 
121
 
GParamSpec * gimp_param_spec_path         (const gchar        *name,
122
 
                                           const gchar        *nick,
123
 
                                           const gchar        *blurb,
124
 
                                           GimpParamPathType   type,
125
 
                                           gchar              *default_value,
126
 
                                           GParamFlags         flags);
127
 
 
128
 
GimpParamPathType  gimp_param_spec_path_type (GParamSpec      *pspec);
129
 
 
130
 
 
131
 
/*
132
 
 * GIMP_TYPE_PARAM_UNIT
133
 
 */
134
 
 
135
 
#define GIMP_TYPE_PARAM_UNIT              (gimp_param_unit_get_type ())
136
 
#define GIMP_IS_PARAM_SPEC_UNIT(pspec)    (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_UNIT))
137
 
 
138
 
GType        gimp_param_unit_get_type     (void) G_GNUC_CONST;
139
 
 
140
 
GParamSpec * gimp_param_spec_unit         (const gchar  *name,
141
 
                                           const gchar  *nick,
142
 
                                           const gchar  *blurb,
143
 
                                           gboolean      allow_pixels,
144
 
                                           gboolean      allow_percent,
145
 
                                           GimpUnit      default_value,
146
 
                                           GParamFlags   flags);
147
 
 
148
 
 
149
 
/* some convenience macros to install object properties */
150
 
 
151
 
#define GIMP_CONFIG_INSTALL_PROP_BOOLEAN(class, id,\
152
 
                                         name, blurb, default, flags)\
153
 
  g_object_class_install_property (class, id,\
154
 
                                   g_param_spec_boolean (name, NULL, blurb,\
155
 
                                   default,\
156
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
157
 
#define GIMP_CONFIG_INSTALL_PROP_RGB(class, id,\
158
 
                                     name, blurb, default, flags)\
159
 
  g_object_class_install_property (class, id,\
160
 
                                   gimp_param_spec_rgb (name, NULL, blurb,\
161
 
                                   default,\
162
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
163
 
#define GIMP_CONFIG_INSTALL_PROP_DOUBLE(class, id,\
164
 
                                        name, blurb, min, max, default, flags)\
165
 
  g_object_class_install_property (class, id,\
166
 
                                   g_param_spec_double (name, NULL, blurb,\
167
 
                                   min, max, default,\
168
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
169
 
#define GIMP_CONFIG_INSTALL_PROP_RESOLUTION(class, id,\
170
 
                                            name, blurb, default, flags)\
171
 
  g_object_class_install_property (class, id,\
172
 
                                   g_param_spec_double (name, NULL, blurb,\
173
 
                                   GIMP_MIN_RESOLUTION, GIMP_MAX_RESOLUTION, \
174
 
                                   default,\
175
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
176
 
#define GIMP_CONFIG_INSTALL_PROP_ENUM(class, id,\
177
 
                                      name, blurb, enum_type, default, flags)\
178
 
  g_object_class_install_property (class, id,\
179
 
                                   g_param_spec_enum (name, NULL, blurb,\
180
 
                                   enum_type, default,\
181
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
182
 
#define GIMP_CONFIG_INSTALL_PROP_INT(class, id,\
183
 
                                     name, blurb, min, max, default, flags)\
184
 
  g_object_class_install_property (class, id,\
185
 
                                   g_param_spec_int (name, NULL, blurb,\
186
 
                                   min, max, default,\
187
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
188
 
#define GIMP_CONFIG_INSTALL_PROP_MATRIX2(class, id,\
189
 
                                        name, blurb, default, flags)\
190
 
  g_object_class_install_property (class, id,\
191
 
                                   gimp_param_spec_matrix2 (name, NULL, blurb,\
192
 
                                   default,\
193
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
194
 
#define GIMP_CONFIG_INSTALL_PROP_MEMSIZE(class, id,\
195
 
                                         name, blurb, min, max, default, flags)\
196
 
  g_object_class_install_property (class, id,\
197
 
                                   gimp_param_spec_memsize (name, NULL, blurb,\
198
 
                                   min, max, default,\
199
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
200
 
#define GIMP_CONFIG_INSTALL_PROP_PATH(class, id,\
201
 
                                      name, blurb, type, default, flags)\
202
 
  g_object_class_install_property (class, id,\
203
 
                                   gimp_param_spec_path (name, NULL, blurb,\
204
 
                                   type, default,\
205
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
206
 
#define GIMP_CONFIG_INSTALL_PROP_STRING(class, id,\
207
 
                                        name, blurb, default, flags)\
208
 
  g_object_class_install_property (class, id,\
209
 
                                   g_param_spec_string (name, NULL, blurb,\
210
 
                                   default,\
211
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
212
 
#define GIMP_CONFIG_INSTALL_PROP_UINT(class, id,\
213
 
                                      name, blurb, min, max, default, flags)\
214
 
  g_object_class_install_property (class, id,\
215
 
                                   g_param_spec_uint (name, NULL, blurb,\
216
 
                                   min, max, default,\
217
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
218
 
#define GIMP_CONFIG_INSTALL_PROP_UNIT(class, id,\
219
 
                                      name, blurb, pixels, percent, default, flags)\
220
 
  g_object_class_install_property (class, id,\
221
 
                                   gimp_param_spec_unit (name, NULL, blurb,\
222
 
                                   pixels, percent, default,\
223
 
                                   flags | GIMP_CONFIG_PARAM_FLAGS))
224
 
 
225
 
 
226
 
/*  object and pointer properties are _not_ G_PARAM_CONSTRUCT  */
227
 
 
228
 
#define GIMP_CONFIG_INSTALL_PROP_OBJECT(class, id,\
229
 
                                        name, blurb, object_type, flags)\
230
 
  g_object_class_install_property (class, id,\
231
 
                                   g_param_spec_object (name, NULL, blurb,\
232
 
                                   object_type,\
233
 
                                   flags |\
234
 
                                   G_PARAM_READWRITE | GIMP_PARAM_SERIALIZE))
235
 
 
236
 
#define GIMP_CONFIG_INSTALL_PROP_POINTER(class, id,\
237
 
                                         name, blurb, flags)\
238
 
  g_object_class_install_property (class, id,\
239
 
                                   g_param_spec_pointer (name, NULL, blurb,\
240
 
                                   flags |\
241
 
                                   G_PARAM_READWRITE | GIMP_PARAM_SERIALIZE))
242
 
 
243
 
 
244
 
#endif /* __GIMP_CONFIG_PARAMS_H__ */