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

« back to all changes in this revision

Viewing changes to libgimp/gimp.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:
24
24
 
25
25
#include <glib-object.h>
26
26
 
 
27
#include <libgimpbase/gimpbase.h>
27
28
#include <libgimpcolor/gimpcolor.h>
 
29
#include <libgimpconfig/gimpconfig.h>
28
30
#include <libgimpmath/gimpmath.h>
29
 
#include <libgimpbase/gimpbase.h>
30
31
 
31
32
#include <libgimp/gimpenums.h>
32
33
#include <libgimp/gimptypes.h>
36
37
#include <libgimp/gimpchannel.h>
37
38
#include <libgimp/gimpdrawable.h>
38
39
#include <libgimp/gimpfontselect.h>
 
40
#include <libgimp/gimpgimprc.h>
39
41
#include <libgimp/gimpgradients.h>
40
42
#include <libgimp/gimpgradientselect.h>
41
43
#include <libgimp/gimpimage.h>
57
59
#include <libgimp/gimp_pdb.h>
58
60
 
59
61
#ifdef G_OS_WIN32
60
 
#  include <stdlib.h>           /* For __argc and __argv */
61
 
#  ifdef LIBGIMP_COMPILATION
62
 
#    define GIMPVAR __declspec(dllexport)
63
 
#  else  /* !LIBGIMP_COMPILATION */
64
 
#    define GIMPVAR extern __declspec(dllimport)
65
 
#  endif /* !LIBGIMP_COMPILATION */
66
 
#else  /* !G_OS_WIN32 */
67
 
#  define GIMPVAR extern
 
62
#include <stdlib.h> /* For __argc and __argv */
68
63
#endif
69
64
 
 
65
 
70
66
G_BEGIN_DECLS
71
67
 
72
68
 
75
71
#define gimp_set_data         gimp_procedural_db_set_data
76
72
 
77
73
 
78
 
GIMPVAR const guint gimp_major_version;
79
 
GIMPVAR const guint gimp_minor_version;
80
 
GIMPVAR const guint gimp_micro_version;
81
 
 
82
 
 
83
74
typedef void (* GimpInitProc)  (void);
84
75
typedef void (* GimpQuitProc)  (void);
85
76
typedef void (* GimpQueryProc) (void);
86
77
typedef void (* GimpRunProc)   (const gchar      *name,
87
 
                                gint              n_params,
88
 
                                const GimpParam  *param,
89
 
                                gint             *n_return_vals,
90
 
                                GimpParam       **return_vals);
 
78
                                gint              n_params,
 
79
                                const GimpParam  *param,
 
80
                                gint             *n_return_vals,
 
81
                                GimpParam       **return_vals);
91
82
 
92
83
 
