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

« back to all changes in this revision

Viewing changes to libgimp/gimpgimprc_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
 
50
50
  gint nreturn_vals;
51
51
  gchar *value = NULL;
52
52
 
53
 
  return_vals = gimp_run_procedure ("gimp_gimprc_query",
54
 
                                    &nreturn_vals,
55
 
                                    GIMP_PDB_STRING, token,
56
 
                                    GIMP_PDB_END);
 
53
  return_vals = gimp_run_procedure ("gimp-gimprc-query",
 
54
                                    &nreturn_vals,
 
55
                                    GIMP_PDB_STRING, token,
 
56
                                    GIMP_PDB_END);
57
57
 
58
58
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
59
59
    value = g_strdup (return_vals[1].data.d_string);
73
73
 * This procedure is used to add or change additional information in
74
74
 * the gimprc file that is considered extraneous to the operation of
75
75
 * the GIMP. Plug-ins that need configuration information can use this
76
 
 * function to store it, and gimp_gimprc_query to retrieve it. This
 
76
 * function to store it, and gimp_gimprc_query() to retrieve it. This
77
77
 * will accept _only_ string values in UTF-8 encoding.
78
78
 *
79
79
 * Returns: TRUE on success.
80
80
 */
81
81
gboolean
82
82
gimp_gimprc_set (const gchar *token,
83
 
                 const gchar *value)
 
83
                 const gchar *value)
84
84
{
85
85
  GimpParam *return_vals;
86
86
  gint nreturn_vals;
87
87
  gboolean success = TRUE;
88
88
 
89
 
  return_vals = gimp_run_procedure ("gimp_gimprc_set",
90
 
                                    &nreturn_vals,
91
 
                                    GIMP_PDB_STRING, token,
92
 
                                    GIMP_PDB_STRING, value,
93
 
                                    GIMP_PDB_END);
 
89
  return_vals = gimp_run_procedure ("gimp-gimprc-set",
 
90
                                    &nreturn_vals,
 
91
                                    GIMP_PDB_STRING, token,
 
92
                                    GIMP_PDB_STRING, value,
 
93
                                    GIMP_PDB_END);
94
94
 
95
95
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
96
96
 
106
106
 *
107
107
 * Returns a copy of the default image comment.
108
108
 *
109
 
 * Returns: Default Image Comment.
 
109
 * Returns: Default image comment.
110
110
 */
111
111
gchar *
112
112
gimp_get_default_comment (void)
115
115
  gint nreturn_vals;
116
116
  gchar *comment = NULL;
117
117
 
118
 
  return_vals = gimp_run_procedure ("gimp_get_default_comment",
119
 
                                    &nreturn_vals,
120
 
                                    GIMP_PDB_END);
 
118
  return_vals = gimp_run_procedure ("gimp-get-default-comment",
 
119
                                    &nreturn_vals,
 
120
                                    GIMP_PDB_END);
121
121
 
122
122
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
123
123
    comment = g_strdup (return_vals[1].data.d_string);
128
128
}
129
129
 
130
130
/**
 
131
 * gimp_get_default_unit:
 
132
 *
 
133
 * Get the default unit (taken from the user's locale).
 
134
 *
 
135
 * Returns the default unit's integer ID.
 
136
 *
 
137
 * Returns: Default unit.
 
138
 *
 
139
 * Since: GIMP 2.4
 
140
 */
 
141
GimpUnit
 
142
gimp_get_default_unit (void)
 
143
{
 
144
  GimpParam *return_vals;
 
145
  gint nreturn_vals;
 
146
  GimpUnit unit_id = 0;
 
147
 
 
148
  return_vals = gimp_run_procedure ("gimp-get-default-unit",
 
149
                                    &nreturn_vals,
 
150
                                    GIMP_PDB_END);
 
151
 
 
152
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
 
153
    unit_id = return_vals[1].data.d_unit;
 
154
 
 
155
  gimp_destroy_params (return_vals, nreturn_vals);
 
156
 
 
157
  return unit_id;
 
158
}
 
159
 
 
160
/**
131
161
 * gimp_get_monitor_resolution:
132
162
 * @xres: X resolution.
133
163
 * @yres: Y resolution.
143
173
 */
144
174
gboolean
145
175
gimp_get_monitor_resolution (gdouble *xres,
146
 
                             gdouble *yres)
 
176
                             gdouble *yres)
147
177
{
148
178
  GimpParam *return_vals;
149
179
  gint nreturn_vals;
150
180
  gboolean success = TRUE;
151
181
 
152
 
  return_vals = gimp_run_procedure ("gimp_get_monitor_resolution",
153
 
                                    &nreturn_vals,
154
 
                                    GIMP_PDB_END);
 
182
  return_vals = gimp_run_procedure ("gimp-get-monitor-resolution",
 
183
                                    &nreturn_vals,
 
184
                                    GIMP_PDB_END);
155
185
 
156
186
  *xres = 0.0;
157
187
  *yres = 0.0;
185
215
  gint nreturn_vals;
186
216
  gchar *theme_dir = NULL;
187
217
 
188
 
  return_vals = gimp_run_procedure ("gimp_get_theme_dir",
189
 
                                    &nreturn_vals,
190
 
                                    GIMP_PDB_END);
 
218
  return_vals = gimp_run_procedure ("gimp-get-theme-dir",
 
219
                                    &nreturn_vals,
 
220
                                    GIMP_PDB_END);
191
221
 
192
222
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
193
223
    theme_dir = g_strdup (return_vals[1].data.d_string);
198
228
}
199
229
 
200
230
/**
 
231
 * _gimp_get_color_configuration:
 
232
 *
 
233
 * Get a serialized version of the color management configuration.
 
234
 *
 
235
 * Returns a string that can be deserialized into a GimpColorConfig
 
236
 * object representing the current color management configuration.
 
237
 *
 
238
 * Returns: Serialized color management configuration.
 
239
 *
 
240
 * Since: GIMP 2.4
 
241
 */
 
242
gchar *
 
243
_gimp_get_color_configuration (void)
 
244
{
 
245
  GimpParam *return_vals;
 
246
  gint nreturn_vals;
 
247
  gchar *config = NULL;
 
248
 
 
249
  return_vals = gimp_run_procedure ("gimp-get-color-configuration",
 
250
                                    &nreturn_vals,
 
251
                                    GIMP_PDB_END);
 
252
 
 
253
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
 
254
    config = g_strdup (return_vals[1].data.d_string);
 
255
 
 
256
  gimp_destroy_params (return_vals, nreturn_vals);
 
257
 
 
258
  return config;
 
259
}
 
260
 
 
261
/**
201
262
 * gimp_get_module_load_inhibit:
202
263
 *
203
264
 * Get the list of modules which should not be loaded.
213
274
  gint nreturn_vals;
214
275
  gchar *load_inhibit = NULL;
215
276
 
216
 
  return_vals = gimp_run_procedure ("gimp_get_module_load_inhibit",
217
 
                                    &nreturn_vals,
218
 
                                    GIMP_PDB_END);
 
277
  return_vals = gimp_run_procedure ("gimp-get-module-load-inhibit",
 
278
                                    &nreturn_vals,
 
279
                                    GIMP_PDB_END);
219
280
 
220
281
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
221
282
    load_inhibit = g_strdup (return_vals[1].data.d_string);