From 75b96a8257ccb130c5a33cb3ea2f68f5acea2bcd Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 23 Aug 2000 23:11:07 +0000 Subject: [PATCH] plug-ins/rcm/rcm.[ch] plug-ins/rcm/rcm_misc.[ch] 2000-08-24 Sven Neumann * plug-ins/rcm/rcm.[ch] * plug-ins/rcm/rcm_misc.[ch] * plug-ins/sel2path/sel2path.c * plug-ins/sgi/sgi.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c * plug-ins/xjt/xjpeg.[ch] * plug-ins/xjt/xjt.c * plug-ins/xjt/xpdb_calls.c: removed COMPAT_CRUFT --- ChangeLog | 13 ++ plug-ins/rcm/rcm.c | 36 ++-- plug-ins/rcm/rcm.h | 4 +- plug-ins/rcm/rcm_misc.c | 6 +- plug-ins/rcm/rcm_misc.h | 2 +- plug-ins/sel2path/sel2path.c | 102 +++++------ plug-ins/sgi/sgi.c | 112 ++++++------ plug-ins/twain/twain.c | 78 ++++---- plug-ins/webbrowser/webbrowser.c | 46 ++--- plug-ins/winsnap/winsnap.c | 54 +++--- plug-ins/xjt/xjpeg.c | 54 +++--- plug-ins/xjt/xjpeg.h | 2 +- plug-ins/xjt/xjt.c | 96 +++++----- plug-ins/xjt/xpdb_calls.c | 300 +++++++++++++++---------------- 14 files changed, 459 insertions(+), 446 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6c8fff745..8eccb46787 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2000-08-24 Sven Neumann + + * plug-ins/rcm/rcm.[ch] + * plug-ins/rcm/rcm_misc.[ch] + * plug-ins/sel2path/sel2path.c + * plug-ins/sgi/sgi.c + * plug-ins/twain/twain.c + * plug-ins/webbrowser/webbrowser.c + * plug-ins/winsnap/winsnap.c + * plug-ins/xjt/xjpeg.[ch] + * plug-ins/xjt/xjt.c + * plug-ins/xjt/xpdb_calls.c: removed COMPAT_CRUFT + 2000-08-23 Sven Neumann * app/fileops.c: make the file_save dialog sensitive again if the diff --git a/plug-ins/rcm/rcm.c b/plug-ins/rcm/rcm.c index 0e931784ea..0004da52a9 100644 --- a/plug-ins/rcm/rcm.c +++ b/plug-ins/rcm/rcm.c @@ -55,7 +55,7 @@ /*-----------------------------------------------------------------------------------*/ void query (void); -void run (char *name, int nparams, GParam *param, int *nreturn_vals, GParam **return_vals); +void run (char *name, int nparams, GimpParam *param, int *nreturn_vals, GimpParam **return_vals); /*-----------------------------------------------------------------------------------*/ /* Global variables */ @@ -74,7 +74,7 @@ RcmParams Current = /* Local variables */ /*-----------------------------------------------------------------------------------*/ -GPlugInInfo PLUG_IN_INFO = +GimpPlugInInfo PLUG_IN_INFO = { NULL, /* init_proc */ NULL, /* quit_proc */ @@ -95,14 +95,14 @@ MAIN() void query (void) { - GParamDef args[] = + GimpParamDef args[] = { - { PARAM_INT32, "run_mode", "Interactive, non-interactive" }, - { PARAM_IMAGE, "image", "Input image (used for indexed images)" }, - { PARAM_DRAWABLE, "drawable", "Input drawable" }, + { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, + { GIMP_PDB_IMAGE, "image", "Input image (used for indexed images)" }, + { GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }, }; - GParamDef *return_vals = NULL; + GimpParamDef *return_vals = NULL; int nargs = sizeof (args) / sizeof (args[0]); int nreturn_vals = 0; @@ -117,7 +117,7 @@ query (void) "04th April 1999", N_("/Image/Colors/Colormap Rotation..."), "RGB*", - PROC_PLUG_IN, + GIMP_PLUGIN, nargs, nreturn_vals, args, return_vals); } @@ -197,9 +197,9 @@ rcm_row (const guchar *src_row, /*-----------------------------------------------------------------------------------*/ void -rcm (GDrawable *drawable) +rcm (GimpDrawable *drawable) { - GPixelRgn srcPR, destPR; + GimpPixelRgn srcPR, destPR; gint width, height; gint bytes; guchar *src_row, *dest_row; @@ -247,17 +247,17 @@ rcm (GDrawable *drawable) void run (char *name, int nparams, - GParam *param, + GimpParam *param, int *nreturn_vals, - GParam **return_vals) + GimpParam **return_vals) { - GParam values[1]; - GStatusType status = STATUS_SUCCESS; + GimpParam values[1]; + GimpPDBStatusType status = GIMP_PDB_SUCCESS; *nreturn_vals = 1; *return_vals = values; - values[0].type = PARAM_STATUS; + values[0].type = GIMP_PDB_STATUS; values[0].data.d_status = status; Current.drawable = gimp_drawable_get(param[2].data.d_drawable); @@ -268,7 +268,7 @@ run (char *name, if (gimp_drawable_is_indexed (Current.drawable->id) || gimp_drawable_is_gray (Current.drawable->id) ) { - status = STATUS_EXECUTION_ERROR; + status = GIMP_PDB_EXECUTION_ERROR; } else { @@ -285,10 +285,10 @@ run (char *name, gimp_displays_flush(); } else - status = STATUS_EXECUTION_ERROR; + status = GIMP_PDB_EXECUTION_ERROR; } values[0].data.d_status = status; - if (status == STATUS_SUCCESS) + if (status == GIMP_PDB_SUCCESS) gimp_drawable_detach(Current.drawable); } diff --git a/plug-ins/rcm/rcm.h b/plug-ins/rcm/rcm.h index 6924a1f6c6..d7089c7eb1 100644 --- a/plug-ins/rcm/rcm.h +++ b/plug-ins/rcm/rcm.h @@ -124,8 +124,8 @@ typedef struct gint Success; gint Units; gint Gray_to_from; - GDrawable *drawable; - GDrawable *mask; + GimpDrawable *drawable; + GimpDrawable *mask; ReducedImage *reduced; RcmCircle *To; RcmCircle *From; diff --git a/plug-ins/rcm/rcm_misc.c b/plug-ins/rcm/rcm_misc.c index 9805e412ba..052a807f0c 100644 --- a/plug-ins/rcm/rcm_misc.c +++ b/plug-ins/rcm/rcm_misc.c @@ -181,12 +181,12 @@ rcm_is_gray (float s) /*-----------------------------------------------------------------------------------*/ ReducedImage* -rcm_reduce_image (GDrawable *drawable, - GDrawable *mask, +rcm_reduce_image (GimpDrawable *drawable, + GimpDrawable *mask, gint LongerSize, gint Slctn) { - GPixelRgn srcPR, srcMask; + GimpPixelRgn srcPR, srcMask; ReducedImage *temp; guchar *tempRGB, *src_row, *tempmask, *src_mask_row; gint i, j, whichcol, whichrow, x1, x2, y1, y2; diff --git a/plug-ins/rcm/rcm_misc.h b/plug-ins/rcm/rcm_misc.h index cf986e16b9..9e14404c3b 100644 --- a/plug-ins/rcm/rcm_misc.h +++ b/plug-ins/rcm/rcm_misc.h @@ -54,7 +54,7 @@ float *closest(float *alpha, float *beta, float angle); float angle_mod_2PI(float angle); -ReducedImage *rcm_reduce_image(GDrawable *, GDrawable *, gint, gint); +ReducedImage *rcm_reduce_image(GimpDrawable *, GimpDrawable *, gint, gint); void rcm_render_preview(GtkWidget *, gint); diff --git a/plug-ins/sel2path/sel2path.c b/plug-ins/sel2path/sel2path.c index 9418caca7e..e21ac7874c 100644 --- a/plug-ins/sel2path/sel2path.c +++ b/plug-ins/sel2path/sel2path.c @@ -60,9 +60,9 @@ static void query (void); static void run (gchar *name, gint nparams, - GParam *param, + GimpParam *param, gint *nreturn_vals, - GParam **return_vals); + GimpParam **return_vals); static gint sel2path_dialog (SELVALS *sels); static void sel2path_ok_callback (GtkWidget *widget, @@ -74,7 +74,7 @@ gboolean do_sel2path (gint32 drawable_ID, gint32 image_ID); -GPlugInInfo PLUG_IN_INFO = +GimpPlugInInfo PLUG_IN_INFO = { NULL, /* init_proc */ NULL, /* quit_proc */ @@ -85,7 +85,7 @@ GPlugInInfo PLUG_IN_INFO = static gint sel_x1, sel_y1, sel_x2, sel_y2; static gint has_sel, sel_width, sel_height; static SELVALS selVals; -GPixelRgn selection_rgn; +GimpPixelRgn selection_rgn; gboolean retVal = TRUE; /* Toggle if cancle button clicked */ MAIN () @@ -93,33 +93,33 @@ MAIN () static void query_2 (void) { - static GParamDef args[] = + static GimpParamDef args[] = { - { PARAM_INT32, "run_mode", "Interactive, non-interactive" }, - { PARAM_IMAGE, "image", "Input image (unused)" }, - { PARAM_DRAWABLE, "drawable", "Input drawable" }, - { PARAM_FLOAT, "align_threshold", "align_threshold"}, - { PARAM_FLOAT, "corner_always_threshold", "corner_always_threshold"}, - { PARAM_INT8, "corner_surround", "corner_surround"}, - { PARAM_FLOAT, "corner_threshold", "corner_threshold"}, - { PARAM_FLOAT, "error_threshold", "error_threshold"}, - { PARAM_INT8, "filter_alternative_surround", "filter_alternative_surround"}, - { PARAM_FLOAT, "filter_epsilon", "filter_epsilon"}, - { PARAM_INT8, "filter_iteration_count", "filter_iteration_count"}, - { PARAM_FLOAT, "filter_percent", "filter_percent"}, - { PARAM_INT8, "filter_secondary_surround", "filter_secondary_surround"}, - { PARAM_INT8, "filter_surround", "filter_surround"}, - { PARAM_INT8, "keep_knees", "{1-Yes, 0-No}"}, - { PARAM_FLOAT, "line_reversion_threshold", "line_reversion_threshold"}, - { PARAM_FLOAT, "line_threshold", "line_threshold"}, - { PARAM_FLOAT, "reparameterize_improvement", "reparameterize_improvement"}, - { PARAM_FLOAT, "reparameterize_threshold", "reparameterize_threshold"}, - { PARAM_FLOAT, "subdivide_search", "subdivide_search"}, - { PARAM_INT8, "subdivide_surround", "subdivide_surround"}, - { PARAM_FLOAT, "subdivide_threshold", "subdivide_threshold"}, - { PARAM_INT8, "tangent_surround", "tangent_surround"}, + { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, + { GIMP_PDB_IMAGE, "image", "Input image (unused)" }, + { GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }, + { GIMP_PDB_FLOAT, "align_threshold", "align_threshold"}, + { GIMP_PDB_FLOAT, "corner_always_threshold", "corner_always_threshold"}, + { GIMP_PDB_INT8, "corner_surround", "corner_surround"}, + { GIMP_PDB_FLOAT, "corner_threshold", "corner_threshold"}, + { GIMP_PDB_FLOAT, "error_threshold", "error_threshold"}, + { GIMP_PDB_INT8, "filter_alternative_surround", "filter_alternative_surround"}, + { GIMP_PDB_FLOAT, "filter_epsilon", "filter_epsilon"}, + { GIMP_PDB_INT8, "filter_iteration_count", "filter_iteration_count"}, + { GIMP_PDB_FLOAT, "filter_percent", "filter_percent"}, + { GIMP_PDB_INT8, "filter_secondary_surround", "filter_secondary_surround"}, + { GIMP_PDB_INT8, "filter_surround", "filter_surround"}, + { GIMP_PDB_INT8, "keep_knees", "{1-Yes, 0-No}"}, + { GIMP_PDB_FLOAT, "line_reversion_threshold", "line_reversion_threshold"}, + { GIMP_PDB_FLOAT, "line_threshold", "line_threshold"}, + { GIMP_PDB_FLOAT, "reparameterize_improvement", "reparameterize_improvement"}, + { GIMP_PDB_FLOAT, "reparameterize_threshold", "reparameterize_threshold"}, + { GIMP_PDB_FLOAT, "subdivide_search", "subdivide_search"}, + { GIMP_PDB_INT8, "subdivide_surround", "subdivide_surround"}, + { GIMP_PDB_FLOAT, "subdivide_threshold", "subdivide_threshold"}, + { GIMP_PDB_INT8, "tangent_surround", "tangent_surround"}, }; - static GParamDef *return_vals = NULL; + static GimpParamDef *return_vals = NULL; static int nargs = sizeof (args) / sizeof (args[0]); static int nreturn_vals = 0; @@ -131,7 +131,7 @@ query_2 (void) "1999", NULL, "RGB*, INDEXED*, GRAY*", - PROC_PLUG_IN, + GIMP_PLUGIN, nargs, nreturn_vals, args, return_vals); } @@ -139,13 +139,13 @@ query_2 (void) static void query (void) { - static GParamDef args[] = + static GimpParamDef args[] = { - { PARAM_INT32, "run_mode", "Interactive, non-interactive" }, - { PARAM_IMAGE, "image", "Input image (unused)" }, - { PARAM_DRAWABLE, "drawable", "Input drawable" }, + { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, + { GIMP_PDB_IMAGE, "image", "Input image (unused)" }, + { GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }, }; - static GParamDef *return_vals = NULL; + static GimpParamDef *return_vals = NULL; static int nargs = sizeof (args) / sizeof (args[0]); static int nreturn_vals = 0; @@ -159,7 +159,7 @@ query (void) "1999", N_("/Select/To Path"), "RGB*, INDEXED*, GRAY*", - PROC_PLUG_IN, + GIMP_PLUGIN, nargs, nreturn_vals, args, return_vals); @@ -169,16 +169,16 @@ query (void) static void run (gchar *name, gint nparams, - GParam *param, + GimpParam *param, gint *nreturn_vals, - GParam **return_vals) + GimpParam **return_vals) { - static GParam values[1]; - GDrawable * drawable; + static GimpParam values[1]; + GimpDrawable * drawable; gint32 drawable_ID; gint32 image_ID; - GRunModeType run_mode; - GStatusType status = STATUS_SUCCESS; + GimpRunModeType run_mode; + GimpPDBStatusType status = GIMP_PDB_SUCCESS; gboolean no_dialog = FALSE; run_mode = param[0].data.d_int32; @@ -194,7 +194,7 @@ run (gchar *name, *nreturn_vals = 1; *return_vals = values; - values[0].type = PARAM_STATUS; + values[0].type = GIMP_PDB_STATUS; values[0].data.d_status = status; drawable_ID = param[2].data.d_drawable; @@ -215,7 +215,7 @@ run (gchar *name, { switch (run_mode) { - case RUN_INTERACTIVE: + case GIMP_RUN_INTERACTIVE: if (gimp_get_data_size ("plug_in_sel2path_advanced") > 0) { gimp_get_data ("plug_in_sel2path_advanced", &selVals); @@ -230,11 +230,11 @@ run (gchar *name, fit_set_params (&selVals); break; - case RUN_NONINTERACTIVE: + case GIMP_RUN_NONINTERACTIVE: if (nparams != 23) - status = STATUS_CALLING_ERROR; + status = GIMP_PDB_CALLING_ERROR; - if (status == STATUS_SUCCESS) + if (status == GIMP_PDB_SUCCESS) { selVals.align_threshold = param[3].data.d_float; selVals.corner_always_threshold = param[4].data.d_float; @@ -261,7 +261,7 @@ run (gchar *name, break; - case RUN_WITH_LAST_VALS: + case GIMP_RUN_WITH_LAST_VALS: if(gimp_get_data_size ("plug_in_sel2path_advanced") > 0) { gimp_get_data ("plug_in_sel2path_advanced", &selVals); @@ -280,10 +280,10 @@ run (gchar *name, do_sel2path (drawable_ID,image_ID); values[0].data.d_status = status; - if (status == STATUS_SUCCESS) + if (status == GIMP_PDB_SUCCESS) { dialog_print_selVals(&selVals); - if (run_mode == RUN_INTERACTIVE && !no_dialog) + if (run_mode == GIMP_RUN_INTERACTIVE && !no_dialog) gimp_set_data ("plug_in_sel2path_advanced", &selVals, sizeof(SELVALS)); } @@ -558,7 +558,7 @@ do_sel2path (gint32 drawable_ID, gint32 image_ID) { gint32 selection_ID; - GDrawable *sel_drawable; + GimpDrawable *sel_drawable; pixel_outline_list_type olt; spline_list_array_type splines; diff --git a/plug-ins/sgi/sgi.c b/plug-ins/sgi/sgi.c index 188ed80203..cd176f8f8f 100644 --- a/plug-ins/sgi/sgi.c +++ b/plug-ins/sgi/sgi.c @@ -62,9 +62,9 @@ static void query (void); static void run (gchar *name, gint nparams, - GParam *param, + GimpParam *param, gint *nreturn_vals, - GParam **return_vals); + GimpParam **return_vals); static gint32 load_image (gchar *filename); static gint save_image (gchar *filename, @@ -77,7 +77,7 @@ static gint save_dialog (void); * Globals... */ -GPlugInInfo PLUG_IN_INFO = +GimpPlugInInfo PLUG_IN_INFO = { NULL, /* init_proc */ NULL, /* quit_proc */ @@ -94,28 +94,28 @@ MAIN () static void query (void) { - static GParamDef load_args[] = + static GimpParamDef load_args[] = { - { PARAM_INT32, "run_mode", "Interactive, non-interactive" }, - { PARAM_STRING, "filename", "The name of the file to load" }, - { PARAM_STRING, "raw_filename", "The name of the file to load" }, + { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, + { GIMP_PDB_STRING, "filename", "The name of the file to load" }, + { GIMP_PDB_STRING, "raw_filename", "The name of the file to load" }, }; - static GParamDef load_return_vals[] = + static GimpParamDef load_return_vals[] = { - { PARAM_IMAGE, "image", "Output image" }, + { GIMP_PDB_IMAGE, "image", "Output image" }, }; static gint nload_args = sizeof (load_args) / sizeof (load_args[0]); static gint nload_return_vals = (sizeof (load_return_vals) / sizeof (load_return_vals[0])); - static GParamDef save_args[] = + static GimpParamDef save_args[] = { - { PARAM_INT32, "run_mode", "Interactive, non-interactive" }, - { PARAM_IMAGE, "image", "Input image" }, - { PARAM_DRAWABLE, "drawable", "Drawable to save" }, - { PARAM_STRING, "filename", "The name of the file to save the image in" }, - { PARAM_STRING, "raw_filename", "The name of the file to save the image in" }, - { PARAM_INT32, "compression", "Compression level (0 = none, 1 = RLE, 2 = ARLE)" } + { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, + { GIMP_PDB_IMAGE, "image", "Input image" }, + { GIMP_PDB_DRAWABLE, "drawable", "Drawable to save" }, + { GIMP_PDB_STRING, "filename", "The name of the file to save the image in" }, + { GIMP_PDB_STRING, "raw_filename", "The name of the file to save the image in" }, + { GIMP_PDB_INT32, "compression", "Compression level (0 = none, 1 = RLE, 2 = ARLE)" } }; static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]); @@ -129,7 +129,7 @@ query (void) PLUG_IN_VERSION, "/SGI", NULL, - PROC_PLUG_IN, + GIMP_PLUGIN, nload_args, nload_return_vals, load_args, @@ -143,7 +143,7 @@ query (void) PLUG_IN_VERSION, "/SGI", "RGB*,GRAY*", - PROC_PLUG_IN, + GIMP_PLUGIN, nsave_args, 0, save_args, @@ -161,13 +161,13 @@ query (void) static void run (gchar *name, gint nparams, - GParam *param, + GimpParam *param, gint *nreturn_vals, - GParam **return_vals) + GimpParam **return_vals) { - static GParam values[2]; - GRunModeType run_mode; - GStatusType status = STATUS_SUCCESS; + static GimpParam values[2]; + GimpRunModeType run_mode; + GimpPDBStatusType status = GIMP_PDB_SUCCESS; gint32 image_ID; gint32 drawable_ID; GimpExportReturnType export = EXPORT_CANCEL; @@ -176,8 +176,8 @@ run (gchar *name, *nreturn_vals = 1; *return_vals = values; - values[0].type = PARAM_STATUS; - values[0].data.d_status = STATUS_EXECUTION_ERROR; + values[0].type = GIMP_PDB_STATUS; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; INIT_I18N_UI(); @@ -188,12 +188,12 @@ run (gchar *name, if (image_ID != -1) { *nreturn_vals = 2; - values[1].type = PARAM_IMAGE; + values[1].type = GIMP_PDB_IMAGE; values[1].data.d_image = image_ID; } else { - status = STATUS_EXECUTION_ERROR; + status = GIMP_PDB_EXECUTION_ERROR; } } else if (strcmp (name, "file_sgi_save") == 0) @@ -204,8 +204,8 @@ run (gchar *name, /* eventually export the image */ switch (run_mode) { - case RUN_INTERACTIVE: - case RUN_WITH_LAST_VALS: + case GIMP_RUN_INTERACTIVE: + case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init ("sgi", FALSE); export = gimp_export_image (&image_ID, &drawable_ID, "SGI", (CAN_HANDLE_RGB | @@ -213,7 +213,7 @@ run (gchar *name, CAN_HANDLE_ALPHA)); if (export == EXPORT_CANCEL) { - values[0].data.d_status = STATUS_CANCEL; + values[0].data.d_status = GIMP_PDB_CANCEL; return; } break; @@ -223,7 +223,7 @@ run (gchar *name, switch (run_mode) { - case RUN_INTERACTIVE: + case GIMP_RUN_INTERACTIVE: /* * Possibly retrieve data... */ @@ -233,27 +233,27 @@ run (gchar *name, * Then acquire information with a dialog... */ if (!save_dialog ()) - status = STATUS_CANCEL; + status = GIMP_PDB_CANCEL; break; - case RUN_NONINTERACTIVE: + case GIMP_RUN_NONINTERACTIVE: /* * Make sure all the arguments are there! */ if (nparams != 6) { - status = STATUS_CALLING_ERROR; + status = GIMP_PDB_CALLING_ERROR; } else { compression = param[5].data.d_int32; if (compression < 0 || compression > 2) - status = STATUS_CALLING_ERROR; + status = GIMP_PDB_CALLING_ERROR; }; break; - case RUN_WITH_LAST_VALS: + case GIMP_RUN_WITH_LAST_VALS: /* * Possibly retrieve data... */ @@ -264,7 +264,7 @@ run (gchar *name, break; }; - if (status == STATUS_SUCCESS) + if (status == GIMP_PDB_SUCCESS) { if (save_image (param[3].data.d_string, image_ID, drawable_ID)) { @@ -273,7 +273,7 @@ run (gchar *name, } else { - status = STATUS_EXECUTION_ERROR; + status = GIMP_PDB_EXECUTION_ERROR; } } @@ -282,7 +282,7 @@ run (gchar *name, } else { - status = STATUS_CALLING_ERROR; + status = GIMP_PDB_CALLING_ERROR; } values[0].data.d_status = status; @@ -306,8 +306,8 @@ load_image (gchar *filename) /* I - File to load */ sgi_t *sgip; /* File pointer */ gint32 image, /* Image */ layer; /* Layer */ - GDrawable *drawable; /* Drawable for layer */ - GPixelRgn pixel_rgn; /* Pixel region for layer */ + GimpDrawable *drawable; /* Drawable for layer */ + GimpPixelRgn pixel_rgn; /* Pixel region for layer */ guchar **pixels, /* Pixel rows */ *pixel, /* Pixel data */ *pptr; /* Current pixel */ @@ -342,23 +342,23 @@ load_image (gchar *filename) /* I - File to load */ switch (sgip->zsize) { case 1 : /* Grayscale */ - image_type = GRAY; - layer_type = GRAY_IMAGE; + image_type = GIMP_GRAY; + layer_type = GIMP_GRAY_IMAGE; break; case 2 : /* Grayscale + alpha */ - image_type = GRAY; - layer_type = GRAYA_IMAGE; + image_type = GIMP_GRAY; + layer_type = GIMP_GRAYA_IMAGE; break; case 3 : /* RGB */ - image_type = RGB; - layer_type = RGB_IMAGE; + image_type = GIMP_RGB; + layer_type = GIMP_RGB_IMAGE; break; case 4 : /* RGBA */ - image_type = RGB; - layer_type = RGBA_IMAGE; + image_type = GIMP_RGB; + layer_type = GIMP_RGBA_IMAGE; break; } @@ -376,7 +376,7 @@ load_image (gchar *filename) /* I - File to load */ */ layer = gimp_layer_new (image, _("Background"), sgip->xsize, sgip->ysize, - layer_type, 100, NORMAL_MODE); + layer_type, 100, GIMP_NORMAL_MODE); gimp_image_add_layer(image, layer, 0); /* @@ -494,8 +494,8 @@ save_image (gchar *filename, count, /* Count of rows to put in image */ zsize; /* Number of channels in file */ sgi_t *sgip; /* File pointer */ - GDrawable *drawable; /* Drawable for layer */ - GPixelRgn pixel_rgn; /* Pixel region for layer */ + GimpDrawable *drawable; /* Drawable for layer */ + GimpPixelRgn pixel_rgn; /* Pixel region for layer */ guchar **pixels, /* Pixel rows */ *pixel, /* Pixel data */ *pptr; /* Current pixel */ @@ -514,16 +514,16 @@ save_image (gchar *filename, zsize = 0; switch (gimp_drawable_type(drawable_ID)) { - case GRAY_IMAGE : + case GIMP_GRAY_IMAGE : zsize = 1; break; - case GRAYA_IMAGE : + case GIMP_GRAYA_IMAGE : zsize = 2; break; - case RGB_IMAGE : + case GIMP_RGB_IMAGE : zsize = 3; break; - case RGBA_IMAGE : + case GIMP_RGBA_IMAGE : zsize = 4; break; default: diff --git a/plug-ins/twain/twain.c b/plug-ins/twain/twain.c index ad118e10b4..4f38b42b78 100644 --- a/plug-ins/twain/twain.c +++ b/plug-ins/twain/twain.c @@ -129,10 +129,10 @@ void postTransferCallback(int, void *); static void init(void); static void quit(void); static void query(void); -static void run(char *, int, GParam *, int *, GParam **); +static void run(char *, int, GimpParam *, int *, GimpParam **); /* This plug-in's functions */ -GPlugInInfo PLUG_IN_INFO = +GimpPlugInInfo PLUG_IN_INFO = { NULL, /* init_proc */ NULL, /* quit_proc */ @@ -140,7 +140,7 @@ GPlugInInfo PLUG_IN_INFO = run, /* run_proc */ }; -extern void set_gimp_PLUG_IN_INFO_PTR(GPlugInInfo *); +extern void set_gimp_PLUG_IN_INFO_PTR(GimpPlugInInfo *); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); @@ -448,11 +448,11 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) * Plug-in Parameter definitions */ #define NUMBER_IN_ARGS 1 -#define IN_ARGS { PARAM_INT32, "run_mode", "Interactive, non-interactive" } +#define IN_ARGS { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" } #define NUMBER_OUT_ARGS 2 #define OUT_ARGS \ - { PARAM_INT32, "image_count", "Number of acquired images" }, \ - { PARAM_INT32ARRAY, "image_ids", "Array of acquired image identifiers" } + { GIMP_PDB_INT32, "image_count", "Number of acquired images" }, \ + { GIMP_PDB_INT32ARRAY, "image_ids", "Array of acquired image identifiers" } /* @@ -464,8 +464,8 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) static void query(void) { - static GParamDef args[] = { IN_ARGS }; - static GParamDef return_vals[] = { OUT_ARGS }; + static GimpParamDef args[] = { IN_ARGS }; + static GimpParamDef return_vals[] = { OUT_ARGS }; INIT_I18N (); @@ -480,7 +480,7 @@ query(void) PLUG_IN_VERSION, PLUG_IN_D_MENU_PATH, NULL, - PROC_EXTENSION, + GIMP_EXTENSION, NUMBER_IN_ARGS, NUMBER_OUT_ARGS, args, @@ -496,7 +496,7 @@ query(void) PLUG_IN_VERSION, PLUG_IN_R_MENU_PATH, NULL, - PROC_EXTENSION, + GIMP_EXTENSION, NUMBER_IN_ARGS, NUMBER_OUT_ARGS, args, @@ -512,7 +512,7 @@ query(void) PLUG_IN_VERSION, N_("/File/Acquire/TWAIN..."), NULL, - PROC_EXTENSION, + GIMP_EXTENSION, NUMBER_IN_ARGS, NUMBER_OUT_ARGS, args, @@ -521,7 +521,7 @@ query(void) /* Return values storage */ -static GParam values[3]; +static GimpParam values[3]; /* * run @@ -532,17 +532,17 @@ static GParam values[3]; static void run(gchar *name, /* name of plugin */ gint nparams, /* number of in-paramters */ - GParam *param, /* in-parameters */ + GimpParam *param, /* in-parameters */ gint *nreturn_vals, /* number of out-parameters */ - GParam **return_vals) /* out-parameters */ + GimpParam **return_vals) /* out-parameters */ { - GRunModeType run_mode; + GimpRunModeType run_mode; /* Initialize the return values * Always return at least the status to the caller. */ - values[0].type = PARAM_STATUS; - values[0].data.d_status = STATUS_SUCCESS; + values[0].type = GIMP_PDB_STATUS; + values[0].data.d_status = GIMP_PDB_SUCCESS; *nreturn_vals = 1; *return_vals = values; @@ -551,7 +551,7 @@ run(gchar *name, /* name of plugin */ * to be used in doing the acquire. */ if (!twainIsAvailable()) { - values[0].data.d_status = STATUS_EXECUTION_ERROR; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; return; } @@ -559,28 +559,28 @@ run(gchar *name, /* name of plugin */ run_mode = param[0].data.d_int32; /* Set up the rest of the return parameters */ - values[1].type = PARAM_INT32; + values[1].type = GIMP_PDB_INT32; values[1].data.d_int32 = 0; - values[2].type = PARAM_INT32ARRAY; + values[2].type = GIMP_PDB_INT32ARRAY; values[2].data.d_int32array = g_new (gint32, MAX_IMAGES); /* How are we running today? */ switch (run_mode) { - case RUN_INTERACTIVE: + case GIMP_RUN_INTERACTIVE: /* Retrieve values from the last run... * Currently ignored */ gimp_get_data(PLUG_IN_NAME, &twainvals); break; - case RUN_NONINTERACTIVE: + case GIMP_RUN_NONINTERACTIVE: /* Currently, we don't do non-interactive calls. * Bail if someone tries to call us non-interactively */ - values[0].data.d_status = STATUS_CALLING_ERROR; + values[0].data.d_status = GIMP_PDB_CALLING_ERROR; return; - case RUN_WITH_LAST_VALS: + case GIMP_RUN_WITH_LAST_VALS: /* Retrieve values from the last run... * Currently ignored */ @@ -592,7 +592,7 @@ run(gchar *name, /* name of plugin */ } /* switch */ /* Have we succeeded so far? */ - if (values[0].data.d_status == STATUS_SUCCESS) + if (values[0].data.d_status == GIMP_PDB_SUCCESS) twainWinMain(); /* Check to make sure we got at least one valid @@ -603,7 +603,7 @@ run(gchar *name, /* name of plugin */ * datasource. Do final Interactive * steps. */ - if (run_mode == RUN_INTERACTIVE) { + if (run_mode == GIMP_RUN_INTERACTIVE) { /* Store variable states for next run */ gimp_set_data(PLUG_IN_NAME, &twainvals, sizeof (TwainValues)); } @@ -611,7 +611,7 @@ run(gchar *name, /* name of plugin */ /* Set return values */ *nreturn_vals = 3; } else { - values[0].data.d_status = STATUS_EXECUTION_ERROR; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; } } @@ -625,8 +625,8 @@ run(gchar *name, /* name of plugin */ typedef struct { gint32 image_id; gint32 layer_id; - GPixelRgn pixel_rgn; - GDrawable *drawable; + GimpPixelRgn pixel_rgn; + GimpDrawable *drawable; pTW_PALETTE8 paletteData; int totalPixels; int completedPixels; @@ -668,14 +668,14 @@ beginTransferCallback(pTW_IMAGEINFO imageInfo, void *clientData) case TWPT_BW: case TWPT_GRAY: /* Set up the image and layer types */ - imageType = GRAY; - layerType = GRAY_IMAGE; + imageType = GIMP_GRAY; + layerType = GIMP_GRAY_IMAGE; break; case TWPT_RGB: /* Set up the image and layer types */ - imageType = RGB; - layerType = RGB_IMAGE; + imageType = GIMP_RGB; + layerType = GIMP_RGB_IMAGE; break; case TWPT_PALETTE: @@ -690,14 +690,14 @@ beginTransferCallback(pTW_IMAGEINFO imageInfo, void *clientData) switch (theClientData->paletteData->PaletteType) { case TWPA_RGB: /* Set up the image and layer types */ - imageType = RGB; - layerType = RGB_IMAGE; + imageType = GIMP_RGB; + layerType = GIMP_RGB_IMAGE; break; case TWPA_GRAY: /* Set up the image and layer types */ - imageType = GRAY; - layerType = GRAY_IMAGE; + imageType = GIMP_GRAY; + layerType = GIMP_GRAY_IMAGE; break; default: @@ -722,7 +722,7 @@ beginTransferCallback(pTW_IMAGEINFO imageInfo, void *clientData) _("Background"), imageInfo->ImageWidth, imageInfo->ImageLength, - layerType, 100, NORMAL_MODE); + layerType, 100, GIMP_NORMAL_MODE); /* Add the layer to the image */ gimp_image_add_layer(theClientData->image_id, @@ -1090,7 +1090,7 @@ endTransferCallback(int completionState, int pendingCount, void *clientData) /* Make sure to check our return code */ if (completionState == TWRC_XFERDONE) { /* We have a completed image transfer */ - values[2].type = PARAM_INT32ARRAY; + values[2].type = GIMP_PDB_INT32ARRAY; values[2].data.d_int32array[values[1].data.d_int32++] = theClientData->image_id; diff --git a/plug-ins/webbrowser/webbrowser.c b/plug-ins/webbrowser/webbrowser.c index 2fcd77749e..f4f22f9e44 100644 --- a/plug-ins/webbrowser/webbrowser.c +++ b/plug-ins/webbrowser/webbrowser.c @@ -74,9 +74,9 @@ static void query (void); static void run (gchar *name, gint nparams, - GParam *param, + GimpParam *param, gint *nreturn_vals, - GParam **return_vals); + GimpParam **return_vals); static gint open_url_dialog (void); static void ok_callback (GtkWidget *widget, @@ -95,7 +95,7 @@ static gint open_url (gchar *url, gint new_window); -GPlugInInfo PLUG_IN_INFO = +GimpPlugInInfo PLUG_IN_INFO = { NULL, /* init_proc */ NULL, /* quit_proc */ @@ -124,11 +124,11 @@ MAIN () static void query (void) { - static GParamDef args[] = + static GimpParamDef args[] = { - { PARAM_INT32, "run_mode", "Interactive, non-interactive" }, - { PARAM_STRING, "url", "URL of a document to open" }, - { PARAM_INT32, "new_window", "Create a new window or use existing one?" }, + { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, + { GIMP_PDB_STRING, "url", "URL of a document to open" }, + { GIMP_PDB_INT32, "new_window", "Create a new window or use existing one?" }, }; static gint nargs = sizeof (args) / sizeof (args[0]); @@ -140,7 +140,7 @@ query (void) "1997", N_("/Xtns/Web Browser/Open URL..."), NULL, - PROC_EXTENSION, + GIMP_EXTENSION, nargs, 0, args, NULL); } @@ -148,17 +148,17 @@ query (void) static void run (gchar *name, gint nparams, - GParam *param, + GimpParam *param, gint *nreturn_vals, - GParam **return_vals) + GimpParam **return_vals) { - static GParam values[1]; - GRunModeType run_mode; - GStatusType status = STATUS_SUCCESS; + static GimpParam values[1]; + GimpRunModeType run_mode; + GimpPDBStatusType status = GIMP_PDB_SUCCESS; run_mode = param[0].data.d_int32; - values[0].type = PARAM_STATUS; + values[0].type = GIMP_PDB_STATUS; values[0].data.d_status = status; *nreturn_vals = 1; @@ -168,7 +168,7 @@ run (gchar *name, { switch (run_mode) { - case RUN_INTERACTIVE: + case GIMP_RUN_INTERACTIVE: INIT_I18N_UI (); /* Possibly retrieve data */ gimp_get_data ("extension_web_browser", &url_info); @@ -177,11 +177,11 @@ run (gchar *name, return; break; - case RUN_NONINTERACTIVE: + case GIMP_RUN_NONINTERACTIVE: /* Make sure all the arguments are there! */ if (nparams != 3) { - status = STATUS_CALLING_ERROR; + status = GIMP_PDB_CALLING_ERROR; } else { @@ -190,7 +190,7 @@ run (gchar *name, } break; - case RUN_WITH_LAST_VALS: + case GIMP_RUN_WITH_LAST_VALS: gimp_get_data ("extension_web_browser", &url_info); break; @@ -198,18 +198,18 @@ run (gchar *name, break; } - if (status == STATUS_SUCCESS) + if (status == GIMP_PDB_SUCCESS) { if (!open_url (url_info.url, url_info.new_window)) - values[0].data.d_status = STATUS_EXECUTION_ERROR; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; - if (run_mode == RUN_INTERACTIVE) + if (run_mode == GIMP_RUN_INTERACTIVE) gimp_set_data ("extension_web_browser", &url_info, sizeof (u_info)); - values[0].data.d_status = STATUS_SUCCESS; + values[0].data.d_status = GIMP_PDB_SUCCESS; } else - values[0].data.d_status = STATUS_EXECUTION_ERROR; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; } else g_assert_not_reached (); diff --git a/plug-ins/winsnap/winsnap.c b/plug-ins/winsnap/winsnap.c index 1660e3cd59..c394df3dad 100644 --- a/plug-ins/winsnap/winsnap.c +++ b/plug-ins/winsnap/winsnap.c @@ -88,7 +88,7 @@ static ICONINFO iconInfo; static void init(void); static void quit(void); static void query(void); -static void run(char *, int, GParam *, int *, GParam **); +static void run(char *, int, GimpParam *, int *, GimpParam **); static void sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect); BOOL CALLBACK dialogProc(HWND, UINT, WPARAM, LPARAM); @@ -133,7 +133,7 @@ static WinSnapInterface winsnapintf = }; /* This plug-in's functions */ -GPlugInInfo PLUG_IN_INFO = +GimpPlugInInfo PLUG_IN_INFO = { NULL, /* init_proc */ NULL, /* quit_proc */ @@ -1043,13 +1043,13 @@ snap_dialog(void) * Plug-in Parameter definitions */ #define NUMBER_IN_ARGS 3 -#define IN_ARGS { PARAM_INT32, "run_mode", "Interactive, non-interactive" },\ - { PARAM_INT32, "root", "Root window { TRUE, FALSE }" },\ - { PARAM_INT32, "decorations", \ +#define IN_ARGS { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },\ + { GIMP_PDB_INT32, "root", "Root window { TRUE, FALSE }" },\ + { GIMP_PDB_INT32, "decorations", \ "Include Window Decorations { TRUE, FALSE }" } #define NUMBER_OUT_ARGS 1 -#define OUT_ARGS { PARAM_IMAGE, "image", "Output image" } +#define OUT_ARGS { GIMP_PDB_IMAGE, "image", "Output image" } /* @@ -1061,8 +1061,8 @@ snap_dialog(void) static void query(void) { - static GParamDef args[] = { IN_ARGS }; - static GParamDef return_vals[] = { OUT_ARGS }; + static GimpParamDef args[] = { IN_ARGS }; + static GimpParamDef return_vals[] = { OUT_ARGS }; INIT_I18N(); @@ -1075,7 +1075,7 @@ query(void) PLUG_IN_VERSION, N_("/File/Acquire/Screen Shot..."), NULL, - PROC_EXTENSION, + GIMP_EXTENSION, NUMBER_IN_ARGS, NUMBER_OUT_ARGS, args, @@ -1083,7 +1083,7 @@ query(void) } /* Return values storage */ -static GParam values[2]; +static GimpParam values[2]; /* * run @@ -1094,18 +1094,18 @@ static GParam values[2]; static void run(gchar *name, /* name of plugin */ gint nparams, /* number of in-paramters */ - GParam *param, /* in-parameters */ + GimpParam *param, /* in-parameters */ gint *nreturn_vals, /* number of out-parameters */ - GParam **return_vals) /* out-parameters */ + GimpParam **return_vals) /* out-parameters */ { - GRunModeType run_mode; + GimpRunModeType run_mode; int wait = 1; /* Initialize the return values * Always return at least the status to the caller. */ - values[0].type = PARAM_STATUS; - values[0].data.d_status = STATUS_SUCCESS; + values[0].type = GIMP_PDB_STATUS; + values[0].data.d_status = GIMP_PDB_SUCCESS; *nreturn_vals = 1; *return_vals = values; @@ -1113,7 +1113,7 @@ run(gchar *name, /* name of plugin */ run_mode = param[0].data.d_int32; /* Set up the rest of the return parameters */ - values[1].type = PARAM_INT32; + values[1].type = GIMP_PDB_INT32; values[1].data.d_int32 = 0; /* Get the data from last run */ @@ -1121,16 +1121,16 @@ run(gchar *name, /* name of plugin */ /* How are we running today? */ switch (run_mode) { - case RUN_INTERACTIVE: + case GIMP_RUN_INTERACTIVE: /* Get information from the dialog */ if (!snap_dialog()) return; break; - case RUN_NONINTERACTIVE: - case RUN_WITH_LAST_VALS: + case GIMP_RUN_NONINTERACTIVE: + case GIMP_RUN_WITH_LAST_VALS: if (!winsnapvals.root) - values[0].data.d_status = STATUS_CALLING_ERROR; + values[0].data.d_status = GIMP_PDB_CALLING_ERROR; break; default: @@ -1150,7 +1150,7 @@ run(gchar *name, /* name of plugin */ /* A window was captured. * Do final Interactive steps. */ - if (run_mode == RUN_INTERACTIVE) { + if (run_mode == GIMP_RUN_INTERACTIVE) { /* Store variable states for next run */ gimp_set_data(PLUG_IN_NAME, &winsnapvals, sizeof(WinSnapValues)); } @@ -1158,7 +1158,7 @@ run(gchar *name, /* name of plugin */ /* Set return values */ *nreturn_vals = 2; } else { - values[0].data.d_status = STATUS_EXECUTION_ERROR; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; } } @@ -1210,8 +1210,8 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect) int imageType, layerType; gint32 image_id; gint32 layer_id; - GPixelRgn pixel_rgn; - GDrawable *drawable; + GimpPixelRgn pixel_rgn; + GimpDrawable *drawable; /* Our width and height */ width = (rect.right - rect.left); @@ -1227,14 +1227,14 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect) flipRedAndBlueBytes(width, height); /* Set up the image and layer types */ - imageType = RGB; - layerType = RGB_IMAGE; + imageType = GIMP_RGB; + layerType = GIMP_RGB_IMAGE; /* Create the GIMP image and layers */ image_id = gimp_image_new(width, height, imageType); layer_id = gimp_layer_new(image_id, _("Background"), ROUND4(width), height, - layerType, 100, NORMAL_MODE); + layerType, 100, GIMP_NORMAL_MODE); gimp_image_add_layer(image_id, layer_id, 0); /* Get our drawable */ diff --git a/plug-ins/xjt/xjpeg.c b/plug-ins/xjt/xjpeg.c index 3645242707..5a01f9ae66 100644 --- a/plug-ins/xjt/xjpeg.c +++ b/plug-ins/xjt/xjpeg.c @@ -84,13 +84,13 @@ xjpg_load_layer (char *filename, int image_type, char *layer_name, gdouble layer_opacity, - GLayerMode layer_mode + GimpLayerModeEffects layer_mode ) { - GPixelRgn l_pixel_rgn; - GDrawable *l_drawable; + GimpPixelRgn l_pixel_rgn; + GimpDrawable *l_drawable; gint32 l_layer_id; - GDrawableType l_layer_type; + GimpImageType l_layer_type; struct jpeg_decompress_struct cinfo; struct my_error_mgr jerr; FILE *infile; @@ -104,7 +104,7 @@ xjpg_load_layer (char *filename, cinfo.err = jpeg_std_error (&jerr.pub); jerr.pub.error_exit = my_error_exit; - l_layer_type = GRAY_IMAGE; + l_layer_type = GIMP_GRAY_IMAGE; if ((infile = fopen (filename, "rb")) == NULL) { @@ -173,10 +173,10 @@ xjpg_load_layer (char *filename, switch (cinfo.output_components) { case 1: - l_layer_type = GRAY_IMAGE; + l_layer_type = GIMP_GRAY_IMAGE; break; case 3: - l_layer_type = RGB_IMAGE; + l_layer_type = GIMP_RGB_IMAGE; break; default: fprintf(stderr, "XJT: cant load layer %s (type is not GRAY and not RGB)\n", filename); @@ -268,9 +268,9 @@ xjpg_load_layer_alpha (char *filename, gint32 layer_id ) { - GPixelRgn l_pixel_rgn; - GDrawable *l_drawable; - GDrawableType l_layer_type; + GimpPixelRgn l_pixel_rgn; + GimpDrawable *l_drawable; + GimpImageType l_layer_type; struct jpeg_decompress_struct cinfo; struct my_error_mgr jerr; FILE *infile; @@ -288,7 +288,7 @@ xjpg_load_layer_alpha (char *filename, cinfo.err = jpeg_std_error (&jerr.pub); jerr.pub.error_exit = my_error_exit; - l_layer_type = GRAY_IMAGE; + l_layer_type = GIMP_GRAY_IMAGE; /* add alpha channel */ gimp_layer_add_alpha (layer_id); @@ -470,8 +470,8 @@ xjpg_load_channel (char *filename, guchar red, guchar green, guchar blue ) { - GPixelRgn l_pixel_rgn; - GDrawable *l_drawable; + GimpPixelRgn l_pixel_rgn; + GimpDrawable *l_drawable; gint32 l_drawable_id; struct jpeg_decompress_struct cinfo; struct my_error_mgr jerr; @@ -674,9 +674,9 @@ xjpg_save_drawable (char *filename, gint save_mode, t_JpegSaveVals *jsvals) { - GPixelRgn pixel_rgn; - GDrawable *drawable; - GDrawableType drawable_type; + GimpPixelRgn pixel_rgn; + GimpDrawable *drawable; + GimpImageType drawable_type; struct jpeg_compress_struct cinfo; struct my_error_mgr jerr; FILE *outfile; @@ -701,16 +701,16 @@ xjpg_save_drawable (char *filename, drawable_type = gimp_drawable_type (drawable_ID); switch (drawable_type) { - case RGB_IMAGE: - case GRAY_IMAGE: + case GIMP_RGB_IMAGE: + case GIMP_GRAY_IMAGE: if(save_mode == JSVM_ALPHA) return FALSE; /* there is no alpha to save */ break; - case RGBA_IMAGE: - case GRAYA_IMAGE: + case GIMP_RGBA_IMAGE: + case GIMP_GRAYA_IMAGE: break; - case INDEXED_IMAGE: + case GIMP_INDEXED_IMAGE: /*g_message ("jpeg: cannot operate on indexed color images");*/ return FALSE; break; @@ -773,15 +773,15 @@ xjpg_save_drawable (char *filename, */ switch (drawable_type) { - case RGB_IMAGE: - case GRAY_IMAGE: + case GIMP_RGB_IMAGE: + case GIMP_GRAY_IMAGE: /* # of color components per pixel */ cinfo.input_components = drawable->bpp; has_alpha = 0; alpha_offset = 0; break; - case RGBA_IMAGE: - case GRAYA_IMAGE: + case GIMP_RGBA_IMAGE: + case GIMP_GRAYA_IMAGE: if(save_mode == JSVM_ALPHA) { cinfo.input_components = 1; @@ -809,8 +809,8 @@ xjpg_save_drawable (char *filename, cinfo.image_height = drawable->height; /* colorspace of input image */ cinfo.in_color_space = ( (save_mode != JSVM_ALPHA) && - (drawable_type == RGB_IMAGE || - drawable_type == RGBA_IMAGE)) + (drawable_type == GIMP_RGB_IMAGE || + drawable_type == GIMP_RGBA_IMAGE)) ? JCS_RGB : JCS_GRAYSCALE; /* Now use the library's routine to set default compression parameters. * (You must set at least cinfo.in_color_space before calling this, diff --git a/plug-ins/xjt/xjpeg.h b/plug-ins/xjt/xjpeg.h index 4a4b7b98a4..910a07fbc7 100644 --- a/plug-ins/xjt/xjpeg.h +++ b/plug-ins/xjt/xjpeg.h @@ -60,7 +60,7 @@ xjpg_load_layer (char *filename, int image_type, char *layer_name, gdouble layer_opacity, - GLayerMode layer_mode + GimpLayerModeEffects layer_mode ); gint diff --git a/plug-ins/xjt/xjt.c b/plug-ins/xjt/xjt.c index c9885db615..84405ac194 100644 --- a/plug-ins/xjt/xjt.c +++ b/plug-ins/xjt/xjt.c @@ -307,7 +307,7 @@ typedef struct gint gimp_major_version; gint gimp_minor_version; gint gimp_micro_version; - GImageType image_type; + GimpImageBaseType image_type; gint image_width; gint image_height; gfloat xresolution; @@ -373,9 +373,9 @@ t_prop_table g_prop_table[PROP_TABLE_ENTRIES] = { static void query (void); static void run (gchar *name, gint nparams, - GParam *param, + GimpParam *param, gint *nreturn_vals, - GParam **return_vals); + GimpParam **return_vals); static gint32 load_xjt_image (gchar *filename); static gint save_xjt_image (gchar *filename, @@ -386,7 +386,7 @@ static gint save_dialog (void); static void save_ok_callback (GtkWidget *widget, gpointer data); -GPlugInInfo PLUG_IN_INFO = +GimpPlugInInfo PLUG_IN_INFO = { NULL, /* init_proc */ NULL, /* quit_proc */ @@ -437,31 +437,31 @@ MAIN () static void query (void) { - static GParamDef load_args[] = + static GimpParamDef load_args[] = { - { PARAM_INT32, "run_mode", "Interactive, non-interactive" }, - { PARAM_STRING, "filename", "The name of the file to load" }, - { PARAM_STRING, "raw_filename", "The name of the file to load" }, + { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, + { GIMP_PDB_STRING, "filename", "The name of the file to load" }, + { GIMP_PDB_STRING, "raw_filename", "The name of the file to load" }, }; - static GParamDef load_return_vals[] = + static GimpParamDef load_return_vals[] = { - { PARAM_IMAGE, "image", "Output image" }, + { GIMP_PDB_IMAGE, "image", "Output image" }, }; static gint nload_args = sizeof (load_args) / sizeof (load_args[0]); static gint nload_return_vals = (sizeof (load_return_vals) / sizeof (load_return_vals[0])); - static GParamDef save_args[] = + static GimpParamDef save_args[] = { - { PARAM_INT32, "run_mode", "Interactive, non-interactive" }, - { PARAM_IMAGE, "image", "Input image" }, - { PARAM_DRAWABLE, "drawable", "is ignored" }, - { PARAM_STRING, "filename", "The name of the file to save the image in" }, - { PARAM_STRING, "raw_filename", "The name of the file to save the image in" }, - { PARAM_FLOAT, "quality", "Quality of saved image (0 <= quality <= 1)" }, - { PARAM_FLOAT, "smoothing", "Smoothing factor for saved image (0 <= smoothing <= 1)" }, - { PARAM_INT32, "optimize", "Optimization of entropy encoding parameters" }, - { PARAM_INT32, "clr_transparent", "set all full-transparent pixels to 0" }, + { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, + { GIMP_PDB_IMAGE, "image", "Input image" }, + { GIMP_PDB_DRAWABLE, "drawable", "is ignored" }, + { GIMP_PDB_STRING, "filename", "The name of the file to save the image in" }, + { GIMP_PDB_STRING, "raw_filename", "The name of the file to save the image in" }, + { GIMP_PDB_FLOAT, "quality", "Quality of saved image (0 <= quality <= 1)" }, + { GIMP_PDB_FLOAT, "smoothing", "Smoothing factor for saved image (0 <= smoothing <= 1)" }, + { GIMP_PDB_INT32, "optimize", "Optimization of entropy encoding parameters" }, + { GIMP_PDB_INT32, "clr_transparent", "set all full-transparent pixels to 0" }, }; static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]); @@ -475,7 +475,7 @@ query (void) "2000-Mar-07", "/xjt", NULL, - PROC_PLUG_IN, + GIMP_PLUGIN, nload_args, nload_return_vals, load_args, load_return_vals); @@ -487,7 +487,7 @@ query (void) "2000-Mar-07", "/xjt", "RGB*, GRAY*", - PROC_PLUG_IN, + GIMP_PLUGIN, nsave_args, 0, save_args, NULL); @@ -503,13 +503,13 @@ query (void) static void run (gchar *name, gint nparams, - GParam *param, + GimpParam *param, gint *nreturn_vals, - GParam **return_vals) + GimpParam **return_vals) { - static GParam values[2]; - GRunModeType run_mode; - GStatusType status = STATUS_SUCCESS; + static GimpParam values[2]; + GimpRunModeType run_mode; + GimpPDBStatusType status = GIMP_PDB_SUCCESS; gint32 image_ID; gchar *l_env; @@ -526,10 +526,10 @@ run (gchar *name, *nreturn_vals = 1; *return_vals = values; - values[0].type = PARAM_STATUS; - values[0].data.d_status = STATUS_EXECUTION_ERROR; + values[0].type = GIMP_PDB_STATUS; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; - if (run_mode == RUN_NONINTERACTIVE) + if (run_mode == GIMP_RUN_NONINTERACTIVE) { INIT_I18N(); } @@ -545,34 +545,34 @@ run (gchar *name, if (image_ID != -1) { *nreturn_vals = 2; - values[1].type = PARAM_IMAGE; + values[1].type = GIMP_PDB_IMAGE; values[1].data.d_image = image_ID; } else { - status = STATUS_EXECUTION_ERROR; + status = GIMP_PDB_EXECUTION_ERROR; } } else if (strcmp (name, "file_xjt_save") == 0) { switch (run_mode) { - case RUN_INTERACTIVE: + case GIMP_RUN_INTERACTIVE: /* Possibly retrieve data */ gimp_get_data ("file_xjt_save", &jsvals); /* First acquire information with a dialog */ if (! save_dialog ()) { - status = STATUS_CANCEL; + status = GIMP_PDB_CANCEL; } break; - case RUN_NONINTERACTIVE: + case GIMP_RUN_NONINTERACTIVE: /* Make sure all the arguments are there! */ if (nparams != 8) { - status = STATUS_CALLING_ERROR; + status = GIMP_PDB_CALLING_ERROR; } else { @@ -583,16 +583,16 @@ run (gchar *name, if (jsvals.quality < 0.0 || jsvals.quality > 1.0) { - status = STATUS_CALLING_ERROR; + status = GIMP_PDB_CALLING_ERROR; } else if (jsvals.smoothing < 0.0 || jsvals.smoothing > 1.0) { - status = STATUS_CALLING_ERROR; + status = GIMP_PDB_CALLING_ERROR; } } break; - case RUN_WITH_LAST_VALS: + case GIMP_RUN_WITH_LAST_VALS: /* Possibly retrieve data */ gimp_get_data ("file_xjt_save", &jsvals); break; @@ -601,13 +601,13 @@ run (gchar *name, break; } - if (status == STATUS_SUCCESS) + if (status == GIMP_PDB_SUCCESS) { if (save_xjt_image (param[3].data.d_string, param[1].data.d_int32, param[2].data.d_int32) <0) { - status = STATUS_EXECUTION_ERROR; + status = GIMP_PDB_EXECUTION_ERROR; } else { @@ -618,7 +618,7 @@ run (gchar *name, } else { - status = STATUS_CALLING_ERROR; + status = GIMP_PDB_CALLING_ERROR; } values[0].data.d_status = status; @@ -629,13 +629,13 @@ run (gchar *name, gint32 p_to_GimpOrientation(gint32 orientation) { - if(orientation == XJT_ORIENTATION_VERTICAL) return(ORIENTATION_VERTICAL); - return(ORIENTATION_HORIZONTAL); + if(orientation == XJT_ORIENTATION_VERTICAL) return(GIMP_VERTICAL); + return(GIMP_HORIZONTAL); } gint32 p_to_XJTOrientation(gint32 orientation) { - if(orientation == ORIENTATION_VERTICAL) return(XJT_ORIENTATION_VERTICAL); + if(orientation == GIMP_VERTICAL) return(XJT_ORIENTATION_VERTICAL); return(XJT_ORIENTATION_HORIZONTAL); } @@ -1174,7 +1174,7 @@ p_write_parasite(gchar *dirname, FILE *fp, FILE *l_fp_pte; t_param_prop l_param; - if(parasite->flags & GIMP_PARASITE_PERSISTENT) /* check if Parasite should be saved */ + if(parasite->flags & GIMP_PARASITE_PERSISTENT) /* check if GimpParasite should be saved */ { global_parasite_id++; @@ -1486,7 +1486,7 @@ p_write_channel_prp(gchar *dirname, static void p_write_image_prp(gchar *dirname, FILE *fp, gint32 image_id, gint wr_all_prp) { - GImageType l_image_type; + GimpImageBaseType l_image_type; guint l_width, l_height; float l_xresolution, l_yresolution; t_param_prop l_param; @@ -1579,7 +1579,7 @@ save_xjt_image (gchar *filename, FILE *l_fp_prp; mode_t l_mode_dir; - GImageType l_image_type; + GimpImageBaseType l_image_type; gint32 *l_layers_list; gint32 *l_channels_list; gint l_nlayers; diff --git a/plug-ins/xjt/xpdb_calls.c b/plug-ins/xjt/xpdb_calls.c index 7e710eb6a8..1c325ffb7b 100644 --- a/plug-ins/xjt/xpdb_calls.c +++ b/plug-ins/xjt/xpdb_calls.c @@ -105,15 +105,15 @@ gint p_get_gimp_selection_bounds (gint32 image_id, gint32 *x1, gint32 *y1, gint32 *x2, gint32 *y2) { static gchar *l_get_sel_bounds_proc = "gimp_selection_bounds"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_get_sel_bounds_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { *x1 = return_vals[2].data.d_int32; *y1 = return_vals[3].data.d_int32; @@ -135,15 +135,15 @@ gint p_gimp_selection_load (gint32 image_id, gint32 channel_id) { static gchar *l_sel_load = "gimp_selection_load"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_sel_load, &nreturn_vals, - PARAM_CHANNEL, channel_id, - PARAM_END); + GIMP_PDB_CHANNEL, channel_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(TRUE); } @@ -162,16 +162,16 @@ int p_layer_set_linked (gint32 layer_id, gint32 new_state) { static gchar *l_set_linked_proc = "gimp_layer_set_linked"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_set_linked_proc, &nreturn_vals, - PARAM_LAYER, layer_id, - PARAM_INT32, new_state, /* TRUE or FALSE */ - PARAM_END); + GIMP_PDB_LAYER, layer_id, + GIMP_PDB_INT32, new_state, /* TRUE or FALSE */ + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return (0); } @@ -187,7 +187,7 @@ p_layer_set_linked (gint32 layer_id, gint32 new_state) gint p_layer_get_linked(gint32 layer_id) { - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; gint32 is_linked; @@ -195,10 +195,10 @@ gint p_layer_get_linked(gint32 layer_id) return_vals = gimp_run_procedure ("gimp_layer_get_linked", &nreturn_vals, - PARAM_LAYER, layer_id, - PARAM_END); + GIMP_PDB_LAYER, layer_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { is_linked = return_vals[1].data.d_int32; } @@ -216,15 +216,15 @@ gint p_layer_get_linked(gint32 layer_id) gint32 p_gimp_image_floating_sel_attached_to(gint32 image_id) { static gchar *l_fsel_attached_to_proc = "gimp_image_floating_sel_attached_to"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_fsel_attached_to_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(return_vals[1].data.d_drawable); } @@ -241,16 +241,16 @@ gint32 p_gimp_image_floating_sel_attached_to(gint32 image_id) gint p_gimp_floating_sel_attach(gint32 layer_id, gint32 drawable_id) { static gchar *l_fsel_attach_proc = "gimp_floating_sel_attach"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_fsel_attach_proc, &nreturn_vals, - PARAM_LAYER, layer_id, - PARAM_DRAWABLE, drawable_id, - PARAM_END); + GIMP_PDB_LAYER, layer_id, + GIMP_PDB_DRAWABLE, drawable_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return (0); } @@ -267,16 +267,16 @@ gint p_gimp_floating_sel_attach(gint32 layer_id, gint32 drawable_id) gint p_gimp_floating_sel_rigor(gint32 layer_id, gint32 undo) { static gchar *l_fsel_rigor_proc = "gimp_floating_sel_rigor"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_fsel_rigor_proc, &nreturn_vals, - PARAM_LAYER, layer_id, - PARAM_INT32, undo, - PARAM_END); + GIMP_PDB_LAYER, layer_id, + GIMP_PDB_INT32, undo, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return (0); } @@ -293,16 +293,16 @@ gint p_gimp_floating_sel_rigor(gint32 layer_id, gint32 undo) gint p_gimp_floating_sel_relax(gint32 layer_id, gint32 undo) { static gchar *l_fsel_relax_proc = "gimp_floating_sel_relax"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_fsel_relax_proc, &nreturn_vals, - PARAM_LAYER, layer_id, - PARAM_INT32, undo, - PARAM_END); + GIMP_PDB_LAYER, layer_id, + GIMP_PDB_INT32, undo, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return (0); } @@ -322,10 +322,10 @@ gint p_gimp_floating_sel_relax(gint32 layer_id, gint32 undo) gint32 p_gimp_image_add_guide(gint32 image_id, gint32 position, gint32 orientation) { static gchar *l_add_guide_proc; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; - if(orientation == ORIENTATION_VERTICAL) + if(orientation == GIMP_VERTICAL) { l_add_guide_proc = "gimp_image_add_vguide"; } @@ -336,11 +336,11 @@ gint32 p_gimp_image_add_guide(gint32 image_id, gint32 position, gint32 orienta return_vals = gimp_run_procedure (l_add_guide_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_INT32, position, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_INT32, position, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(return_vals[1].data.d_int32); /* return the guide ID */ } @@ -363,16 +363,16 @@ gint32 p_gimp_image_add_guide(gint32 image_id, gint32 position, gint32 orienta gint32 p_gimp_image_findnext_guide(gint32 image_id, gint32 guide_id) { static gchar *l_findnext_guide_proc = "gimp_image_find_next_guide"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_findnext_guide_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_INT32, guide_id, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_INT32, guide_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(return_vals[1].data.d_int32); /* return the next guide ID */ } @@ -391,16 +391,16 @@ gint32 p_gimp_image_findnext_guide(gint32 image_id, gint32 guide_id) gint32 p_gimp_image_get_guide_position(gint32 image_id, gint32 guide_id) { static gchar *l_get_guide_pos_proc = "gimp_image_get_guide_position"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_get_guide_pos_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_INT32, guide_id, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_INT32, guide_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(return_vals[1].data.d_int32); /* return the guide position */ } @@ -418,16 +418,16 @@ gint32 p_gimp_image_get_guide_position(gint32 image_id, gint32 guide_id) gint p_gimp_image_get_guide_orientation(gint32 image_id, gint32 guide_id) { static gchar *l_get_guide_pos_orient = "gimp_image_get_guide_orientation"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_get_guide_pos_orient, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_INT32, guide_id, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_INT32, guide_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(return_vals[1].data.d_int32); /* return the guide orientation */ } @@ -444,15 +444,15 @@ gint p_gimp_image_get_guide_orientation(gint32 image_id, gint32 guide_id) gint32 p_gimp_image_get_resolution (gint32 image_id, float *xresolution, float *yresolution) { static gchar *l_procname = "gimp_image_get_resolution"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_procname, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { *xresolution = return_vals[1].data.d_float; *yresolution = return_vals[2].data.d_float; @@ -473,17 +473,17 @@ gint32 p_gimp_image_get_resolution (gint32 image_id, float *xresolution, float gint p_gimp_image_set_resolution (gint32 image_id, float xresolution, float yresolution) { static gchar *l_procname = "gimp_image_set_resolution"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_procname, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_FLOAT, xresolution, - PARAM_FLOAT, yresolution, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_FLOAT, xresolution, + GIMP_PDB_FLOAT, yresolution, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return (0); /* OK */ } @@ -500,15 +500,15 @@ gint p_gimp_image_set_resolution (gint32 image_id, float xresolution, float yre gint32 p_gimp_layer_get_tattoo (gint32 layer_id) { static gchar *l_procname = "gimp_layer_get_tattoo"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_procname, &nreturn_vals, - PARAM_LAYER, layer_id, - PARAM_END); + GIMP_PDB_LAYER, layer_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(return_vals[1].data.d_int32); /* OK, return Tattoo Id */ } @@ -525,15 +525,15 @@ gint32 p_gimp_layer_get_tattoo (gint32 layer_id) gint32 p_gimp_channel_get_tattoo (gint32 channel_id) { static gchar *l_procname = "gimp_channel_get_tattoo"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_procname, &nreturn_vals, - PARAM_CHANNEL, channel_id, - PARAM_END); + GIMP_PDB_CHANNEL, channel_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(return_vals[1].data.d_int32); /* OK, return Tattoo Id */ } @@ -550,15 +550,15 @@ gchar ** p_gimp_drawable_parasite_list (gint32 drawable_id, gint32 *num_parasites) { static gchar *l_procname = "gimp_drawable_parasite_list"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_procname, &nreturn_vals, - PARAM_DRAWABLE, drawable_id, - PARAM_END); + GIMP_PDB_DRAWABLE, drawable_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { *num_parasites = return_vals[1].data.d_int32; return(return_vals[2].data.d_stringarray); /* OK, return name list */ @@ -578,15 +578,15 @@ gchar ** p_gimp_image_parasite_list (gint32 image_id, gint32 *num_parasites) { static gchar *l_procname = "gimp_image_parasite_list"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_procname, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { *num_parasites = return_vals[1].data.d_int32; return(return_vals[2].data.d_stringarray); /* OK, return name list */ @@ -608,7 +608,7 @@ p_gimp_path_set_points(gint32 image_id, gchar *name, gint32 path_type, gint32 num_points, gdouble *path_points) { static gchar *l_called_proc = "gimp_path_set_points"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; gint32 l_idx; @@ -626,14 +626,14 @@ p_gimp_path_set_points(gint32 image_id, gchar *name, return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_STRING, name, - PARAM_INT32, path_type, - PARAM_INT32, num_points, - PARAM_FLOATARRAY, path_points, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_STRING, name, + GIMP_PDB_INT32, path_type, + GIMP_PDB_INT32, num_points, + GIMP_PDB_FLOATARRAY, path_points, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(0); /* OK */ } @@ -653,16 +653,16 @@ p_gimp_path_get_points(gint32 image_id, gchar *name, gint32 *path_type, gint32 *path_closed, gint32 *num_points) { static gchar *l_called_proc = "gimp_path_get_points"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_STRING, name, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_STRING, name, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { *path_type = return_vals[1].data.d_int32; *path_closed = return_vals[2].data.d_int32; @@ -698,15 +698,15 @@ gchar ** p_gimp_path_list(gint32 image_id, gint32 *num_paths) { static gchar *l_called_proc = "gimp_path_list"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { *num_paths = return_vals[1].data.d_int32; return(return_vals[2].data.d_stringarray); /* OK, return path names */ @@ -726,15 +726,15 @@ gchar * p_gimp_path_get_current(gint32 image_id) { static gchar *l_called_proc = "gimp_path_get_current"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(g_strdup(return_vals[1].data.d_string)); /* OK */ } @@ -752,16 +752,16 @@ gint p_gimp_path_set_current(gint32 image_id, gchar *name) { static gchar *l_called_proc = "gimp_path_set_current"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_STRING, name, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_STRING, name, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(0); /* OK */ } @@ -779,16 +779,16 @@ gint32 p_gimp_path_get_locked(gint32 image_id, gchar *name) { static gchar *l_called_proc = "gimp_path_get_locked"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_STRING, name, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_STRING, name, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(return_vals[1].data.d_int32); /* OK */ } @@ -806,17 +806,17 @@ gint p_gimp_path_set_locked(gint32 image_id, gchar *name, gint32 lockstatus) { static gchar *l_called_proc = "gimp_path_set_locked"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_STRING, name, - PARAM_INT32, lockstatus, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_STRING, name, + GIMP_PDB_INT32, lockstatus, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(0); /* OK */ } @@ -834,16 +834,16 @@ gint32 p_gimp_path_get_tattoo(gint32 image_id, gchar *name) { static gchar *l_called_proc = "gimp_path_get_tattoo"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_STRING, name, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_STRING, name, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(return_vals[1].data.d_int32); /* OK */ } @@ -861,7 +861,7 @@ gint p_gimp_path_set_tattoo(gint32 image_id, gchar *name, gint32 tattoovalue) { static gchar *l_called_proc = "gimp_path_set_tattoo"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; if(p_procedure_available(l_called_proc) < 0) @@ -870,12 +870,12 @@ p_gimp_path_set_tattoo(gint32 image_id, gchar *name, gint32 tattoovalue) } return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_STRING, name, - PARAM_INT32, tattoovalue, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_STRING, name, + GIMP_PDB_INT32, tattoovalue, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(0); /* OK */ } @@ -894,7 +894,7 @@ gint p_gimp_layer_set_tattoo(gint32 layer_id, gint32 tattoovalue) { static gchar *l_called_proc = "gimp_layer_set_tattoo"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; if(p_procedure_available(l_called_proc) < 0) @@ -903,11 +903,11 @@ p_gimp_layer_set_tattoo(gint32 layer_id, gint32 tattoovalue) } return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_LAYER, layer_id, - PARAM_INT32, tattoovalue, - PARAM_END); + GIMP_PDB_LAYER, layer_id, + GIMP_PDB_INT32, tattoovalue, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(0); /* OK */ } @@ -926,7 +926,7 @@ gint p_gimp_channel_set_tattoo(gint32 channel_id, gint32 tattoovalue) { static gchar *l_called_proc = "gimp_channel_set_tattoo"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; if(p_procedure_available(l_called_proc) < 0) @@ -935,11 +935,11 @@ p_gimp_channel_set_tattoo(gint32 channel_id, gint32 tattoovalue) } return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_CHANNEL, channel_id, - PARAM_INT32, tattoovalue, - PARAM_END); + GIMP_PDB_CHANNEL, channel_id, + GIMP_PDB_INT32, tattoovalue, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(0); /* OK */ } @@ -958,7 +958,7 @@ gint p_gimp_image_set_tattoo_state(gint32 image_id, gint32 tattoo_state) { static gchar *l_called_proc = "gimp_image_set_tattoo_state"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; if(p_procedure_available(l_called_proc) < 0) @@ -967,11 +967,11 @@ p_gimp_image_set_tattoo_state(gint32 image_id, gint32 tattoo_state) } return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_INT32, tattoo_state, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_INT32, tattoo_state, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(0); /* OK */ } @@ -989,7 +989,7 @@ gint32 p_gimp_image_get_tattoo_state(gint32 image_id) { static gchar *l_called_proc = "gimp_image_get_tattoo_state"; - GParam *return_vals; + GimpParam *return_vals; int nreturn_vals; if(p_procedure_available(l_called_proc) < 0) @@ -998,10 +998,10 @@ p_gimp_image_get_tattoo_state(gint32 image_id) } return_vals = gimp_run_procedure (l_called_proc, &nreturn_vals, - PARAM_IMAGE, image_id, - PARAM_END); + GIMP_PDB_IMAGE, image_id, + GIMP_PDB_END); - if (return_vals[0].data.d_status == STATUS_SUCCESS) + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) { return(return_vals[1].data.d_int32); /* OK */ }