93
84
struct _GimpPlugInInfo
129
120
{
130
121
  gint32            d_int32;
131
122
  gint16            d_int16;
132
 
  gint8             d_int8;
 
123
  guint8            d_int8;
133
124
  gdouble           d_float;
134
125
  gchar            *d_string;
135
126
  gint32           *d_int32array;
136
127
  gint16           *d_int16array;
137
 
  gint8            *d_int8array;
 
128
  guint8           *d_int8array;
138
129
  gdouble          *d_floatarray;
139
130
  gchar           **d_stringarray;
140
131
  GimpRGB           d_color;
147
138
  gint32            d_drawable;
148
139
  gint32            d_selection;
149
140
  gint32            d_boundary;
150
 
  gint32            d_path;
 
141
  gint32            d_path; /* deprecated */
 
142
  gint32            d_vectors;
151
143
  gint32            d_unit;
152
144
  GimpParasite      d_parasite;
153
145
  gint32            d_tattoo;
185
177
#    endif
186
178
#  endif
187
179
 
188
 
#  define MAIN()                                        \
189
 
   struct HINSTANCE__;                                  \
190
 
   int _stdcall                                         \
191
 
   WinMain (struct HINSTANCE__ *hInstance,              \
192
 
            struct HINSTANCE__ *hPrevInstance,          \
193
 
            char *lpszCmdLine,                          \
194
 
            int   nCmdShow)                             \
195
 
   {                                                    \
196
 
     return gimp_main (&PLUG_IN_INFO, __argc, __argv);  \
197
 
   }                                                    \
198
 
                                                        \
199
 
   int                                                  \
200
 
   main (int argc, char *argv[])                        \
201
 
   {                                                    \
202
 
     return gimp_main (&PLUG_IN_INFO, argc, argv);      \
 
180
#  define MAIN()                                        \
 
181
   struct HINSTANCE__;                                  \
 
182
                                                        \
 
183
   int _stdcall                                         \
 
184
   WinMain (struct HINSTANCE__ *hInstance,              \
 
185
            struct HINSTANCE__ *hPrevInstance,          \
 
186
            char *lpszCmdLine,                          \
 
187
            int   nCmdShow);                            \
 
188
                                                        \
 
189
   int _stdcall                                         \
 
190
   WinMain (struct HINSTANCE__ *hInstance,              \
 
191
            struct HINSTANCE__ *hPrevInstance,          \
 
192
            char *lpszCmdLine,                          \
 
193
            int   nCmdShow)                             \
 
194
   {                                                    \
 
195
     return gimp_main (&PLUG_IN_INFO, __argc, __argv);  \
 
196
   }                                                    \
 
197
                                                        \
 
198
   int                                                  \
 
199
   main (int argc, char *argv[])                        \
 
200
   {                                                    \
 
201
     return gimp_main (&PLUG_IN_INFO, argc, argv);      \
203
202
   }
204
203
#else
205
 
#  define MAIN()                                        \
206
 
   int                                                  \
207
 
   main (int argc, char *argv[])                        \
208
 
   {                                                    \
209
 
     return gimp_main (&PLUG_IN_INFO, argc, argv);      \
 
204
#  define MAIN()                                        \
 
205
   int                                                  \
 
206
   main (int argc, char *argv[])                        \
 
207
   {                                                    \
 
208
     return gimp_main (&PLUG_IN_INFO, argc, argv);      \
210
209
   }
211
210
#endif
212
211
 
214
213
/* The main procedure that must be called with the PLUG_IN_INFO structure
215
214
 * and the 'argc' and 'argv' that are passed to "main".
216
215
 */
217
 
gint          gimp_main                (const GimpPlugInInfo *info,
218
 
                                        gint                  argc,
219
 
                                        gchar                *argv[]);
 
216
gint           gimp_main                (const GimpPlugInInfo *info,
 
217
                                         gint                  argc,
 
218
                                         gchar                *argv[]);
220
219
 
221
220
/* Forcefully causes the gimp library to exit and
222
221
 *  close down its connection to main gimp application.
223
222
 */
224
 
void          gimp_quit                (void) G_GNUC_NORETURN;
 
223
void           gimp_quit                (void) G_GNUC_NORETURN;
225
224
 
226
225
 
227
226
/* Install a procedure in the procedure database.
228
227
 */
229
 
void          gimp_install_procedure   (const gchar        *name,
230
 
                                        const gchar        *blurb,
231
 
                                        const gchar        *help,
232
 
                                        const gchar        *author,
233
 
                                        const gchar        *copyright,
234
 
                                        const gchar        *date,
235
 
                                        const gchar        *menu_label,
236
 
                                        const gchar        *image_types,
237
 
                                        GimpPDBProcType     type,
238
 
                                        gint                n_params,
239
 
                                        gint                n_return_vals,
240
 
                                        const GimpParamDef *params,
241
 
                                        const GimpParamDef *return_vals);
 
228
void           gimp_install_procedure   (const gchar        *name,
 
229
                                         const gchar        *blurb,
 
230
                                         const gchar        *help,
 
231
                                         const gchar        *author,
 
232
                                         const gchar        *copyright,
 
233
                                         const gchar        *date,
 
234
                                         const gchar        *menu_label,
 
235
                                         const gchar        *image_types,
 
236
                                         GimpPDBProcType     type,
 
237
                                         gint                n_params,
 
238
                                         gint                n_return_vals,
 
239
                                         const GimpParamDef *params,
 
240
                                         const GimpParamDef *return_vals);
242
241
 
243
242
/* Install a temporary procedure in the procedure database.
244
243
 */
245
 
void          gimp_install_temp_proc   (const gchar        *name,
246
 
                                        const gchar        *blurb,
247
 
                                        const gchar        *help,
248
 
                                        const gchar        *author,
249
 
                                        const gchar        *copyright,
250
 
                                        const gchar        *date,
251
 
                                        const gchar        *menu_label,
252
 
                                        const gchar        *image_types,
253
 
                                        GimpPDBProcType     type,
254
 
                                        gint                n_params,
255
 
                                        gint                n_return_vals,
256
 
                                        const GimpParamDef *params,
257
 
                                        const GimpParamDef *return_vals,
258
 
                                        GimpRunProc         run_proc);
 
244
void           gimp_install_temp_proc   (const gchar        *name,
 
245
                                         const gchar        *blurb,
 
246
                                         const gchar        *help,
 
247
                                         const gchar        *author,
 
248
                                         const gchar        *copyright,
 
249
                                         const gchar        *date,
 
250
                                         const gchar        *menu_label,
 
251
                                         const gchar        *image_types,
 
252
                                         GimpPDBProcType     type,
 
253
                                         gint                n_params,
 
254
                                         gint                n_return_vals,
 
255
                                         const GimpParamDef *params,
 
256
                                         const GimpParamDef *return_vals,
 
257
                                         GimpRunProc         run_proc);
259
258
 
260
259
/* Uninstall a temporary procedure
261
260
 */
262
 
void          gimp_uninstall_temp_proc (const gchar     *name);
 
261
void           gimp_uninstall_temp_proc (const gchar        *name);
263
262
 
264
263
/* Notify the main GIMP application that the extension is ready to run
265
264
 */
266
 
void          gimp_extension_ack       (void);
 
265
void           gimp_extension_ack       (void);
267
266
 
268
267
/* Enable asynchronous processing of temp_procs
269
268
 */
270
 
void          gimp_extension_enable    (void);
 
269
void           gimp_extension_enable    (void);
271
270
 
272
271
/* Process one temp_proc and return
273
272
 */
274
 
void          gimp_extension_process   (guint            timeout);
 
273
void           gimp_extension_process   (guint            timeout);
275
274
 
276
275
/* Run a procedure in the procedure database. The parameters are
277
276
 *  specified via the variable length argument list. The return
278
277
 *  values are returned in the 'GimpParam*' array.
279
278
 */
280
 
GimpParam   * gimp_run_procedure       (const gchar     *name,
281
 
                                        gint            *n_return_vals,
282
 
                                        ...);
 
279
GimpParam    * gimp_run_procedure       (const gchar     *name,
 
280
                                         gint            *n_return_vals,
 
281
                                         ...);
283
282
 
284
283
/* Run a procedure in the procedure database. The parameters are
285
284
 *  specified as an array of GimpParam.  The return
286
285
 *  values are returned in the 'GimpParam*' array.
287
286
 */
288
 
GimpParam   * gimp_run_procedure2      (const gchar     *name,
289
 
                                        gint            *n_return_vals,
290
 
                                        gint             n_params,
291
 
                                        const GimpParam *params);
 
287
GimpParam    * gimp_run_procedure2      (const gchar     *name,
 
288
                                         gint            *n_return_vals,
 
289
                                         gint             n_params,
 
290
                                         const GimpParam *params);
292
291
 
293
292
/* Destroy the an array of parameters. This is useful for
294
293
 *  destroying the return values returned by a call to
295
294
 *  'gimp_run_procedure'.
296
295
 */
297
 
void          gimp_destroy_params      (GimpParam       *params,
298
 
                                        gint             n_params);
 
296
void           gimp_destroy_params      (GimpParam       *params,
 
297
                                         gint             n_params);
299
298
 
300
299
/* Destroy the an array of GimpParamDef's. This is useful for
301
300
 *  destroying the return values returned by a call to
302
301
 *  'gimp_query_procedure'.
303
302
 */
304
 
void          gimp_destroy_paramdefs   (GimpParamDef    *paramdefs,
305
 
                                        gint             n_params);
 
303
void           gimp_destroy_paramdefs   (GimpParamDef    *paramdefs,
 
304
                                         gint             n_params);
306
305
 
307
306
 
308
307
/* Return various constants given by the GIMP core at plug-in config time.
309
308
 */
310
 
guint         gimp_tile_width          (void) G_GNUC_CONST;
311
 
guint         gimp_tile_height         (void) G_GNUC_CONST;
312
 
gint          gimp_shm_ID              (void) G_GNUC_CONST;
313
 
guchar      * gimp_shm_addr            (void) G_GNUC_CONST;
314
 
gdouble       gimp_gamma               (void) G_GNUC_CONST;
315
 
gboolean      gimp_install_cmap        (void) G_GNUC_CONST;
316
 
gint          gimp_min_colors          (void) G_GNUC_CONST;
317
 
gboolean      gimp_show_tool_tips      (void) G_GNUC_CONST;
318
 
gboolean      gimp_show_help_button    (void) G_GNUC_CONST;
319
 
GimpCheckSize gimp_check_size          (void) G_GNUC_CONST;
320
 
GimpCheckType gimp_check_type          (void) G_GNUC_CONST;
321
 
gint32        gimp_default_display     (void) G_GNUC_CONST;
322
 
const gchar * gimp_wm_class            (void) G_GNUC_CONST;
323
 
const gchar * gimp_display_name        (void) G_GNUC_CONST;
324
 
gint          gimp_monitor_number      (void) G_GNUC_CONST;
325
 
 
326
 
const gchar * gimp_get_progname        (void) G_GNUC_CONST;
327
 
 
328
 
 
329
 
void          gimp_attach_new_parasite (const gchar    *name,
330
 
                                        gint            flags,
331
 
                                        gint            size,
332
 
                                        gconstpointer   data);
 
309
guint          gimp_tile_width          (void) G_GNUC_CONST;
 
310
guint          gimp_tile_height         (void) G_GNUC_CONST;
 
311
gint           gimp_shm_ID              (void) G_GNUC_CONST;
 
312
guchar       * gimp_shm_addr            (void) G_GNUC_CONST;
 
313
gdouble        gimp_gamma               (void) G_GNUC_CONST;
 
314
gboolean       gimp_install_cmap        (void) G_GNUC_CONST;
 
315
gint           gimp_min_colors          (void) G_GNUC_CONST;
 
316
gboolean       gimp_show_tool_tips      (void) G_GNUC_CONST;
 
317
gboolean       gimp_show_help_button    (void) G_GNUC_CONST;
 
318
GimpCheckSize  gimp_check_size          (void) G_GNUC_CONST;
 
319
GimpCheckType  gimp_check_type          (void) G_GNUC_CONST;
 
320
gint32         gimp_default_display     (void) G_GNUC_CONST;
 
321
const gchar  * gimp_wm_class            (void) G_GNUC_CONST;
 
322
const gchar  * gimp_display_name        (void) G_GNUC_CONST;
 
323
gint           gimp_monitor_number      (void) G_GNUC_CONST;
 
324
 
 
325
const gchar  * gimp_get_progname        (void) G_GNUC_CONST;
 
326
 
 
327
gboolean       gimp_attach_new_parasite (const gchar    *name,
 
328
                                         gint            flags,
 
329
                                         gint            size,
 
330
                                         gconstpointer   data);
333
331
 
334
332
 
335
333
G_END_DECLS