plug-ins/FractalExplorer/*.[ch] plug-ins/Lighting/*.[ch]

2000-08-22  Sven Neumann  <sven@gimp.org>

* plug-ins/FractalExplorer/*.[ch]
* plug-ins/Lighting/*.[ch]
* plug-ins/MapObject/*.[ch]
* plug-ins/bmp/*.[ch]
* plug-ins/faxg3/faxg3.c
* plug-ins/fits/fits.c
* plug-ins/flame/flame.c
* plug-ins/fp/*.[ch]
* plug-ins/gap/*.[ch]
* plug-ins/gdyntext/*.[ch]
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c
* plug-ins/gfli/gfli.c
* plug-ins/gimpressionist/*.c
* plug-ins/script-fu/*.[ch]: removed COMPAT_CRUFT.
This commit is contained in:
Sven Neumann 2000-08-22 03:27:14 +00:00 committed by Sven Neumann
parent fdd6acd82f
commit 72403e73d3
78 changed files with 1829 additions and 1808 deletions

View File

@ -1,3 +1,21 @@
2000-08-22 Sven Neumann <sven@gimp.org>
* plug-ins/FractalExplorer/*.[ch]
* plug-ins/Lighting/*.[ch]
* plug-ins/MapObject/*.[ch]
* plug-ins/bmp/*.[ch]
* plug-ins/faxg3/faxg3.c
* plug-ins/fits/fits.c
* plug-ins/flame/flame.c
* plug-ins/fp/*.[ch]
* plug-ins/gap/*.[ch]
* plug-ins/gdyntext/*.[ch]
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c
* plug-ins/gfli/gfli.c
* plug-ins/gimpressionist/*.c
* plug-ins/script-fu/*.[ch]: removed COMPAT_CRUFT.
Tue Aug 22 03:35:46 CEST 2000 Daniel Egger <egger@suse.de>
* plug-ins/common/AlienMap.c: Cleaned up AlienMap

View File

@ -205,7 +205,7 @@ explorer_number_of_colors_callback (GtkAdjustment *adjustment,
if (gradient_name == NULL)
gradient_name = gimp_gradients_get_active ();
gimp_gradient_get_gradient_data (gradient_name, &dummy, wvals.ncolors,
gimp_gradients_get_gradient_data (gradient_name, &dummy, wvals.ncolors,
&gradient_samples);
set_cmap_preview ();
@ -226,7 +226,7 @@ explorer_gradient_select_callback (gchar *name,
gradient_name = g_strdup (name);
gimp_gradient_get_gradient_data (gradient_name, &dummy, wvals.ncolors,
gimp_gradients_get_gradient_data (gradient_name, &dummy, wvals.ncolors,
&gradient_samples);
if (wvals.colormode == 1)

View File

@ -96,11 +96,11 @@
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 void explorer (GDrawable *drawable);
static void explorer (GimpDrawable *drawable);
static void explorer_render_row (const guchar *src_row,
guchar *dest_row,
gint row,
@ -158,7 +158,7 @@ static void fractalexplorer_rescan_ok_callback (GtkWidget *widget,
static void fractalexplorer_rescan_list (void);
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -179,29 +179,29 @@ MAIN()
static void
query (void)
{
static GParamDef args[] =
static GimpParamDef args[] =
{
{ PARAM_INT32, "run_mode", "Interactive, non-interactive" },
{ PARAM_IMAGE, "image", "Input image" },
{ PARAM_DRAWABLE, "drawable", "Input drawable" },
{ PARAM_INT8, "fractaltype", "0: Mandelbrot; 1: Julia; 2: Barnsley 1; 3: Barnsley 2; 4: Barnsley 3; 5: Spider; 6: ManOWar; 7: Lambda; 8: Sierpinski" },
{ PARAM_FLOAT, "xmin", "xmin fractal image delimiter" },
{ PARAM_FLOAT, "xmax", "xmax fractal image delimiter" },
{ PARAM_FLOAT, "ymin", "ymin fractal image delimiter" },
{ PARAM_FLOAT, "ymax", "ymax fractal image delimiter" },
{ PARAM_FLOAT, "iter", "Iteration value" },
{ PARAM_FLOAT, "cx", "cx value ( only Julia)" },
{ PARAM_FLOAT, "cy", "cy value ( only Julia)" },
{ PARAM_INT8, "colormode", "0: Apply colormap as specified by the parameters below; 1: Apply active gradient to final image" },
{ PARAM_FLOAT, "redstretch", "Red stretching factor" },
{ PARAM_FLOAT, "greenstretch", "Green stretching factor" },
{ PARAM_FLOAT, "bluestretch", "Blue stretching factor" },
{ PARAM_INT8, "redmode", "Red application mode (0:SIN;1:COS;2:NONE)" },
{ PARAM_INT8, "greenmode", "Green application mode (0:SIN;1:COS;2:NONE)" },
{ PARAM_INT8, "bluemode", "Blue application mode (0:SIN;1:COS;2:NONE)" },
{ PARAM_INT8, "redinvert", "Red inversion mode (1: enabled; 0: disabled)" },
{ PARAM_INT8, "greeninvert", "Green inversion mode (1: enabled; 0: disabled)" },
{ PARAM_INT8, "blueinvert", "Green inversion mode (1: enabled; 0: disabled)" },
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT8, "fractaltype", "0: Mandelbrot; 1: Julia; 2: Barnsley 1; 3: Barnsley 2; 4: Barnsley 3; 5: Spider; 6: ManOWar; 7: Lambda; 8: Sierpinski" },
{ GIMP_PDB_FLOAT, "xmin", "xmin fractal image delimiter" },
{ GIMP_PDB_FLOAT, "xmax", "xmax fractal image delimiter" },
{ GIMP_PDB_FLOAT, "ymin", "ymin fractal image delimiter" },
{ GIMP_PDB_FLOAT, "ymax", "ymax fractal image delimiter" },
{ GIMP_PDB_FLOAT, "iter", "Iteration value" },
{ GIMP_PDB_FLOAT, "cx", "cx value ( only Julia)" },
{ GIMP_PDB_FLOAT, "cy", "cy value ( only Julia)" },
{ GIMP_PDB_INT8, "colormode", "0: Apply colormap as specified by the parameters below; 1: Apply active gradient to final image" },
{ GIMP_PDB_FLOAT, "redstretch", "Red stretching factor" },
{ GIMP_PDB_FLOAT, "greenstretch", "Green stretching factor" },
{ GIMP_PDB_FLOAT, "bluestretch", "Blue stretching factor" },
{ GIMP_PDB_INT8, "redmode", "Red application mode (0:SIN;1:COS;2:NONE)" },
{ GIMP_PDB_INT8, "greenmode", "Green application mode (0:SIN;1:COS;2:NONE)" },
{ GIMP_PDB_INT8, "bluemode", "Blue application mode (0:SIN;1:COS;2:NONE)" },
{ GIMP_PDB_INT8, "redinvert", "Red inversion mode (1: enabled; 0: disabled)" },
{ GIMP_PDB_INT8, "greeninvert", "Green inversion mode (1: enabled; 0: disabled)" },
{ GIMP_PDB_INT8, "blueinvert", "Green inversion mode (1: enabled; 0: disabled)" },
};
static gint nargs = sizeof(args) / sizeof(args[0]);
@ -215,7 +215,7 @@ query (void)
"December, 1998",
N_("<Image>/Filters/Render/Pattern/Fractal Explorer..."),
"RGB*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs, 0,
args, NULL);
}
@ -227,22 +227,22 @@ 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];
static GimpParam values[1];
gint32 image_ID;
GRunModeType run_mode;
GimpRunModeType run_mode;
gdouble xhsiz;
gdouble yhsiz;
gint pwidth;
gint pheight;
GStatusType status = STATUS_SUCCESS;
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;
@ -289,7 +289,7 @@ run (gchar *name,
/* See how we will run */
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("plug_in_fractalexplorer", &wvals);
@ -299,11 +299,11 @@ run (gchar *name,
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
/* Make sure all the arguments are present */
if (nparams != 22)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
else
{
@ -330,7 +330,7 @@ run (gchar *name,
make_color_map();
break;
case RUN_WITH_LAST_VALS:
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
gimp_get_data ("plug_in_fractalexplorer", &wvals);
make_color_map ();
@ -347,7 +347,7 @@ run (gchar *name,
cx = wvals.cx;
cy = wvals.cy;
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
/* Make sure that the drawable is indexed or RGB color */
if (gimp_drawable_is_rgb(drawable->id))
@ -359,17 +359,17 @@ run (gchar *name,
/* Run! */
explorer (drawable);
if (run_mode != RUN_NONINTERACTIVE)
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush ();
/* Store data */
if (run_mode == RUN_INTERACTIVE)
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_fractalexplorer",
&wvals, sizeof (explorer_vals_t));
}
else
{
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
}
values[0].data.d_status = status;
@ -382,10 +382,10 @@ run (gchar *name,
*********************************************************************/
static void
explorer (GDrawable * drawable)
explorer (GimpDrawable * drawable)
{
GPixelRgn srcPR;
GPixelRgn destPR;
GimpPixelRgn srcPR;
GimpPixelRgn destPR;
gint width;
gint height;
gint bytes;

View File

@ -189,7 +189,7 @@ extern double x_release,
y_release;
extern float cx;
extern float cy;
extern GDrawable *drawable;
extern GimpDrawable *drawable;
extern gint tile_width,
tile_height;
extern gint img_width,
@ -203,7 +203,7 @@ extern gint sel_width,
sel_height;
extern gint preview_width,
preview_height;
extern GTile *the_tile;
extern GimpTile *the_tile;
extern double cen_x,
cen_y;
extern double xpos,

View File

@ -18,7 +18,7 @@ double x_release = -1.0,
y_release = -1.0;
float cx = -0.75;
float cy = -0.2;
GDrawable *drawable;
GimpDrawable *drawable;
gint tile_width,
tile_height;
gint img_width,
@ -32,7 +32,7 @@ gint sel_width,
sel_height;
gint preview_width,
preview_height;
GTile *the_tile = NULL;
GimpTile *the_tile = NULL;
double cen_x,
cen_y;
double xpos,

View File

@ -67,7 +67,7 @@ compute_image (void)
/* Create a new image */
/* ================== */
new_image_id=gimp_image_new(width,height,RGB);
new_image_id=gimp_image_new(width,height,GIMP_RGB);
if (mapvals.transparent_background==TRUE)
{
@ -75,7 +75,7 @@ compute_image (void)
/* ================================= */
new_layer_id=gimp_layer_new(new_image_id,"Background",
width,height,RGBA_IMAGE,100.0,NORMAL_MODE);
width,height,GIMP_RGBA_IMAGE,100.0,GIMP_NORMAL_MODE);
}
else
{
@ -83,7 +83,7 @@ compute_image (void)
/* ======================= */
new_layer_id=gimp_layer_new(new_image_id,"Background",
width,height,RGB_IMAGE,100.0,NORMAL_MODE);
width,height,GIMP_RGB_IMAGE,100.0,GIMP_NORMAL_MODE);
}
gimp_image_add_layer(new_image_id,new_layer_id,0);

View File

@ -13,14 +13,14 @@
#include "lighting_preview.h"
#include "lighting_ui.h"
GDrawable *input_drawable,*output_drawable;
GPixelRgn source_region, dest_region;
GimpDrawable *input_drawable,*output_drawable;
GimpPixelRgn source_region, dest_region;
GDrawable *bump_drawable = NULL;
GPixelRgn bump_region;
GimpDrawable *bump_drawable = NULL;
GimpPixelRgn bump_region;
GDrawable *env_drawable = NULL;
GPixelRgn env_region;
GimpDrawable *env_drawable = NULL;
GimpPixelRgn env_region;
guchar *preview_rgb_data = NULL;
GdkImage *image = NULL;
@ -38,7 +38,7 @@ guchar sinemap[256], spheremap[256], logmap[256];
/******************/
guchar
peek_map (GPixelRgn *region,
peek_map (GimpPixelRgn *region,
gint x,
gint y)
{
@ -269,7 +269,7 @@ get_image_color (gdouble u,
}
gdouble
get_map_value (GPixelRgn *region,
get_map_value (GimpPixelRgn *region,
gdouble u,
gdouble v,
gint *inside)
@ -330,7 +330,7 @@ compute_maps (void)
/****************************************/
gint
image_setup (GDrawable *drawable,
image_setup (GimpDrawable *drawable,
gint interactive)
{
glong numbytes;

View File

@ -1,14 +1,14 @@
#ifndef __LIGHTING_IMAGE_H__
#define __LIGHTING_IMAGE_H__
extern GDrawable *input_drawable,*output_drawable;
extern GPixelRgn source_region, dest_region;
extern GimpDrawable *input_drawable,*output_drawable;
extern GimpPixelRgn source_region, dest_region;
extern GDrawable *bump_drawable;
extern GPixelRgn bump_region;
extern GimpDrawable *bump_drawable;
extern GimpPixelRgn bump_region;
extern GDrawable *env_drawable;
extern GPixelRgn env_region;
extern GimpDrawable *env_drawable;
extern GimpPixelRgn env_region;
extern guchar *preview_rgb_data;
extern GdkImage *image;
@ -21,7 +21,7 @@ extern gint border_x1,border_y1,border_x2,border_y2;
extern guchar sinemap[256], spheremap[256], logmap[256];
guchar peek_map (GPixelRgn *region,
guchar peek_map (GimpPixelRgn *region,
gint x,
gint y);
GckRGB peek (gint x,
@ -48,11 +48,11 @@ void pos_to_float (gdouble x,
GckRGB get_image_color (gdouble u,
gdouble v,
gint *inside);
gdouble get_map_value (GPixelRgn *region,
gdouble get_map_value (GimpPixelRgn *region,
gdouble u,
gdouble v,
gint *inside);
gint image_setup (GDrawable *drawable,
gint image_setup (GimpDrawable *drawable,
gint interactive);
#endif /* __LIGHTING_IMAGE_H__ */

View File

@ -130,32 +130,32 @@ check_drawables (void)
static void
query (void)
{
static GParamDef args[] =
static GimpParamDef args[] =
{
{ PARAM_INT32, "run_mode", "Interactive (0), non-interactive (1)" },
{ PARAM_IMAGE, "image", "Input image" },
{ PARAM_DRAWABLE, "drawable", "Input drawable" },
{ PARAM_DRAWABLE, "bumpdrawable", "Bumpmap drawable (set to 0 if disabled)" },
{ PARAM_DRAWABLE, "envdrawable", "Environmentmap drawable (set to 0 if disabled)" },
{ PARAM_INT32, "dobumpmap", "Enable bumpmapping (TRUE/FALSE)" },
{ PARAM_INT32, "doenvmap", "Enable envmapping (TRUE/FALSE)" },
{ PARAM_INT32, "bumpmaptype", "Type of mapping (0=linear,1=log, 2=sinusoidal, 3=spherical)" },
{ PARAM_INT32, "lighttype", "Type of lightsource (0=point,1=directional,3=spot,4=none)" },
{ PARAM_COLOR, "lightcolor", "Lightsource color (r,g,b)" },
{ PARAM_FLOAT, "lightposition_x", "Lightsource position (x,y,z)" },
{ PARAM_FLOAT, "lightposition_y", "Lightsource position (x,y,z)" },
{ PARAM_FLOAT, "lightposition_z", "Lightsource position (x,y,z)" },
{ PARAM_FLOAT, "lightdirection_x", "Lightsource direction [x,y,z]" },
{ PARAM_FLOAT, "lightdirection_y", "Lightsource direction [x,y,z]" },
{ PARAM_FLOAT, "lightdirection_z", "Lightsource direction [x,y,z]" },
{ PARAM_FLOAT, "ambient_intensity", "Material ambient intensity (0..1)" },
{ PARAM_FLOAT, "diffuse_intensity", "Material diffuse intensity (0..1)" },
{ PARAM_FLOAT, "diffuse_reflectivity", "Material diffuse reflectivity (0..1)" },
{ PARAM_FLOAT, "specular_reflectivity", "Material specular reflectivity (0..1)" },
{ PARAM_FLOAT, "highlight", "Material highlight (0..->), note: it's expotential" },
{ PARAM_INT32, "antialiasing", "Apply antialiasing (TRUE/FALSE)" },
{ PARAM_INT32, "newimage", "Create a new image (TRUE/FALSE)" },
{ PARAM_INT32, "transparentbackground", "Make background transparent (TRUE/FALSE)" }
{ GIMP_PDB_INT32, "run_mode", "Interactive (0), non-interactive (1)" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_DRAWABLE, "bumpdrawable", "Bumpmap drawable (set to 0 if disabled)" },
{ GIMP_PDB_DRAWABLE, "envdrawable", "Environmentmap drawable (set to 0 if disabled)" },
{ GIMP_PDB_INT32, "dobumpmap", "Enable bumpmapping (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "doenvmap", "Enable envmapping (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "bumpmaptype", "Type of mapping (0=linear,1=log, 2=sinusoidal, 3=spherical)" },
{ GIMP_PDB_INT32, "lighttype", "Type of lightsource (0=point,1=directional,3=spot,4=none)" },
{ GIMP_PDB_COLOR, "lightcolor", "Lightsource color (r,g,b)" },
{ GIMP_PDB_FLOAT, "lightposition_x", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition_y", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition_z", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightdirection_x", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection_y", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection_z", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "ambient_intensity", "Material ambient intensity (0..1)" },
{ GIMP_PDB_FLOAT, "diffuse_intensity", "Material diffuse intensity (0..1)" },
{ GIMP_PDB_FLOAT, "diffuse_reflectivity", "Material diffuse reflectivity (0..1)" },
{ GIMP_PDB_FLOAT, "specular_reflectivity", "Material specular reflectivity (0..1)" },
{ GIMP_PDB_FLOAT, "highlight", "Material highlight (0..->), note: it's expotential" },
{ GIMP_PDB_INT32, "antialiasing", "Apply antialiasing (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "newimage", "Create a new image (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "transparentbackground", "Make background transparent (TRUE/FALSE)" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
@ -169,7 +169,7 @@ query (void)
"Version 0.2.0, March 15 1998",
N_("<Image>/Filters/Light Effects/Lighting Effects..."),
"RGB*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs, 0,
args, NULL);
}
@ -177,18 +177,18 @@ 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;
GRunModeType run_mode;
GStatusType status = STATUS_SUCCESS;
static GimpParam values[1];
GimpDrawable *drawable;
GimpRunModeType run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
run_mode = param[0].data.d_int32;
if (run_mode == RUN_INTERACTIVE)
if (run_mode == GIMP_RUN_INTERACTIVE)
{
INIT_I18N_UI();
}
@ -200,7 +200,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;
/* Set default values */
@ -222,7 +222,7 @@ run (gchar *name,
check_drawables ();
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
/* Make sure that the drawable is RGBA or RGB color */
/* ================================================ */
@ -236,7 +236,7 @@ run (gchar *name,
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
if (main_dialog (drawable))
{
compute_image ();
@ -246,15 +246,15 @@ run (gchar *name,
}
break;
case RUN_WITH_LAST_VALS:
case GIMP_RUN_WITH_LAST_VALS:
image_setup (drawable, FALSE);
compute_image ();
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
if (nparams != 24)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
else
{
@ -291,10 +291,10 @@ run (gchar *name,
}
}
else
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
if (run_mode != RUN_NONINTERACTIVE)
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush ();
values[0].data.d_status = status;
@ -306,7 +306,7 @@ run (gchar *name,
g_free (ypostab);
}
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */

View File

@ -1045,7 +1045,7 @@ create_main_notebook (GtkWidget *container)
/********************************/
gboolean
main_dialog (GDrawable *drawable)
main_dialog (GimpDrawable *drawable)
{
GtkWidget *main_hbox;
GtkWidget *vbox;

View File

@ -12,6 +12,6 @@ extern GtkWidget *previewarea;
/* Externally visible functions */
/* ============================ */
gboolean main_dialog (GDrawable *drawable);
gboolean main_dialog (GimpDrawable *drawable);
#endif /* __LIGHTING_UI_H__ */

View File

@ -204,21 +204,21 @@ void compute_image(void)
/* Create a new image */
/* ================== */
new_image_id=gimp_image_new(width,height,RGB);
new_image_id=gimp_image_new(width,height,GIMP_RGB);
if (mapvals.transparent_background==TRUE)
{
/* Add a layer with an alpha channel */
/* ================================= */
new_layer_id=gimp_layer_new(new_image_id,"Background",width,height,RGBA_IMAGE,100.0,NORMAL_MODE);
new_layer_id=gimp_layer_new(new_image_id,"Background",width,height,GIMP_RGBA_IMAGE,100.0,GIMP_NORMAL_MODE);
}
else
{
/* Create a "normal" layer */
/* ======================= */
new_layer_id=gimp_layer_new(new_image_id,"Background",width,height,RGB_IMAGE,100.0,NORMAL_MODE);
new_layer_id=gimp_layer_new(new_image_id,"Background",width,height,GIMP_RGB_IMAGE,100.0,GIMP_NORMAL_MODE);
}
gimp_image_add_layer(new_image_id,new_layer_id,0);

View File

@ -19,14 +19,14 @@
#include "mapobject_ui.h"
#include "mapobject_image.h"
GDrawable *input_drawable,*output_drawable;
GPixelRgn source_region,dest_region;
GimpDrawable *input_drawable,*output_drawable;
GimpPixelRgn source_region,dest_region;
GDrawable *box_drawables[6];
GPixelRgn box_regions[6];
GimpDrawable *box_drawables[6];
GimpPixelRgn box_regions[6];
GDrawable *cylinder_drawables[2];
GPixelRgn cylinder_regions[2];
GimpDrawable *cylinder_drawables[2];
GimpPixelRgn cylinder_regions[2];
guchar *preview_rgb_data = NULL;
GdkImage *image = NULL;
@ -326,7 +326,7 @@ get_cylinder_image_color (gint image,
/****************************************/
gint
image_setup (GDrawable *drawable,
image_setup (GimpDrawable *drawable,
gint interactive)
{
glong numbytes;

View File

@ -4,14 +4,14 @@
/* Externally visible variables */
/* ============================ */
extern GDrawable *input_drawable,*output_drawable;
extern GPixelRgn source_region,dest_region;
extern GimpDrawable *input_drawable,*output_drawable;
extern GimpPixelRgn source_region,dest_region;
extern GDrawable *box_drawables[6];
extern GPixelRgn box_regions[6];
extern GimpDrawable *box_drawables[6];
extern GimpPixelRgn box_regions[6];
extern GDrawable *cylinder_drawables[2];
extern GPixelRgn cylinder_regions[2];
extern GimpDrawable *cylinder_drawables[2];
extern GimpPixelRgn cylinder_regions[2];
extern guchar *preview_rgb_data;
extern GdkImage *image;
@ -23,12 +23,12 @@ extern gdouble oldtreshold;
extern gint border_x1, border_y1, border_x2, border_y2;
extern GTile *current_in_tile, *current_out_tile;
extern GimpTile *current_in_tile, *current_out_tile;
/* Externally visible functions */
/* ============================ */
extern gint image_setup (GDrawable *drawable,
extern gint image_setup (GimpDrawable *drawable,
gint interactive);
extern glong in_xy_to_index (gint x,
gint y);

View File

@ -104,7 +104,7 @@ set_default_settings (void)
}
static void
check_drawables (GDrawable *drawable)
check_drawables (GimpDrawable *drawable)
{
gint i;
@ -140,57 +140,57 @@ check_drawables (GDrawable *drawable)
static void
query (void)
{
static GParamDef args[] =
static GimpParamDef args[] =
{
{ PARAM_INT32, "run_mode", "Interactive (0), non-interactive (1)" },
{ PARAM_IMAGE, "image", "Input image" },
{ PARAM_DRAWABLE, "drawable", "Input drawable" },
{ PARAM_INT32, "maptype", "Type of mapping (0=plane,1=sphere,2=box,3=cylinder)" },
{ PARAM_FLOAT, "viewpoint_x", "Position of viewpoint (x,y,z)" },
{ PARAM_FLOAT, "viewpoint_y", "Position of viewpoint (x,y,z)" },
{ PARAM_FLOAT, "viewpoint_z", "Position of viewpoint (x,y,z)" },
{ PARAM_FLOAT, "position_x", "Object position (x,y,z)" },
{ PARAM_FLOAT, "position_y", "Object position (x,y,z)" },
{ PARAM_FLOAT, "position_z", "Object position (x,y,z)" },
{ PARAM_FLOAT, "firstaxis_x", "First axis of object [x,y,z]" },
{ PARAM_FLOAT, "firstaxis_y", "First axis of object [x,y,z]" },
{ PARAM_FLOAT, "firstaxis_z", "First axis of object [x,y,z]" },
{ PARAM_FLOAT, "secondaxis_x", "Second axis of object [x,y,z]" },
{ PARAM_FLOAT, "secondaxis_y", "Second axis of object [x,y,z]" },
{ PARAM_FLOAT, "secondaxis_z", "Second axis of object [x,y,z]" },
{ PARAM_FLOAT, "rotationangle_x", "Rotation about X axis in degrees" },
{ PARAM_FLOAT, "rotationangle_y", "Rotation about Y axis in degrees" },
{ PARAM_FLOAT, "rotationangle_z", "Rotation about Z axis in degrees" },
{ PARAM_INT32, "lighttype", "Type of lightsource (0=point,1=directional,3=none)" },
{ PARAM_COLOR, "lightcolor", "Lightsource color (r,g,b)" },
{ PARAM_FLOAT, "lightposition_x", "Lightsource position (x,y,z)" },
{ PARAM_FLOAT, "lightposition_y", "Lightsource position (x,y,z)" },
{ PARAM_FLOAT, "lightposition_z", "Lightsource position (x,y,z)" },
{ PARAM_FLOAT, "lightdirection_x", "Lightsource direction [x,y,z]" },
{ PARAM_FLOAT, "lightdirection_y", "Lightsource direction [x,y,z]" },
{ PARAM_FLOAT, "lightdirection_z", "Lightsource direction [x,y,z]" },
{ PARAM_FLOAT, "ambient_intensity", "Material ambient intensity (0..1)" },
{ PARAM_FLOAT, "diffuse_intensity", "Material diffuse intensity (0..1)" },
{ PARAM_FLOAT, "diffuse_reflectivity", "Material diffuse reflectivity (0..1)" },
{ PARAM_FLOAT, "specular_reflectivity", "Material specular reflectivity (0..1)" },
{ PARAM_FLOAT, "highlight", "Material highlight (0..->), note: it's expotential" },
{ PARAM_INT32, "antialiasing", "Apply antialiasing (TRUE/FALSE)" },
{ PARAM_INT32, "tiled", "Tile source image (TRUE/FALSE)" },
{ PARAM_INT32, "newimage", "Create a new image (TRUE/FALSE)" },
{ PARAM_INT32, "transparentbackground", "Make background transparent (TRUE/FALSE)" },
{ PARAM_FLOAT, "radius", "Sphere/cylinder radius (only used when maptype=1 or 3)" },
{ PARAM_FLOAT, "x_scale", "Box x size (0..->)" },
{ PARAM_FLOAT, "y_scale", "Box y size (0..->)" },
{ PARAM_FLOAT, "z_scale", "Box z size (0..->)"},
{ PARAM_FLOAT, "cylinder_length", "Cylinder length (0..->)"},
{ PARAM_DRAWABLE, "box_front_drawable", "Box front face (set these to -1 if not used)" },
{ PARAM_DRAWABLE, "box_back_drawable", "Box back face" },
{ PARAM_DRAWABLE, "box_top_drawable", "Box top face" },
{ PARAM_DRAWABLE, "box_bottom_drawable", "Box bottom face" },
{ PARAM_DRAWABLE, "box_left_drawable", "Box left face" },
{ PARAM_DRAWABLE, "box_right_drawable", "Box right face" },
{ PARAM_DRAWABLE, "cyl_top_drawable", "Cylinder top face (set these to -1 if not used)" },
{ PARAM_DRAWABLE, "cyl_bottom_drawable", "Cylinder bottom face" }
{ GIMP_PDB_INT32, "run_mode", "Interactive (0), non-interactive (1)" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "maptype", "Type of mapping (0=plane,1=sphere,2=box,3=cylinder)" },
{ GIMP_PDB_FLOAT, "viewpoint_x", "Position of viewpoint (x,y,z)" },
{ GIMP_PDB_FLOAT, "viewpoint_y", "Position of viewpoint (x,y,z)" },
{ GIMP_PDB_FLOAT, "viewpoint_z", "Position of viewpoint (x,y,z)" },
{ GIMP_PDB_FLOAT, "position_x", "Object position (x,y,z)" },
{ GIMP_PDB_FLOAT, "position_y", "Object position (x,y,z)" },
{ GIMP_PDB_FLOAT, "position_z", "Object position (x,y,z)" },
{ GIMP_PDB_FLOAT, "firstaxis_x", "First axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "firstaxis_y", "First axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "firstaxis_z", "First axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "secondaxis_x", "Second axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "secondaxis_y", "Second axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "secondaxis_z", "Second axis of object [x,y,z]" },
{ GIMP_PDB_FLOAT, "rotationangle_x", "Rotation about X axis in degrees" },
{ GIMP_PDB_FLOAT, "rotationangle_y", "Rotation about Y axis in degrees" },
{ GIMP_PDB_FLOAT, "rotationangle_z", "Rotation about Z axis in degrees" },
{ GIMP_PDB_INT32, "lighttype", "Type of lightsource (0=point,1=directional,3=none)" },
{ GIMP_PDB_COLOR, "lightcolor", "Lightsource color (r,g,b)" },
{ GIMP_PDB_FLOAT, "lightposition_x", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition_y", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightposition_z", "Lightsource position (x,y,z)" },
{ GIMP_PDB_FLOAT, "lightdirection_x", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection_y", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "lightdirection_z", "Lightsource direction [x,y,z]" },
{ GIMP_PDB_FLOAT, "ambient_intensity", "Material ambient intensity (0..1)" },
{ GIMP_PDB_FLOAT, "diffuse_intensity", "Material diffuse intensity (0..1)" },
{ GIMP_PDB_FLOAT, "diffuse_reflectivity", "Material diffuse reflectivity (0..1)" },
{ GIMP_PDB_FLOAT, "specular_reflectivity", "Material specular reflectivity (0..1)" },
{ GIMP_PDB_FLOAT, "highlight", "Material highlight (0..->), note: it's expotential" },
{ GIMP_PDB_INT32, "antialiasing", "Apply antialiasing (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "tiled", "Tile source image (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "newimage", "Create a new image (TRUE/FALSE)" },
{ GIMP_PDB_INT32, "transparentbackground", "Make background transparent (TRUE/FALSE)" },
{ GIMP_PDB_FLOAT, "radius", "Sphere/cylinder radius (only used when maptype=1 or 3)" },
{ GIMP_PDB_FLOAT, "x_scale", "Box x size (0..->)" },
{ GIMP_PDB_FLOAT, "y_scale", "Box y size (0..->)" },
{ GIMP_PDB_FLOAT, "z_scale", "Box z size (0..->)"},
{ GIMP_PDB_FLOAT, "cylinder_length", "Cylinder length (0..->)"},
{ GIMP_PDB_DRAWABLE, "box_front_drawable", "Box front face (set these to -1 if not used)" },
{ GIMP_PDB_DRAWABLE, "box_back_drawable", "Box back face" },
{ GIMP_PDB_DRAWABLE, "box_top_drawable", "Box top face" },
{ GIMP_PDB_DRAWABLE, "box_bottom_drawable", "Box bottom face" },
{ GIMP_PDB_DRAWABLE, "box_left_drawable", "Box left face" },
{ GIMP_PDB_DRAWABLE, "box_right_drawable", "Box right face" },
{ GIMP_PDB_DRAWABLE, "cyl_top_drawable", "Cylinder top face (set these to -1 if not used)" },
{ GIMP_PDB_DRAWABLE, "cyl_bottom_drawable", "Cylinder bottom face" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
@ -204,7 +204,7 @@ query (void)
"Version 1.2.0, July 16 1998",
N_("<Image>/Filters/Map/Map Object..."),
"RGB*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs, 0,
args, NULL);
}
@ -212,19 +212,19 @@ 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;
GRunModeType run_mode;
GStatusType status = STATUS_SUCCESS;
static GimpParam values[1];
GimpDrawable *drawable;
GimpRunModeType run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint i;
run_mode = param[0].data.d_int32;
if (run_mode == RUN_INTERACTIVE)
if (run_mode == GIMP_RUN_INTERACTIVE)
{
INIT_I18N_UI();
}
@ -233,7 +233,7 @@ run (gchar *name,
INIT_I18N();
}
values[0].type = PARAM_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
*nreturn_vals = 1;
@ -251,7 +251,7 @@ run (gchar *name,
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
/* ====================== */
@ -267,17 +267,17 @@ run (gchar *name,
}
break;
case RUN_WITH_LAST_VALS:
case GIMP_RUN_WITH_LAST_VALS:
gimp_get_data ("plug_in_map_object", &mapvals);
check_drawables (drawable);
image_setup (drawable, FALSE);
compute_image ();
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
if (nparams != 49)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
else
{
@ -340,13 +340,13 @@ run (gchar *name,
values[0].data.d_status = status;
if (run_mode != RUN_NONINTERACTIVE)
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush ();
gimp_drawable_detach (drawable);
}
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */

View File

@ -1346,7 +1346,7 @@ create_main_notebook (GtkWidget *container)
/********************************/
gboolean
main_dialog (GDrawable *drawable)
main_dialog (GimpDrawable *drawable)
{
GtkWidget *main_hbox;
GtkWidget *vbox;

View File

@ -12,6 +12,6 @@ extern GtkWidget *previewarea;
/* Externally visible functions */
/* ============================ */
gboolean main_dialog (GDrawable *drawable);
gboolean main_dialog (GimpDrawable *drawable);
#endif /* __MAPOBJECT_UI_H__ */

View File

@ -76,11 +76,11 @@ struct Bitmap_Head_Struct Bitmap_Head;
static void query (void);
static void run (gchar *name,
gint nparams,
GParam *param,
GimpParam *param,
gint *nreturn_vals,
GParam **return_vals);
GimpParam **return_vals);
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -93,27 +93,27 @@ 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 entered" },
{ 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 entered" },
};
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 entered" },
{ 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 entered" },
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
@ -127,7 +127,7 @@ query (void)
"1997",
"<Load>/BMP",
NULL,
PROC_PLUG_IN,
GIMP_PLUGIN,
nload_args, nload_return_vals,
load_args, load_return_vals);
@ -139,7 +139,7 @@ query (void)
"1997",
"<Save>/BMP",
"INDEXED, GRAY, RGB",
PROC_PLUG_IN,
GIMP_PLUGIN,
nsave_args, 0,
save_args, NULL);
@ -155,13 +155,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;
@ -170,8 +170,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;
if (strcmp (name, "file_bmp_load") == 0)
{
@ -179,34 +179,34 @@ run (gchar *name,
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
interactive_bmp = TRUE;
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
/* Make sure all the arguments are there! */
interactive_bmp = FALSE;
if (nparams != 3)
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
break;
default:
break;
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
image_ID = ReadBMP (param[1].data.d_string);
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;
}
}
}
@ -220,8 +220,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 ("bmp", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "BMP",
(CAN_HANDLE_RGB |
@ -229,7 +229,7 @@ run (gchar *name,
CAN_HANDLE_INDEXED));
if (export == EXPORT_CANCEL)
{
values[0].data.d_status = STATUS_CANCEL;
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
}
break;
@ -239,18 +239,18 @@ run (gchar *name,
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
interactive_bmp = TRUE;
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
/* Make sure all the arguments are there! */
interactive_bmp = FALSE;
if (nparams != 5)
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
break;
case RUN_WITH_LAST_VALS:
case GIMP_RUN_WITH_LAST_VALS:
interactive_bmp = FALSE;
break;
@ -258,7 +258,7 @@ run (gchar *name,
break;
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
status = WriteBMP (param[3].data.d_string, image_ID, drawable_ID);
}
@ -268,7 +268,7 @@ run (gchar *name,
}
else
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
values[0].data.d_status = status;

View File

@ -16,7 +16,7 @@ extern gint16 ToS (guchar *);
extern void FromS (gint16,
guchar *);
extern gint32 ReadBMP (gchar *);
extern GStatusType WriteBMP (gchar *,
extern GimpPDBStatusType WriteBMP (gchar *,
gint32,
gint32);
extern gint ReadColorMap (FILE *,

View File

@ -269,11 +269,11 @@ ReadImage (FILE *fd,
gint grey)
{
guchar v,wieviel;
GPixelRgn pixel_rgn;
GimpPixelRgn pixel_rgn;
gint xpos = 0, ypos = 0;
Image image;
gint32 layer;
GDrawable *drawable;
GimpDrawable *drawable;
guchar *dest, *temp, *buffer;
guchar gimp_cmap[768];
gushort rgb;
@ -284,23 +284,23 @@ ReadImage (FILE *fd,
if (bpp >= 16)
{
image = gimp_image_new (width, height, RGB);
image = gimp_image_new (width, height, GIMP_RGB);
layer = gimp_layer_new (image, _("Background"),
width, height, RGB_IMAGE, 100, NORMAL_MODE);
width, height, GIMP_RGB_IMAGE, 100, GIMP_NORMAL_MODE);
channels = 3;
}
else if (grey)
{
image = gimp_image_new (width, height, GRAY);
image = gimp_image_new (width, height, GIMP_GRAY);
layer = gimp_layer_new (image, _("Background"),
width, height, GRAY_IMAGE, 100, NORMAL_MODE);
width, height, GIMP_GRAY_IMAGE, 100, GIMP_NORMAL_MODE);
channels = 1;
}
else
{
image = gimp_image_new (width, height, INDEXED);
image = gimp_image_new (width, height, GIMP_INDEXED);
layer = gimp_layer_new (image, _("Background"),
width, height, INDEXED_IMAGE, 100, NORMAL_MODE);
width, height, GIMP_INDEXED_IMAGE, 100, GIMP_NORMAL_MODE);
channels = 1;
}

View File

@ -67,7 +67,7 @@ static gint save_dialog (void);
static void save_ok_callback (GtkWidget *widget,
gpointer data);
GStatusType
GimpPDBStatusType
WriteBMP (gchar *filename,
gint32 image,
gint32 drawable_ID)
@ -82,9 +82,9 @@ WriteBMP (gchar *filename,
gint colors;
gchar *temp_buf;
guchar *pixels;
GPixelRgn pixel_rgn;
GDrawable *drawable;
GDrawableType drawable_type;
GimpPixelRgn pixel_rgn;
GimpDrawable *drawable;
GimpImageType drawable_type;
guchar puffer[50];
gint i;
@ -96,13 +96,13 @@ WriteBMP (gchar *filename,
0, 0, drawable->width, drawable->height, FALSE, FALSE);
switch (drawable_type)
{
case RGB_IMAGE:
case GRAY_IMAGE:
case INDEXED_IMAGE:
case GIMP_RGB_IMAGE:
case GIMP_GRAY_IMAGE:
case GIMP_INDEXED_IMAGE:
break;
default:
g_message(_("BMP: cannot operate on unknown image types or alpha images"));
return STATUS_EXECUTION_ERROR;
return GIMP_PDB_EXECUTION_ERROR;
break;
}
@ -110,13 +110,13 @@ WriteBMP (gchar *filename,
switch (drawable_type)
{
case RGB_IMAGE:
case GIMP_RGB_IMAGE:
colors = 0;
BitsPerPixel = 24;
MapSize = 0;
channels = 3;
break;
case GRAY_IMAGE:
case GIMP_GRAY_IMAGE:
colors = 256;
BitsPerPixel = 8;
MapSize = 1024;
@ -128,7 +128,7 @@ WriteBMP (gchar *filename,
Blue[i] = i;
}
break;
case INDEXED_IMAGE:
case GIMP_INDEXED_IMAGE:
cmap = gimp_image_get_cmap (image, &colors);
MapSize = 4 * colors;
channels = 1;
@ -149,7 +149,7 @@ WriteBMP (gchar *filename,
break;
default:
fprintf (stderr, "%s: This should not happen\n", prog_name);
return STATUS_EXECUTION_ERROR;
return GIMP_PDB_EXECUTION_ERROR;
}
/* Perhaps someone wants RLE encoded Bitmaps */
@ -157,7 +157,7 @@ WriteBMP (gchar *filename,
if ((BitsPerPixel == 8 || BitsPerPixel == 4) && interactive_bmp)
{
if (! save_dialog ())
return STATUS_CANCEL;
return GIMP_PDB_CANCEL;
}
/* Let's take some file */
@ -165,7 +165,7 @@ WriteBMP (gchar *filename,
if (!outfile)
{
g_message (_("Can't open %s"), filename);
return STATUS_EXECUTION_ERROR;
return GIMP_PDB_EXECUTION_ERROR;
}
/* fetch the image */
@ -298,7 +298,7 @@ WriteBMP (gchar *filename,
gimp_drawable_detach (drawable);
g_free (pixels);
return STATUS_SUCCESS;
return GIMP_PDB_SUCCESS;
}
void

View File

@ -54,16 +54,16 @@ FP_Params Current =
{0,0,0}
};
GDrawable *drawable, *mask;
GimpDrawable *drawable, *mask;
void query (void);
void run (gchar *name,
gint nparams,
GParam *param,
GimpParam *param,
gint *nreturn_vals,
GParam **return_vals);
GimpParam **return_vals);
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -76,11 +76,11 @@ 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" },
};
gint nargs = sizeof (args) / sizeof (args[0]);
@ -92,7 +92,7 @@ query (void)
"27th March 1997",
N_("<Image>/Image/Colors/Filter Pack..."),
"RGB*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs, 0,
args, NULL);
}
@ -102,19 +102,19 @@ query (void)
void
run (gchar *name,
gint nparams,
GParam *param,
GimpParam *param,
gint *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;
INIT_I18N_UI();
values[0].type = PARAM_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
initializeFilterPacks();
@ -126,7 +126,7 @@ run (gchar *name,
gimp_drawable_is_gray (drawable->id) )
{
gimp_message (_("Convert the image to RGB first!"));
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
else if (gimp_drawable_is_rgb (drawable->id) && fp_dialog())
{
@ -135,11 +135,11 @@ run (gchar *name,
fp (drawable);
gimp_displays_flush ();
}
else status = STATUS_EXECUTION_ERROR;
else status = GIMP_PDB_EXECUTION_ERROR;
values[0].data.d_status = status;
if (status==STATUS_SUCCESS)
if (status==GIMP_PDB_SUCCESS)
gimp_drawable_detach (drawable);
}
@ -221,9 +221,9 @@ fp_row (const guchar *src_row,
}
void fp (GDrawable *drawable)
void fp (GimpDrawable *drawable)
{
GPixelRgn srcPR, destPR;
GimpPixelRgn srcPR, destPR;
gint width, height;
gint bytes;
guchar *src_row, *dest_row;

View File

@ -54,15 +54,15 @@
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 *);
gint32 emitgimp (gint, gint, gchar *, gint, gchar *);
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -74,15 +74,15 @@ MAIN ()
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 int nload_args = sizeof (load_args) / sizeof (load_args[0]);
static int nload_return_vals = sizeof (load_return_vals) / sizeof (load_return_vals[0]);
@ -95,7 +95,7 @@ void query (void)
VERSION,
"<Load>/Fax G3",
NULL,
PROC_PLUG_IN,
GIMP_PLUGIN,
nload_args, nload_return_vals,
load_args, load_return_vals);
@ -108,20 +108,20 @@ void 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;
static GimpParam values[2];
GimpRunModeType run_mode;
gint32 image_ID;
run_mode = param[0].data.d_int32;
*nreturn_vals = 1;
*return_vals = values;
values[0].type = PARAM_STATUS;
values[0].data.d_status = STATUS_CALLING_ERROR;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
if (strcmp (name, "file_faxg3_load") == 0)
{
@ -129,16 +129,16 @@ run (gchar *name,
*nreturn_vals = 2;
image_ID = load_image (param[1].data.d_string);
values[1].type = PARAM_IMAGE;
values[1].type = GIMP_PDB_IMAGE;
values[1].data.d_image = image_ID;
if (image_ID != -1)
{
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;
}
}
}
@ -426,8 +426,8 @@ do_write: /* write pbm (or whatever) file */
gint32 emitgimp ( int hcol, int row, char *bitmap, int bperrow, char *filename )
{
GPixelRgn pixel_rgn;
GDrawable *drawable;
GimpPixelRgn pixel_rgn;
GimpDrawable *drawable;
gint32 image_ID;
gint32 layer_ID;
guchar *buf;
@ -442,13 +442,13 @@ gint32 emitgimp ( int hcol, int row, char *bitmap, int bperrow, char *filename )
fprintf( stderr, "emit gimp: %d x %d\n", hcol, row);
#endif
image_ID = gimp_image_new (hcol, row, GRAY);
image_ID = gimp_image_new (hcol, row, GIMP_GRAY);
gimp_image_set_filename (image_ID, filename);
layer_ID = gimp_layer_new (image_ID, _("Background"),
hcol,
row,
GRAY_IMAGE, 100, NORMAL_MODE);
GIMP_GRAY_IMAGE, 100, GIMP_NORMAL_MODE);
gimp_image_add_layer (image_ID, layer_ID, 0);
drawable = gimp_drawable_get (layer_ID);

View File

@ -68,9 +68,9 @@ typedef struct
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,
@ -90,11 +90,11 @@ static gint32 create_new_image (gchar *filename,
guint pagenum,
guint width,
guint height,
GImageType itype,
GDrawableType dtype,
GimpImageBaseType itype,
GimpImageType dtype,
gint32 *layer_ID,
GDrawable **drawable,
GPixelRgn *pixel_rgn);
GimpDrawable **drawable,
GimpPixelRgn *pixel_rgn);
static void check_load_vals (void);
@ -122,7 +122,7 @@ static FITSLoadInterface plint =
FALSE
};
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -131,7 +131,7 @@ GPlugInInfo PLUG_IN_INFO =
};
/* The run mode */
static GRunModeType l_run_mode;
static GimpRunModeType l_run_mode;
MAIN ()
@ -140,27 +140,27 @@ 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" },
{ 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" },
};
static gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
@ -174,7 +174,7 @@ query (void)
"1997",
"<Load>/FITS",
NULL,
PROC_PLUG_IN,
GIMP_PLUGIN,
nload_args, nload_return_vals,
load_args, load_return_vals);
@ -186,7 +186,7 @@ query (void)
"1997",
"<Save>/FITS",
"RGB, GRAY, INDEXED",
PROC_PLUG_IN,
GIMP_PLUGIN,
nsave_args, 0,
save_args, NULL);
@ -204,23 +204,23 @@ 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;
l_run_mode = run_mode = (GRunModeType)param[0].data.d_int32;
l_run_mode = run_mode = (GimpRunModeType)param[0].data.d_int32;
*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 (strcmp (name, "file_fits_load") == 0)
{
@ -228,20 +228,20 @@ run (gchar *name,
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("file_fits_load", &plvals);
if (!load_dialog ())
status = STATUS_CANCEL;
status = GIMP_PDB_CANCEL;
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
if (nparams != 3)
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_fits_load", &plvals);
break;
@ -250,7 +250,7 @@ run (gchar *name,
break;
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
check_load_vals ();
image_ID = load_image (param[1].data.d_string);
@ -261,16 +261,16 @@ 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;
}
/* Store plvals data */
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
gimp_set_data ("file_fits_load", &plvals, sizeof (FITSLoadVals));
}
}
@ -284,8 +284,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 ("fits", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "FITS",
(CAN_HANDLE_RGB |
@ -293,7 +293,7 @@ run (gchar *name,
CAN_HANDLE_INDEXED));
if (export == EXPORT_CANCEL)
{
values[0].data.d_status = STATUS_CANCEL;
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
}
break;
@ -303,26 +303,26 @@ run (gchar *name,
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
/* Make sure all the arguments are there! */
if (nparams != 5)
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
break;
case RUN_WITH_LAST_VALS:
case GIMP_RUN_WITH_LAST_VALS:
break;
default:
break;
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
if (! save_image (param[3].data.d_string, image_ID, drawable_ID))
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
if (export == EXPORT_EXPORT)
@ -330,7 +330,7 @@ run (gchar *name,
}
else
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
values[0].data.d_status = status;
@ -411,7 +411,7 @@ load_image (gchar *filename)
fits_close (ifp);
/* Display images in reverse order. The last will be displayed by GIMP itself*/
if (l_run_mode != RUN_NONINTERACTIVE)
if (l_run_mode != GIMP_RUN_NONINTERACTIVE)
{
for (k = n_images-1; k >= 1; k--)
{
@ -434,7 +434,7 @@ save_image (gchar *filename,
gint32 drawable_ID)
{
FITS_FILE* ofp;
GDrawableType drawable_type;
GimpImageType drawable_type;
gint retval;
char *temp = ident; /* Just to satisfy lint/gcc */
@ -449,9 +449,9 @@ save_image (gchar *filename,
switch (drawable_type)
{
case INDEXED_IMAGE: case INDEXEDA_IMAGE:
case GRAY_IMAGE: case GRAYA_IMAGE:
case RGB_IMAGE: case RGBA_IMAGE:
case GIMP_INDEXED_IMAGE: case GIMP_INDEXEDA_IMAGE:
case GIMP_GRAY_IMAGE: case GIMP_GRAYA_IMAGE:
case GIMP_RGB_IMAGE: case GIMP_RGBA_IMAGE:
break;
default:
g_message (_("Cannot operate on unknown image types"));
@ -467,14 +467,14 @@ save_image (gchar *filename,
return (FALSE);
}
if (l_run_mode != RUN_NONINTERACTIVE)
if (l_run_mode != GIMP_RUN_NONINTERACTIVE)
{
temp = g_strdup_printf (_("Saving %s:"), filename);
gimp_progress_init (temp);
g_free (temp);
}
if ((drawable_type == INDEXED_IMAGE) || (drawable_type == INDEXEDA_IMAGE))
if ((drawable_type == GIMP_INDEXED_IMAGE) || (drawable_type == GIMP_INDEXEDA_IMAGE))
retval = save_index (ofp,image_ID, drawable_ID);
else
retval = save_direct (ofp,image_ID, drawable_ID);
@ -499,11 +499,11 @@ create_new_image (gchar *filename,
guint pagenum,
guint width,
guint height,
GImageType itype,
GDrawableType dtype,
GimpImageBaseType itype,
GimpImageType dtype,
gint32 *layer_ID,
GDrawable **drawable,
GPixelRgn *pixel_rgn)
GimpDrawable **drawable,
GimpPixelRgn *pixel_rgn)
{
gint32 image_ID;
char *tmp;
@ -519,7 +519,7 @@ create_new_image (gchar *filename,
gimp_image_set_filename (image_ID, filename);
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
dtype, 100, NORMAL_MODE);
dtype, 100, GIMP_NORMAL_MODE);
gimp_image_add_layer (image_ID, *layer_ID, 0);
*drawable = gimp_drawable_get (*layer_ID);
@ -545,10 +545,10 @@ load_fits (gchar *filename,
int i, j, channel, max_scan;
double a, b;
gint32 layer_ID, image_ID;
GPixelRgn pixel_rgn;
GDrawable *drawable;
GImageType itype;
GDrawableType dtype;
GimpPixelRgn pixel_rgn;
GimpDrawable *drawable;
GimpImageBaseType itype;
GimpImageType dtype;
gint err = 0;
FITS_HDU_LIST *hdulist;
FITS_PIX_TRANSFORM trans;
@ -559,10 +559,10 @@ load_fits (gchar *filename,
width = hdulist->naxisn[0]; /* Set the size of the FITS image */
height = hdulist->naxisn[1];
if (ncompose == 2) { itype = GRAY; dtype = GRAYA_IMAGE; }
else if (ncompose == 3) { itype = RGB; dtype = RGB_IMAGE; }
else if (ncompose == 4) { itype = RGB; dtype = RGBA_IMAGE; }
else { ncompose = 1; itype = GRAY; dtype = GRAY_IMAGE;}
if (ncompose == 2) { itype = GIMP_GRAY; dtype = GIMP_GRAYA_IMAGE; }
else if (ncompose == 3) { itype = GIMP_RGB; dtype = GIMP_RGB_IMAGE; }
else if (ncompose == 4) { itype = GIMP_RGB; dtype = GIMP_RGBA_IMAGE; }
else { ncompose = 1; itype = GIMP_GRAY; dtype = GIMP_GRAY_IMAGE;}
image_ID = create_new_image (filename, picnum, width, height, itype, dtype,
&layer_ID, &drawable, &pixel_rgn);
@ -613,7 +613,7 @@ load_fits (gchar *filename,
scan_lines++;
if ((l_run_mode != RUN_NONINTERACTIVE) && ((i % 20) == 0))
if ((l_run_mode != GIMP_RUN_NONINTERACTIVE) && ((i % 20) == 0))
gimp_progress_update ((double)(i+1) / (double)height);
if ((scan_lines == tile_height) || ((i+1) == height))
@ -665,7 +665,7 @@ load_fits (gchar *filename,
dest -= width*ncompose;
scan_lines++;
if ((l_run_mode != RUN_NONINTERACTIVE) && ((i % 20) == 0))
if ((l_run_mode != GIMP_RUN_NONINTERACTIVE) && ((i % 20) == 0))
gimp_progress_update ( (double)(channel*height+i+1)
/ (double)(height*ncompose));
@ -704,16 +704,16 @@ create_fits_header (FITS_FILE *ofp,
static char *ctype3_card[] =
{
NULL, NULL, NULL, /* bpp = 0: no additional card */
"COMMENT Image type within GIMP: GRAY_IMAGE",
"COMMENT Image type within GIMP: GIMP_GRAY_IMAGE",
NULL,
NULL,
"COMMENT Image type within GIMP: GRAYA_IMAGE (gray with alpha channel)",
"COMMENT Image type within GIMP: GIMP_GRAYA_IMAGE (gray with alpha channel)",
"COMMENT Sequence for NAXIS3 : GRAY, ALPHA",
"CTYPE3 = 'GRAYA ' / GRAY IMAGE WITH ALPHA CHANNEL",
"COMMENT Image type within GIMP: RGB_IMAGE",
"COMMENT Image type within GIMP: GIMP_RGB_IMAGE",
"COMMENT Sequence for NAXIS3 : RED, GREEN, BLUE",
"CTYPE3 = 'RGB ' / RGB IMAGE",
"COMMENT Image type within GIMP: RGBA_IMAGE (rgb with alpha channel)",
"COMMENT Image type within GIMP: GIMP_RGBA_IMAGE (rgb with alpha channel)",
"COMMENT Sequence for NAXIS3 : RED, GREEN, BLUE, ALPHA",
"CTYPE3 = 'RGBA ' / RGB IMAGE WITH ALPHA CHANNEL"
};
@ -768,9 +768,9 @@ save_direct (FITS_FILE *ofp,
int tile_height, bpp, bpsl;
long nbytes;
guchar *data, *src;
GPixelRgn pixel_rgn;
GDrawable *drawable;
GDrawableType drawable_type;
GimpPixelRgn pixel_rgn;
GimpDrawable *drawable;
GimpImageType drawable_type;
FITS_HDU_LIST *hdu;
drawable = gimp_drawable_get (drawable_ID);
@ -819,7 +819,7 @@ save_direct (FITS_FILE *ofp,
nbytes += bpsl;
src -= 2*bpsl;
if ((l_run_mode != RUN_NONINTERACTIVE) && ((i % 20) == 0))
if ((l_run_mode != GIMP_RUN_NONINTERACTIVE) && ((i % 20) == 0))
gimp_progress_update ((double)(i+channel*height)/(double)(height*bpp));
}
}
@ -857,9 +857,9 @@ save_index (FITS_FILE *ofp,
guchar *data, *src, *cmap, *cmapptr;
guchar red[256], green[256], blue[256];
guchar *channels[3];
GPixelRgn pixel_rgn;
GDrawable *drawable;
GDrawableType drawable_type;
GimpPixelRgn pixel_rgn;
GimpDrawable *drawable;
GimpImageType drawable_type;
FITS_HDU_LIST *hdu;
channels[0] = red; channels[1] = green; channels[2] = blue;
@ -918,7 +918,7 @@ save_index (FITS_FILE *ofp,
src -= 2*bpsl;
}
if ((l_run_mode != RUN_NONINTERACTIVE) && ((i % 20) == 0))
if ((l_run_mode != GIMP_RUN_NONINTERACTIVE) && ((i % 20) == 0))
gimp_progress_update ((double) (i+channel*height) /
(double) (height*(bpp+2)));
}
@ -943,7 +943,7 @@ save_index (FITS_FILE *ofp,
src -= 2*bpsl;
}
if ((l_run_mode != RUN_NONINTERACTIVE) && ((i % 20) == 0))
if ((l_run_mode != GIMP_RUN_NONINTERACTIVE) && ((i % 20) == 0))
gimp_progress_update ((double) (i+channel*height) /
(double) (height*(bpp+2)));
}

View File

@ -54,10 +54,10 @@
static void query (void);
static void run (gchar *name,
gint nparams,
GParam *param,
GimpParam *param,
gint *nreturn_vals,
GParam **return_vals);
static void doit (GDrawable *drawable);
GimpParam **return_vals);
static void doit (GimpDrawable *drawable);
static gint dialog (void);
static void set_flame_preview (void);
@ -95,7 +95,7 @@ static GtkWidget *edit_previews[NMUTANTS];
static gdouble pick_speed = 0.2;
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -127,11 +127,11 @@ MAIN ()
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 gint nargs = sizeof(args) / sizeof(args[0]);
@ -143,7 +143,7 @@ query (void)
"1997",
N_("<Image>/Filters/Render/Nature/Flame..."),
"RGB*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs, 0,
args, NULL);
}
@ -179,14 +179,14 @@ maybe_init_cp (void)
static void
run (gchar *name,
gint n_params,
GParam *param,
GimpParam *param,
gint *nreturn_vals,
GParam **return_vals)
GimpParam **return_vals)
{
static GParam values[1];
GDrawable *drawable = NULL;
GRunModeType run_mode;
GStatusType status = STATUS_SUCCESS;
static GimpParam values[1];
GimpDrawable *drawable = NULL;
GimpRunModeType run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
*nreturn_vals = 1;
*return_vals = values;
@ -195,9 +195,9 @@ run (gchar *name,
run_mode = param[0].data.d_int32;
if (run_mode == RUN_NONINTERACTIVE)
if (run_mode == GIMP_RUN_NONINTERACTIVE)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
else
{
@ -209,16 +209,16 @@ run (gchar *name,
config.cp.width = drawable->width;
config.cp.height = drawable->height;
if (run_mode == RUN_INTERACTIVE)
if (run_mode == GIMP_RUN_INTERACTIVE)
{
if (!dialog ())
{
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
}
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
if (gimp_drawable_is_rgb (drawable->id))
{
@ -228,18 +228,18 @@ run (gchar *name,
doit (drawable);
if (run_mode != RUN_NONINTERACTIVE)
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush ();
gimp_set_data ("plug_in_flame", &config, sizeof (config));
}
else
{
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
gimp_drawable_detach (drawable);
}
values[0].type = PARAM_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
}
@ -247,8 +247,8 @@ static void
drawable_to_cmap (control_point *cp)
{
gint i, j;
GPixelRgn pr;
GDrawable *d;
GimpPixelRgn pr;
GimpDrawable *d;
guchar *p;
gint indexed;
@ -291,7 +291,7 @@ drawable_to_cmap (control_point *cp)
}
static void
doit (GDrawable *drawable)
doit (GimpDrawable *drawable)
{
gint width, height;
guchar *tmp;
@ -321,7 +321,7 @@ doit (GDrawable *drawable)
/* update destination */
if (4 == bytes)
{
GPixelRgn pr;
GimpPixelRgn pr;
gimp_pixel_rgn_init (&pr, drawable, 0, 0, width, height,
TRUE, TRUE);
gimp_pixel_rgn_set_rect (&pr, tmp, 0, 0, width, height);
@ -329,7 +329,7 @@ doit (GDrawable *drawable)
else if (3 == bytes)
{
gint i, j;
GPixelRgn src_pr, dst_pr;
GimpPixelRgn src_pr, dst_pr;
guchar *sl;
sl = g_new (guchar, 3 * width);

View File

@ -54,16 +54,16 @@ FP_Params Current =
{0,0,0}
};
GDrawable *drawable, *mask;
GimpDrawable *drawable, *mask;
void query (void);
void run (gchar *name,
gint nparams,
GParam *param,
GimpParam *param,
gint *nreturn_vals,
GParam **return_vals);
GimpParam **return_vals);
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -76,11 +76,11 @@ 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" },
};
gint nargs = sizeof (args) / sizeof (args[0]);
@ -92,7 +92,7 @@ query (void)
"27th March 1997",
N_("<Image>/Image/Colors/Filter Pack..."),
"RGB*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs, 0,
args, NULL);
}
@ -102,19 +102,19 @@ query (void)
void
run (gchar *name,
gint nparams,
GParam *param,
GimpParam *param,
gint *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;
INIT_I18N_UI();
values[0].type = PARAM_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
initializeFilterPacks();
@ -126,7 +126,7 @@ run (gchar *name,
gimp_drawable_is_gray (drawable->id) )
{
gimp_message (_("Convert the image to RGB first!"));
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
else if (gimp_drawable_is_rgb (drawable->id) && fp_dialog())
{
@ -135,11 +135,11 @@ run (gchar *name,
fp (drawable);
gimp_displays_flush ();
}
else status = STATUS_EXECUTION_ERROR;
else status = GIMP_PDB_EXECUTION_ERROR;
values[0].data.d_status = status;
if (status==STATUS_SUCCESS)
if (status==GIMP_PDB_SUCCESS)
gimp_drawable_detach (drawable);
}
@ -221,9 +221,9 @@ fp_row (const guchar *src_row,
}
void fp (GDrawable *drawable)
void fp (GimpDrawable *drawable)
{
GPixelRgn srcPR, destPR;
GimpPixelRgn srcPR, destPR;
gint width, height;
gint bytes;
guchar *src_row, *dest_row;

View File

@ -113,8 +113,8 @@ GtkWidget *fp_create_pixels_select_by();
void fp_show_hide_frame(GtkWidget *button,
GtkWidget *frame);
ReducedImage *Reduce_The_Image (GDrawable *,
GDrawable *,
ReducedImage *Reduce_The_Image (GimpDrawable *,
GimpDrawable *,
gint,
gint);
@ -194,7 +194,7 @@ void Adjust_Preview_Sizes (int width,
void refreshPreviews (int);
void initializeFilterPacks (void);
void fp (GDrawable *drawable);
void fp (GimpDrawable *drawable);
void fp_row (const guchar *src_row,
guchar *dest_row,
gint row,

View File

@ -36,7 +36,7 @@ AdvancedWindow AW = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
extern FP_Params Current;
extern GDrawable *drawable, *mask;
extern GimpDrawable *drawable, *mask;
FP_Intensity ShMidHi[] = { SHADOWS, MIDTONES, HIGHLIGHTS };
int HueSatVal[] = { BY_HUE, BY_SAT, BY_VAL };

View File

@ -9,7 +9,7 @@
extern FP_Params Current;
extern GDrawable *drawable, *mask;
extern GimpDrawable *drawable, *mask;
extern ReducedImage *reduced;
extern gint nudgeArray[256];
@ -36,8 +36,8 @@ void resetFilterPacks()
refreshPreviews(Current.VisibleFrames);
}
ReducedImage *Reduce_The_Image(GDrawable *drawable,
GDrawable *mask,
ReducedImage *Reduce_The_Image(GimpDrawable *drawable,
GimpDrawable *mask,
gint LongerSize,
gint Slctn)
{
@ -45,7 +45,7 @@ ReducedImage *Reduce_The_Image(GDrawable *drawable,
ReducedImage *temp=(ReducedImage *)malloc(sizeof(ReducedImage));
guchar *tempRGB, *src_row, *tempmask, *src_mask_row,R,G,B;
gint i, j, whichcol, whichrow, x1, x2, y1, y2;
GPixelRgn srcPR, srcMask;
GimpPixelRgn srcPR, srcMask;
gint NoSelectionMade=TRUE;
hsv *tempHSV, H, S, V;

View File

@ -678,7 +678,7 @@ dialog_search_callback (GtkWidget *widget,
query_text++;
}
gimp_query_database (query->str,
gimp_procedural_db_query (query->str,
".*", ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
@ -688,7 +688,7 @@ dialog_search_callback (GtkWidget *widget,
{
gtk_window_set_title (GTK_WINDOW (dbbrowser->dlg),
_("Animated Filter apply (by blurb - please wait)"));
gimp_query_database (".*",
gimp_procedural_db_query (".*",
gtk_entry_get_text( GTK_ENTRY(dbbrowser->search_entry) ),
".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
@ -696,7 +696,7 @@ dialog_search_callback (GtkWidget *widget,
else {
gtk_window_set_title (GTK_WINDOW (dbbrowser->dlg),
_("Animated Filter apply (please wait)"));
gimp_query_database (".*", ".*", ".*", ".*", ".*", ".*", ".*",
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list);
}
@ -762,32 +762,32 @@ convert_string (char *str)
}
static char*
GParamType2char(GParamType t)
GParamType2char(GimpPDBArgType t)
{
switch (t) {
case PARAM_INT32: return "INT32";
case PARAM_INT16: return "INT16";
case PARAM_INT8: return "INT8";
case PARAM_FLOAT: return "FLOAT";
case PARAM_STRING: return "STRING";
case PARAM_INT32ARRAY: return "INT32ARRAY";
case PARAM_INT16ARRAY: return "INT16ARRAY";
case PARAM_INT8ARRAY: return "INT8ARRAY";
case PARAM_FLOATARRAY: return "FLOATARRAY";
case PARAM_STRINGARRAY: return "STRINGARRAY";
case PARAM_COLOR: return "COLOR";
case PARAM_REGION: return "REGION";
case PARAM_DISPLAY: return "DISPLAY";
case PARAM_IMAGE: return "IMAGE";
case PARAM_LAYER: return "LAYER";
case PARAM_CHANNEL: return "CHANNEL";
case PARAM_DRAWABLE: return "DRAWABLE";
case PARAM_SELECTION: return "SELECTION";
case PARAM_BOUNDARY: return "BOUNDARY";
case PARAM_PATH: return "PATH";
case PARAM_PARASITE: return "PARASITE";
case PARAM_STATUS: return "STATUS";
case PARAM_END: return "END";
case GIMP_PDB_INT32: return "INT32";
case GIMP_PDB_INT16: return "INT16";
case GIMP_PDB_INT8: return "INT8";
case GIMP_PDB_FLOAT: return "FLOAT";
case GIMP_PDB_STRING: return "STRING";
case GIMP_PDB_INT32ARRAY: return "INT32ARRAY";
case GIMP_PDB_INT16ARRAY: return "INT16ARRAY";
case GIMP_PDB_INT8ARRAY: return "INT8ARRAY";
case GIMP_PDB_FLOATARRAY: return "FLOATARRAY";
case GIMP_PDB_STRINGARRAY: return "STRINGARRAY";
case GIMP_PDB_COLOR: return "COLOR";
case GIMP_PDB_REGION: return "REGION";
case GIMP_PDB_DISPLAY: return "DISPLAY";
case GIMP_PDB_IMAGE: return "IMAGE";
case GIMP_PDB_LAYER: return "LAYER";
case GIMP_PDB_CHANNEL: return "CHANNEL";
case GIMP_PDB_DRAWABLE: return "DRAWABLE";
case GIMP_PDB_SELECTION: return "SELECTION";
case GIMP_PDB_BOUNDARY: return "BOUNDARY";
case GIMP_PDB_PATH: return "PATH";
case GIMP_PDB_PARASITE: return "PARASITE";
case GIMP_PDB_STATUS: return "STATUS";
case GIMP_PDB_END: return "END";
default: return "UNKNOWN?";
}
}

View File

@ -123,6 +123,6 @@ static void
convert_string (gchar *str);
static gchar*
GParamType2char(GParamType t);
GParamType2char(GimpPDBArgType t);
#endif

View File

@ -105,9 +105,9 @@ static gchar G_GNUC_UNUSED *dummy_entries[] =
static void query (void);
static void run (char *name,
int nparams,
GParam *param,
GimpParam *param,
int *nreturn_vals,
GParam **return_vals);
GimpParam **return_vals);
static gint32 load_image (char *filename,
gint32 first_frame,
gint32 last_frame,
@ -122,7 +122,7 @@ static gint32 load_range_dialog(gint32 *first_frame,
gint32 *autoload);
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -136,34 +136,34 @@ MAIN ()
static void
query ()
{
static GParamDef load_args[] =
static GimpParamDef load_args[] =
{
{ PARAM_INT32, "run_mode", "Interactive, non-interactive" },
{ PARAM_IMAGE, "image", "(unused)"},
{ PARAM_DRAWABLE, "drawable", "(unused)"},
{ PARAM_STRING, "filename", "The name of the file to load" },
{ PARAM_STRING, "raw_filename", "The name entered" },
{ PARAM_INT32, "first_frame", "1st frame to extract (starting at number 1)" },
{ PARAM_INT32, "last_frame", "last frame to extract (use 0 to load all remaining frames)" },
{ PARAM_STRING, "animframe_basename", "The name for the single frames _0001.xcf is added" },
{ PARAM_INT32, "autoload", "TRUE: load 1.st extracted frame on success" },
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "(unused)"},
{ GIMP_PDB_DRAWABLE, "drawable", "(unused)"},
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },
{ GIMP_PDB_STRING, "raw_filename", "The name entered" },
{ GIMP_PDB_INT32, "first_frame", "1st frame to extract (starting at number 1)" },
{ GIMP_PDB_INT32, "last_frame", "last frame to extract (use 0 to load all remaining frames)" },
{ GIMP_PDB_STRING, "animframe_basename", "The name for the single frames _0001.xcf is added" },
{ GIMP_PDB_INT32, "autoload", "TRUE: load 1.st extracted frame on success" },
};
static GParamDef load_return_vals[] =
static GimpParamDef load_return_vals[] =
{
{ PARAM_IMAGE, "image", "Output image" },
{ GIMP_PDB_IMAGE, "image", "Output image" },
};
static int nload_args = sizeof (load_args) / sizeof (load_args[0]);
static int nload_return_vals = sizeof (load_return_vals) / sizeof (load_return_vals[0]);
static GParamDef ext_args[] =
static GimpParamDef ext_args[] =
{
{ PARAM_INT32, "run_mode", "Interactive, non-interactive" },
{ PARAM_STRING, "filename", "The name of the file to load" },
{ PARAM_STRING, "raw_filename", "The name entered" },
{ PARAM_INT32, "first_frame", "1st frame to extract (starting at number 1)" },
{ PARAM_INT32, "last_frame", "last frame to extract (use 0 to load all remaining frames)" },
{ PARAM_STRING, "animframe_basename", "The name for the single frames _0001.xcf is added" },
{ PARAM_INT32, "autoload", "TRUE: load 1.st extracted frame on success" },
{ 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 entered" },
{ GIMP_PDB_INT32, "first_frame", "1st frame to extract (starting at number 1)" },
{ GIMP_PDB_INT32, "last_frame", "last frame to extract (use 0 to load all remaining frames)" },
{ GIMP_PDB_STRING, "animframe_basename", "The name for the single frames _0001.xcf is added" },
{ GIMP_PDB_INT32, "autoload", "TRUE: load 1.st extracted frame on success" },
};
static int next_args = sizeof (ext_args) / sizeof (ext_args[0]);
@ -177,7 +177,7 @@ query ()
"2000/01/01",
N_("<Image>/Video/Split Video to Frames/MPEG1"),
NULL,
PROC_PLUG_IN,
GIMP_PLUGIN,
nload_args, nload_return_vals,
load_args, load_return_vals);
@ -189,7 +189,7 @@ query ()
"2000/01/01",
N_("<Toolbox>/Xtns/Split Video to Frames/MPEG1"),
NULL,
PROC_EXTENSION,
GIMP_EXTENSION,
next_args, nload_return_vals,
ext_args, load_return_vals);
}
@ -197,12 +197,12 @@ query ()
static void
run (char *name,
int nparams,
GParam *param,
GimpParam *param,
int *nreturn_vals,
GParam **return_vals)
GimpParam **return_vals)
{
static GParam values[2];
GRunModeType run_mode;
static GimpParam values[2];
GimpRunModeType run_mode;
gint32 image_ID;
gint32 first_frame, last_frame;
gint32 autoload;
@ -216,8 +216,8 @@ run (char *name,
*return_vals = values;
autoload = FALSE;
values[0].type = PARAM_STATUS;
values[0].data.d_status = STATUS_CALLING_ERROR;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
run_mode = param[0].data.d_int32;
@ -243,7 +243,7 @@ run (char *name,
}
l_rc = 0;
if (run_mode == RUN_NONINTERACTIVE)
if (run_mode == GIMP_RUN_NONINTERACTIVE)
{
l_filename[0] = '\0';
@ -293,13 +293,13 @@ run (char *name,
if (image_ID != -1)
{
*nreturn_vals = 2;
values[0].data.d_status = STATUS_SUCCESS;
values[1].type = PARAM_IMAGE;
values[0].data.d_status = GIMP_PDB_SUCCESS;
values[1].type = GIMP_PDB_IMAGE;
values[1].data.d_image = image_ID;
}
else
{
values[0].data.d_status = STATUS_EXECUTION_ERROR;
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
}
}
@ -398,8 +398,8 @@ load_image (char *filename,
char *basename,
gint32 autoload)
{
GPixelRgn pixel_rgn;
GDrawable *drawable;
GimpPixelRgn pixel_rgn;
GimpDrawable *drawable;
gint32 first_image_ID;
gint32 image_ID;
gint32 layer_ID;
@ -538,7 +538,7 @@ load_image (char *filename,
layer_ID = gimp_layer_new (image_ID, layername,
wwidth,
wheight,
RGBA_IMAGE, 100, NORMAL_MODE);
GIMP_RGBA_IMAGE, 100, GIMP_NORMAL_MODE);
g_free(layername);
gimp_image_add_layer (image_ID, layer_ID, 0);
gimp_layer_set_visible(layer_ID, l_visible);
@ -573,7 +573,7 @@ load_image (char *filename,
/* save each image as frame to disk */
{
GParam* l_params;
GimpParam* l_params;
gint l_retvals;
l_overwrite_mode = p_overwrite_dialog(framename, l_overwrite_mode);
@ -588,12 +588,12 @@ load_image (char *filename,
{
l_params = gimp_run_procedure ("gimp_xcf_save",
&l_retvals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, image_ID,
PARAM_DRAWABLE, 0,
PARAM_STRING, framename,
PARAM_STRING, framename, /* raw name ? */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_DRAWABLE, 0,
GIMP_PDB_STRING, framename,
GIMP_PDB_STRING, framename, /* raw name ? */
GIMP_PDB_END);
p_gimp_file_save_thumbnail(image_ID, framename);
}

View File

@ -426,7 +426,7 @@ p_init_xanim_global_name()
static int
p_convert_frames(gint32 frame_from, gint32 frame_to, char *basename, char *ext, char *ext2)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
gint32 l_tmp_image_id;
char l_first_xa_frame[200];
@ -441,27 +441,27 @@ p_convert_frames(gint32 frame_from, gint32 frame_to, char *basename, char *ext,
*/
return_vals = gimp_run_procedure ("plug_in_gap_range_convert2",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE, /* runmode */
PARAM_IMAGE, l_tmp_image_id,
PARAM_DRAWABLE, 0, /* (unused) */
PARAM_INT32, frame_from,
PARAM_INT32, frame_to,
PARAM_INT32, 0, /* dont flatten */
PARAM_INT32, 4444, /* dest type (keep type) */
PARAM_INT32, 256, /* colors (unused) */
PARAM_INT32, 0, /* no dither (unused) */
PARAM_STRING, ext2, /* extension for dest. filetype */
PARAM_STRING, basename, /* basename for dest. filetype */
PARAM_INT32, 0, /* (unused) */
PARAM_INT32, 0, /* (unused) */
PARAM_INT32, 0, /* (unused) */
PARAM_STRING, "none", /* (unused) palettename */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE, /* runmode */
GIMP_PDB_IMAGE, l_tmp_image_id,
GIMP_PDB_DRAWABLE, 0, /* (unused) */
GIMP_PDB_INT32, frame_from,
GIMP_PDB_INT32, frame_to,
GIMP_PDB_INT32, 0, /* dont flatten */
GIMP_PDB_INT32, 4444, /* dest type (keep type) */
GIMP_PDB_INT32, 256, /* colors (unused) */
GIMP_PDB_INT32, 0, /* no dither (unused) */
GIMP_PDB_STRING, ext2, /* extension for dest. filetype */
GIMP_PDB_STRING, basename, /* basename for dest. filetype */
GIMP_PDB_INT32, 0, /* (unused) */
GIMP_PDB_INT32, 0, /* (unused) */
GIMP_PDB_INT32, 0, /* (unused) */
GIMP_PDB_STRING, "none", /* (unused) palettename */
GIMP_PDB_END);
/* destroy the tmp image */
gimp_image_delete(l_tmp_image_id);
if (return_vals[0].data.d_status != STATUS_SUCCESS)
if (return_vals[0].data.d_status != GIMP_PDB_SUCCESS)
{
return(-1);
}
@ -971,7 +971,7 @@ p_start_xanim_process_exec(gint32 first_frame, gint32 last_frame,
*/
gint32
gap_xanim_decode(GRunModeType run_mode)
gap_xanim_decode(GimpRunModeType run_mode)
{
gint32 l_rc;
gint32 first_frame;

View File

@ -45,7 +45,7 @@ typedef enum
} t_gap_xa_formats;
int gap_xanim_decode(GRunModeType run_mode
int gap_xanim_decode(GimpRunModeType run_mode
);
#endif

View File

@ -122,7 +122,7 @@ p_steal_content(gint32 dst_image_id, gint32 src_image_id)
/* gimp_image_undo_disable (src_image_id); */ /* does not work !! if active we can not steal layers */
/* Copy the colormap if necessary */
if(gimp_image_base_type(src_image_id) == INDEXED)
if(gimp_image_base_type(src_image_id) == GIMP_INDEXED)
{
l_cmap = gimp_image_get_cmap (src_image_id, &l_ncolors);

View File

@ -35,7 +35,7 @@
* ------------------------
*/
gint gap_proc_anim_apply(GRunModeType run_mode, gint32 image_id, char *l_plugin_name);
gint gap_proc_anim_apply(GimpRunModeType run_mode, gint32 image_id, char *l_plugin_name);
/* ------------------------
@ -45,7 +45,7 @@ gint gap_proc_anim_apply(GRunModeType run_mode, gint32 image_id, char *l_plugin_
/* Hacked Iterators for some existing Plugins */
gint gap_run_iterators_ALT(char *name, GRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct);
gint gap_run_iterators_ALT(char *name, GimpRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct);
void gap_query_iterators_ALT();
/* ------------------------

View File

@ -54,31 +54,31 @@ void p_remove_codegen_files()
static char*
p_type_to_string(GParamType t)
p_type_to_string(GimpPDBArgType t)
{
switch (t) {
case PARAM_INT32: return "long ";
case PARAM_INT16: return "short ";
case PARAM_INT8: return "char ";
case PARAM_FLOAT: return "gdouble ";
case PARAM_STRING: return "char *";
case PARAM_INT32ARRAY: return "INT32ARRAY";
case PARAM_INT16ARRAY: return "INT16ARRAY";
case PARAM_INT8ARRAY: return "INT8ARRAY";
case PARAM_FLOATARRAY: return "FLOATARRAY";
case PARAM_STRINGARRAY: return "STRINGARRAY";
case PARAM_COLOR: return "t_color ";
case PARAM_REGION: return "REGION";
case PARAM_DISPLAY: return "gint32 ";
case PARAM_IMAGE: return "gint32 ";
case PARAM_LAYER: return "gint32 ";
case PARAM_CHANNEL: return "gint32 ";
case PARAM_DRAWABLE: return "gint32 ";
case PARAM_SELECTION: return "SELECTION";
case PARAM_BOUNDARY: return "BOUNDARY";
case PARAM_PATH: return "PATH";
case PARAM_STATUS: return "STATUS";
case PARAM_END: return "END";
case GIMP_PDB_INT32: return "long ";
case GIMP_PDB_INT16: return "short ";
case GIMP_PDB_INT8: return "char ";
case GIMP_PDB_FLOAT: return "gdouble ";
case GIMP_PDB_STRING: return "char *";
case GIMP_PDB_INT32ARRAY: return "INT32ARRAY";
case GIMP_PDB_INT16ARRAY: return "INT16ARRAY";
case GIMP_PDB_INT8ARRAY: return "INT8ARRAY";
case GIMP_PDB_FLOATARRAY: return "FLOATARRAY";
case GIMP_PDB_STRINGARRAY: return "STRINGARRAY";
case GIMP_PDB_COLOR: return "t_color ";
case GIMP_PDB_REGION: return "REGION";
case GIMP_PDB_DISPLAY: return "gint32 ";
case GIMP_PDB_IMAGE: return "gint32 ";
case GIMP_PDB_LAYER: return "gint32 ";
case GIMP_PDB_CHANNEL: return "gint32 ";
case GIMP_PDB_DRAWABLE: return "gint32 ";
case GIMP_PDB_SELECTION: return "SELECTION";
case GIMP_PDB_BOUNDARY: return "BOUNDARY";
case GIMP_PDB_PATH: return "PATH";
case GIMP_PDB_STATUS: return "STATUS";
case GIMP_PDB_END: return "END";
default: return "UNKNOWN?";
}
}
@ -193,11 +193,11 @@ gint p_gen_code_iter_ALT(char *proc_name)
proc_name, l_proc_author, l_proc_copyright);
/* check if plugin can be a typical one, that works on one drawable */
if (l_proc_type != PROC_PLUG_IN) { l_rc = -1; }
if (l_proc_type != GIMP_PLUGIN) { l_rc = -1; }
if (l_nparams < 3) { l_rc = -1; }
if (l_params[0].type != PARAM_INT32) { l_rc = -1; }
if (l_params[1].type != PARAM_IMAGE) { l_rc = -1; }
if (l_params[2].type != PARAM_DRAWABLE) { l_rc = -1; }
if (l_params[0].type != GIMP_PDB_INT32) { l_rc = -1; }
if (l_params[1].type != GIMP_PDB_IMAGE) { l_rc = -1; }
if (l_params[2].type != GIMP_PDB_DRAWABLE) { l_rc = -1; }
sprintf(l_filename, "%s_iter_ALT.inc", l_clean_proc_name);
l_fp = fopen(l_filename, "w");
@ -207,7 +207,7 @@ gint p_gen_code_iter_ALT(char *proc_name)
fprintf(l_fp, " * p_%s_iter_ALT \n", l_clean_proc_name);
fprintf(l_fp, " * ----------------------------------------------------------------------\n");
fprintf(l_fp, " */\n");
fprintf(l_fp, "gint p_%s_iter_ALT(GRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct) \n", l_clean_proc_name);
fprintf(l_fp, "gint p_%s_iter_ALT(GimpRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct) \n", l_clean_proc_name);
fprintf(l_fp, "{\n");
fprintf(l_fp, " typedef struct t_%s_Vals \n", l_clean_proc_name);
fprintf(l_fp, " {\n");
@ -244,27 +244,27 @@ gint p_gen_code_iter_ALT(char *proc_name)
switch(l_params[l_idx].type)
{
case PARAM_INT32:
case GIMP_PDB_INT32:
fprintf(l_fp, " p_delta_long(&buf.%s, buf_from->%s, buf_to->%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
case PARAM_INT16:
case GIMP_PDB_INT16:
fprintf(l_fp, " p_delta_short(&buf.%s, buf_from->%s, buf_to->%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
case PARAM_INT8:
case GIMP_PDB_INT8:
fprintf(l_fp, " p_delta_char(&buf.%s, buf_from->%s, buf_to->%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
case PARAM_FLOAT:
case GIMP_PDB_FLOAT:
fprintf(l_fp, " p_delta_gdouble(&buf.%s, buf_from->%s, buf_to->%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
case PARAM_COLOR:
case GIMP_PDB_COLOR:
fprintf(l_fp, " p_delta_color(&buf.%s, &buf_from->%s, &buf_to->%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
case PARAM_DRAWABLE:
case GIMP_PDB_DRAWABLE:
fprintf(l_fp, " p_delta_drawable(&buf.%s, buf_from->%s, buf_to->%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
@ -311,7 +311,7 @@ gint p_gen_forward_iter_ALT(char *proc_name)
l_fp = fopen(GEN_FORWARDFILE_NAME, "a");
if(l_fp != NULL)
{
fprintf(l_fp, "static gint p_%s_iter_ALT (GRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct);\n",
fprintf(l_fp, "static gint p_%s_iter_ALT (GimpRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct);\n",
l_clean_proc_name);
fclose(l_fp);
}
@ -384,11 +384,11 @@ gint p_gen_code_iter(char *proc_name)
if(gap_debug) fprintf(stderr, "DEBUG: found in PDB %s\n", proc_name);
/* check if plugin can be a typical one, that works on one drawable */
if (l_proc_type != PROC_PLUG_IN) { l_rc = -1; }
if (l_proc_type != GIMP_PLUGIN) { l_rc = -1; }
if (l_nparams < 3) { l_rc = -1; }
if (l_params[0].type != PARAM_INT32) { l_rc = -1; }
if (l_params[1].type != PARAM_IMAGE) { l_rc = -1; }
if (l_params[2].type != PARAM_DRAWABLE) { l_rc = -1; }
if (l_params[0].type != GIMP_PDB_INT32) { l_rc = -1; }
if (l_params[1].type != GIMP_PDB_IMAGE) { l_rc = -1; }
if (l_params[2].type != GIMP_PDB_DRAWABLE) { l_rc = -1; }
sprintf(l_filename, "%s_iter.c", l_clean_proc_name);
@ -431,9 +431,9 @@ gint p_gen_code_iter(char *proc_name)
fprintf(l_fp, "typedef struct { gint color[3]; } t_gint_color; \n");
fprintf(l_fp, "\n");
fprintf(l_fp, "static void query(void); \n");
fprintf(l_fp, "static void run(char *name, int nparam, GParam *param, int *nretvals, GParam **retvals); \n");
fprintf(l_fp, "static void run(char *name, int nparam, GimpParam *param, int *nretvals, GimpParam **retvals); \n");
fprintf(l_fp, "\n");
fprintf(l_fp, "GPlugInInfo PLUG_IN_INFO = \n");
fprintf(l_fp, "GimpPlugInInfo PLUG_IN_INFO = \n");
fprintf(l_fp, "{\n");
fprintf(l_fp, " NULL, /* init_proc */ \n");
fprintf(l_fp, " NULL, /* quit_proc */ \n");
@ -568,7 +568,7 @@ gint p_gen_code_iter(char *proc_name)
fprintf(l_fp, " * p_%s_iter \n", l_clean_proc_name);
fprintf(l_fp, " * ----------------------------------------------------------------------\n");
fprintf(l_fp, " */\n");
fprintf(l_fp, "gint p_%s_iter(GRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct) \n", l_clean_proc_name);
fprintf(l_fp, "gint p_%s_iter(GimpRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct) \n", l_clean_proc_name);
fprintf(l_fp, "{\n");
fprintf(l_fp, " typedef struct t_%s_Vals \n", l_clean_proc_name);
fprintf(l_fp, " {\n");
@ -602,27 +602,27 @@ gint p_gen_code_iter(char *proc_name)
switch(l_params[l_idx].type)
{
case PARAM_INT32:
case GIMP_PDB_INT32:
fprintf(l_fp, " p_delta_long(&buf.%s, buf_from.%s, buf_to.%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
case PARAM_INT16:
case GIMP_PDB_INT16:
fprintf(l_fp, " p_delta_short(&buf.%s, buf_from.%s, buf_to.%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
case PARAM_INT8:
case GIMP_PDB_INT8:
fprintf(l_fp, " p_delta_char(&buf.%s, buf_from.%s, buf_to.%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
case PARAM_FLOAT:
case GIMP_PDB_FLOAT:
fprintf(l_fp, " p_delta_gdouble(&buf.%s, buf_from.%s, buf_to.%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
case PARAM_COLOR:
case GIMP_PDB_COLOR:
fprintf(l_fp, " p_delta_color(&buf.%s, &buf_from.%s, &buf_to.%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
case PARAM_DRAWABLE:
case GIMP_PDB_DRAWABLE:
fprintf(l_fp, " p_delta_drawable(&buf.%s, buf_from.%s, buf_to.%s, total_steps, current_step);\n",
l_clean_par_name, l_clean_par_name, l_clean_par_name);
break;
@ -647,16 +647,16 @@ gint p_gen_code_iter(char *proc_name)
fprintf(l_fp, "{\n");
fprintf(l_fp, " char l_blurb_text[300];\n");
fprintf(l_fp, "\n");
fprintf(l_fp, " static GParamDef args_iter[] =\n");
fprintf(l_fp, " static GimpParamDef args_iter[] =\n");
fprintf(l_fp, " {\n");
fprintf(l_fp, " {PARAM_INT32, \"run_mode\", \"non-interactive\"},\n");
fprintf(l_fp, " {PARAM_INT32, \"total_steps\", \"total number of steps (# of layers-1 to apply the related plug-in)\"},\n");
fprintf(l_fp, " {PARAM_FLOAT, \"current_step\", \"current (for linear iterations this is the layerstack position, otherwise some value inbetween)\"},\n");
fprintf(l_fp, " {PARAM_INT32, \"len_struct\", \"length of stored data structure with id is equal to the plug_in proc_name\"},\n");
fprintf(l_fp, " {GIMP_PDB_INT32, \"run_mode\", \"non-interactive\"},\n");
fprintf(l_fp, " {GIMP_PDB_INT32, \"total_steps\", \"total number of steps (# of layers-1 to apply the related plug-in)\"},\n");
fprintf(l_fp, " {GIMP_PDB_FLOAT, \"current_step\", \"current (for linear iterations this is the layerstack position, otherwise some value inbetween)\"},\n");
fprintf(l_fp, " {GIMP_PDB_INT32, \"len_struct\", \"length of stored data structure with id is equal to the plug_in proc_name\"},\n");
fprintf(l_fp, " };\n");
fprintf(l_fp, " static int nargs_iter = sizeof(args_iter) / sizeof(args_iter[0]);\n");
fprintf(l_fp, "\n");
fprintf(l_fp, " static GParamDef *return_vals = NULL;\n");
fprintf(l_fp, " static GimpParamDef *return_vals = NULL;\n");
fprintf(l_fp, " static int nreturn_vals = 0;\n");
fprintf(l_fp, "\n");
fprintf(l_fp, " sprintf(l_blurb_text, \"This extension calculates the modified values for one iterationstep for the call of %s\");\n", l_clean_proc_name);
@ -669,7 +669,7 @@ gint p_gen_code_iter(char *proc_name)
fprintf(l_fp, " \"%s\",\n", l_gendate); /* generation date */
fprintf(l_fp, " NULL, /* do not appear in menus */\n");
fprintf(l_fp, " NULL,\n");
fprintf(l_fp, " PROC_EXTENSION,\n");
fprintf(l_fp, " GIMP_EXTENSION,\n");
fprintf(l_fp, " nargs_iter, nreturn_vals,\n");
fprintf(l_fp, " args_iter, return_vals);\n");
fprintf(l_fp, "\n");
@ -685,13 +685,13 @@ gint p_gen_code_iter(char *proc_name)
fprintf(l_fp, "static void\n");
fprintf(l_fp, "run (char *name,\n");
fprintf(l_fp, " int n_params,\n");
fprintf(l_fp, " GParam *param,\n");
fprintf(l_fp, " GimpParam *param,\n");
fprintf(l_fp, " int *nreturn_vals,\n");
fprintf(l_fp, " GParam **return_vals)\n");
fprintf(l_fp, " GimpParam **return_vals)\n");
fprintf(l_fp, "{\n");
fprintf(l_fp, " static GParam values[1];\n");
fprintf(l_fp, " GRunModeType run_mode;\n");
fprintf(l_fp, " GStatusType status = STATUS_SUCCESS;\n");
fprintf(l_fp, " static GimpParam values[1];\n");
fprintf(l_fp, " GimpRunModeType run_mode;\n");
fprintf(l_fp, " GimpPDBStatusType status = GIMP_PDB_SUCCESS;\n");
fprintf(l_fp, " gint32 image_id;\n");
fprintf(l_fp, " gint32 len_struct;\n");
fprintf(l_fp, " gint32 total_steps;\n");
@ -705,7 +705,7 @@ gint p_gen_code_iter(char *proc_name)
fprintf(l_fp, "\n");
fprintf(l_fp, " run_mode = param[0].data.d_int32;\n");
fprintf(l_fp, "\n");
fprintf(l_fp, " if ((run_mode == RUN_NONINTERACTIVE) && (n_params == 4))\n");
fprintf(l_fp, " if ((run_mode == GIMP_RUN_NONINTERACTIVE) && (n_params == 4))\n");
fprintf(l_fp, " {\n");
fprintf(l_fp, " total_steps = param[1].data.d_int32;\n");
fprintf(l_fp, " current_step = param[2].data.d_float;\n");
@ -713,12 +713,12 @@ gint p_gen_code_iter(char *proc_name)
fprintf(l_fp, " l_rc = p_%s_iter(run_mode, total_steps, current_step, len_struct);\n", l_clean_proc_name);
fprintf(l_fp, " if(l_rc < 0)\n");
fprintf(l_fp, " {\n");
fprintf(l_fp, " status = STATUS_EXECUTION_ERROR;\n");
fprintf(l_fp, " status = GIMP_PDB_EXECUTION_ERROR;\n");
fprintf(l_fp, " }\n");
fprintf(l_fp, " }\n");
fprintf(l_fp, " else status = STATUS_CALLING_ERROR;\n");
fprintf(l_fp, " else status = GIMP_PDB_CALLING_ERROR;\n");
fprintf(l_fp, "\n");
fprintf(l_fp, " values[0].type = PARAM_STATUS;\n");
fprintf(l_fp, " values[0].type = GIMP_PDB_STATUS;\n");
fprintf(l_fp, " values[0].data.d_status = status;\n");
fprintf(l_fp, "\n");
fprintf(l_fp, "}\n");

View File

@ -78,7 +78,7 @@ static gint32 g_current_image_id;
void p_gdisplays_update_full(gint32 image_id)
{
GParam* l_params;
GimpParam* l_params;
gint l_retvals;
if(p_procedure_available("gimp_image_update_full", PTYP_ANY) >= 0)
@ -86,8 +86,8 @@ void p_gdisplays_update_full(gint32 image_id)
l_params = gimp_run_procedure ("gimp_image_update_full",
&l_retvals,
PARAM_IMAGE, image_id,
PARAM_END);
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_END);
/* Note: gimp_displays_update_full is not available in the official release gimp 0.99.16
* (dont care if procedure is not there,
@ -105,7 +105,7 @@ void p_gdisplays_update_full(gint32 image_id)
/* pitstop dialog
* return -1 on cancel, 0 .. on continue, 1 .. on skip
*/
static gint p_pitstop(GRunModeType run_mode, char *plugin_name, gint text_flag,
static gint p_pitstop(GimpRunModeType run_mode, char *plugin_name, gint text_flag,
char *step_backup_file, gint len_step_backup_file,
gint32 layer_idx)
{
@ -138,7 +138,7 @@ static gint p_pitstop(GRunModeType run_mode, char *plugin_name, gint text_flag,
l_but_argc = 2;
l_argc = 0;
/* optional dialog between both calls (to see the effect of 1.call) */
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_env = g_getenv("GAP_FILTER_PITSTOP");
if(l_env != NULL)
@ -230,7 +230,7 @@ static gint32 p_get_indexed_layerid(gint32 image_id, gint *nlayers, gint32 idx,
* ============================================================================
*/
int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
int p_foreach_multilayer(GimpRunModeType run_mode, gint32 image_id,
char *plugin_name, t_apply_mode apply_mode)
{
static char l_key_from[512];
@ -241,7 +241,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
gint32 l_idx;
gint l_nlayers;
gdouble l_percentage, l_percentage_step;
GParam *l_params;
GimpParam *l_params;
gint l_retvals;
int l_rc;
gint l_plugin_data_len;
@ -271,7 +271,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
l_plugin_iterator = p_get_iterator_proc(plugin_name);
l_percentage = 0.0;
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
gimp_progress_init( _("Applying Filter to all Layers..."));
}
@ -330,7 +330,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
else
{
if(gap_debug) fprintf(stderr, "DEBUG: apllying %s on Layerstack %d id=%d\n", plugin_name, (int)l_idx, (int)l_layer_id);
l_rc = p_call_plugin(plugin_name, image_id, l_layer_id, RUN_INTERACTIVE);
l_rc = p_call_plugin(plugin_name, image_id, l_layer_id, GIMP_RUN_INTERACTIVE);
/* get values, then store with suffix "_ITER_FROM" */
l_plugin_data_len = p_get_data(plugin_name);
@ -341,7 +341,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
}
else l_rc = -1;
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -380,7 +380,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
p_gdisplays_update_full(image_id);
if(gap_debug) fprintf(stderr, "DEBUG: apllying %s on Layerstack 0 id=%d\n", plugin_name, (int)l_layer_id);
l_rc = p_call_plugin(plugin_name, image_id, l_layer_id, RUN_INTERACTIVE);
l_rc = p_call_plugin(plugin_name, image_id, l_layer_id, GIMP_RUN_INTERACTIVE);
/* get values, then store with suffix "_ITER_TO" */
l_plugin_data_len = p_get_data(plugin_name);
@ -391,7 +391,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
}
else l_rc = -1;
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -423,9 +423,9 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
else
{
if(gap_debug) fprintf(stderr, "DEBUG: NO Varying, apllying %s on Layer id=%d\n", plugin_name, (int)l_layer_id);
l_rc = p_call_plugin(plugin_name, image_id, l_layer_id, RUN_INTERACTIVE);
l_rc = p_call_plugin(plugin_name, image_id, l_layer_id, GIMP_RUN_INTERACTIVE);
l_top_layer = 0;
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -437,7 +437,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
{
/* call plugin foreach layer inbetween
* with runmode RUN_WITH_LAST_VALS
* with runmode GIMP_RUN_WITH_LAST_VALS
* and modify the last values
*/
l_pit_rc = 1;
@ -476,11 +476,11 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
l_plugin_iterator, (int)l_idx);
l_params = gimp_run_procedure (l_plugin_iterator,
&l_retvals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_INT32, l_nlayers -1, /* total steps */
PARAM_FLOAT, (gdouble)l_idx, /* current step */
PARAM_INT32, l_plugin_data_len, /* length of stored data struct */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_INT32, l_nlayers -1, /* total steps */
GIMP_PDB_FLOAT, (gdouble)l_idx, /* current step */
GIMP_PDB_INT32, l_plugin_data_len, /* length of stored data struct */
GIMP_PDB_END);
if (l_params[0].data.d_status == FALSE)
{
fprintf(stderr, "ERROR: iterator %s failed\n", l_plugin_iterator);
@ -495,7 +495,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
if(l_pit_rc == 0) /* 0 == continue without further dialogs */
{
/* call the plugin itself with runmode RUN_WITH_LAST_VALUES */
l_rc = p_call_plugin(plugin_name, image_id, l_layer_id, RUN_WITH_LAST_VALS);
l_rc = p_call_plugin(plugin_name, image_id, l_layer_id, GIMP_RUN_WITH_LAST_VALS);
/* check if to save each step to backup file */
if((l_step_backup_file[0] != '\0') && (l_step_backup_file[0] != ' '))
{
@ -505,7 +505,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
}
}
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -536,7 +536,7 @@ int p_foreach_multilayer(GRunModeType run_mode, gint32 image_id,
* ============================================================================
*/
gint gap_proc_anim_apply(GRunModeType run_mode, gint32 image_id, char *plugin_name)
gint gap_proc_anim_apply(GimpRunModeType run_mode, gint32 image_id, char *plugin_name)
{
t_gap_db_browse_result l_browser_result;
t_apply_mode l_apply_mode;
@ -544,7 +544,7 @@ gint gap_proc_anim_apply(GRunModeType run_mode, gint32 image_id, char *plugin_na
l_apply_mode = PAPP_CONSTANT;
g_current_image_id = image_id;
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
if(gap_db_browser_dialog( _("Select Filter for Animated apply"),

View File

@ -28,7 +28,7 @@
* plugins internal settings.
*
* Common things to all Iteratur Plugins:
* Interface: run_mode # is always RUN_NONINTERACTIVE
* Interface: run_mode # is always GIMP_RUN_NONINTERACTIVE
* total_steps # total number of handled layers (drawables)
* current_step # current layer (beginning wit 0)
* has type gdouble for later extensions
@ -658,16 +658,16 @@ static void p_install_proc_iter_ALT(char *name)
gchar *l_iter_proc_name;
gchar *l_blurb_text;
static GParamDef args_iter[] =
static GimpParamDef args_iter[] =
{
{PARAM_INT32, "run_mode", "non-interactive"},
{PARAM_INT32, "total_steps", "total number of steps (# of layers-1 to apply the related plug-in)"},
{PARAM_FLOAT, "current_step", "current (for linear iterations this is the layerstack position, otherwise some value inbetween)"},
{PARAM_INT32, "len_struct", "length of stored data structure with id is equal to the plug_in proc_name"},
{GIMP_PDB_INT32, "run_mode", "non-interactive"},
{GIMP_PDB_INT32, "total_steps", "total number of steps (# of layers-1 to apply the related plug-in)"},
{GIMP_PDB_FLOAT, "current_step", "current (for linear iterations this is the layerstack position, otherwise some value inbetween)"},
{GIMP_PDB_INT32, "len_struct", "length of stored data structure with id is equal to the plug_in proc_name"},
};
static int nargs_iter = sizeof(args_iter) / sizeof(args_iter[0]);
static GParamDef *return_vals = NULL;
static GimpParamDef *return_vals = NULL;
static int nreturn_vals = 0;
l_iter_proc_name = g_strdup_printf("%s_Iterator_ALT", name);
@ -681,7 +681,7 @@ static void p_install_proc_iter_ALT(char *name)
"Feb. 2000",
NULL, /* do not appear in menus */
NULL,
PROC_EXTENSION,
GIMP_EXTENSION,
nargs_iter, nreturn_vals,
args_iter, return_vals);
@ -703,7 +703,7 @@ void gap_query_iterators_ALT()
* ----------------------------------------------------------------------
*/
gint gap_run_iterators_ALT(char *name, GRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct)
gint gap_run_iterators_ALT(char *name, GimpRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct)
{
gint l_rc;
int l_idx;

View File

@ -38,7 +38,7 @@
#ifndef _GAP_FILTER_ITERATORS_H
#define _GAP_FILTER_ITERATORS_H
typedef gint (*t_iter_ALT_func) (GRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct);
typedef gint (*t_iter_ALT_func) (GimpRunModeType run_mode, gint32 total_steps, gdouble current_step, gint32 len_struct);
typedef struct t_iter_ALT_tab

View File

@ -66,10 +66,10 @@ int gap_debug = 0;
static void query(void);
static void run(char *name, int nparam, GParam *param,
int *nretvals, GParam **retvals);
static void run(char *name, int nparam, GimpParam *param,
int *nretvals, GimpParam **retvals);
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -82,29 +82,29 @@ MAIN ()
static void
query ()
{
static GParamDef args_foreach[] =
static GimpParamDef args_foreach[] =
{
{PARAM_INT32, "run_mode", "Interactive, non-interactive"},
{PARAM_IMAGE, "image", "Input image"},
{PARAM_DRAWABLE, "drawable", "Input drawable (unused)"},
{PARAM_STRING, "proc_name", "name of plugin procedure to run for each layer)"},
{GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive"},
{GIMP_PDB_IMAGE, "image", "Input image"},
{GIMP_PDB_DRAWABLE, "drawable", "Input drawable (unused)"},
{GIMP_PDB_STRING, "proc_name", "name of plugin procedure to run for each layer)"},
};
static int nargs_foreach = sizeof(args_foreach) / sizeof(args_foreach[0]);
static GParamDef *return_vals = NULL;
static GimpParamDef *return_vals = NULL;
static int nreturn_vals = 0;
INIT_I18N();
gimp_install_procedure("plug_in_gap_layers_run_animfilter",
"This plugin calls another plugin for each layer of an image, varying its settings (to produce animated effects). The called plugin must work on a single drawable and must be able to RUN_WITH_LAST_VALS",
"This plugin calls another plugin for each layer of an image, varying its settings (to produce animated effects). The called plugin must work on a single drawable and must be able to GIMP_RUN_WITH_LAST_VALS",
"",
"Wolfgang Hofer (hof@hotbot.com)",
"Wolfgang Hofer",
gap_filter_version,
N_("<Image>/Filters/Filter all Layers..."),
"RGB*, INDEXED*, GRAY*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs_foreach, nreturn_vals,
args_foreach, return_vals);
@ -119,16 +119,16 @@ query ()
static void
run (char *name,
int n_params,
GParam *param,
GimpParam *param,
int *nreturn_vals,
GParam **return_vals)
GimpParam **return_vals)
{
#define MAX_PLUGIN_NAME_LEN 256
char l_plugin_name[MAX_PLUGIN_NAME_LEN];
static GParam values[1];
GRunModeType run_mode;
GStatusType status = STATUS_SUCCESS;
static GimpParam values[1];
GimpRunModeType run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_id;
gint32 len_struct;
gint32 total_steps;
@ -155,11 +155,11 @@ run (char *name,
if (strcmp (name, "plug_in_gap_layers_run_animfilter") == 0)
{
if (run_mode == RUN_NONINTERACTIVE)
if (run_mode == GIMP_RUN_NONINTERACTIVE)
{
if (n_params != 4)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
else
{
@ -168,7 +168,7 @@ run (char *name,
}
INIT_I18N();
}
else if(run_mode == RUN_WITH_LAST_VALS)
else if(run_mode == GIMP_RUN_WITH_LAST_VALS)
{
/* probably get last values (name of last plugin) */
gimp_get_data("plug_in_gap_layers_run_animfilter", l_plugin_name);
@ -176,7 +176,7 @@ run (char *name,
INIT_I18N_UI();
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
image_id = param[1].data.d_image;
@ -187,26 +187,26 @@ run (char *name,
}
else
{
if ((run_mode == RUN_NONINTERACTIVE) && (n_params == 4))
if ((run_mode == GIMP_RUN_NONINTERACTIVE) && (n_params == 4))
{
total_steps = param[1].data.d_int32;
current_step = param[2].data.d_float;
len_struct = param[3].data.d_int32;
l_rc = gap_run_iterators_ALT(name, run_mode, total_steps, current_step, len_struct);
}
else status = STATUS_CALLING_ERROR;
else status = GIMP_PDB_CALLING_ERROR;
}
if(l_rc < 0)
{
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
if (run_mode != RUN_NONINTERACTIVE)
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush();
values[0].type = PARAM_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
}

View File

@ -71,7 +71,7 @@ static gint32 g_current_image_id;
gint p_call_plugin(char *plugin_name, gint32 image_id, gint32 layer_id, GRunModeType run_mode)
gint p_call_plugin(char *plugin_name, gint32 image_id, gint32 layer_id, GimpRunModeType run_mode)
{
GimpDrawable *l_drawable;
GimpParam *l_ret_params;
@ -109,8 +109,8 @@ gint p_call_plugin(char *plugin_name, gint32 image_id, gint32 layer_id, GRunMode
}
/* construct the procedures arguments */
l_argv = g_new (GParam, l_nparams);
memset (l_argv, 0, (sizeof (GParam) * l_nparams));
l_argv = g_new (GimpParam, l_nparams);
memset (l_argv, 0, (sizeof (GimpParam) * l_nparams));
/* initialize the argument types */
for (l_idx = 0; l_idx < l_nparams; l_idx++)
@ -118,26 +118,26 @@ gint p_call_plugin(char *plugin_name, gint32 image_id, gint32 layer_id, GRunMode
l_argv[l_idx].type = l_params[l_idx].type;
switch(l_params[l_idx].type)
{
case PARAM_DISPLAY:
case GIMP_PDB_DISPLAY:
l_argv[l_idx].data.d_display = -1;
break;
case PARAM_DRAWABLE:
case PARAM_LAYER:
case PARAM_CHANNEL:
case GIMP_PDB_DRAWABLE:
case GIMP_PDB_LAYER:
case GIMP_PDB_CHANNEL:
l_argv[l_idx].data.d_drawable = -1;
break;
case PARAM_IMAGE:
case GIMP_PDB_IMAGE:
l_argv[l_idx].data.d_image = -1;
break;
case PARAM_INT32:
case PARAM_INT16:
case PARAM_INT8:
case GIMP_PDB_INT32:
case GIMP_PDB_INT16:
case GIMP_PDB_INT8:
l_argv[l_idx].data.d_int32 = 0;
break;
case PARAM_FLOAT:
case GIMP_PDB_FLOAT:
l_argv[l_idx].data.d_float = 0.0;
break;
case PARAM_STRING:
case GIMP_PDB_STRING:
l_argv[l_idx].data.d_string = NULL;
break;
default:
@ -187,7 +187,7 @@ gint p_call_plugin(char *plugin_name, gint32 image_id, gint32 layer_id, GRunMode
int
p_save_xcf(gint32 image_id, char *sav_name)
{
GParam* l_params;
GimpParam* l_params;
gint l_retvals;
/* save current image as xcf file
@ -196,12 +196,12 @@ p_save_xcf(gint32 image_id, char *sav_name)
*/
l_params = gimp_run_procedure ("gimp_xcf_save",
&l_retvals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, image_id,
PARAM_DRAWABLE, 0,
PARAM_STRING, sav_name,
PARAM_STRING, sav_name, /* raw name ? */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_DRAWABLE, 0,
GIMP_PDB_STRING, sav_name,
GIMP_PDB_STRING, sav_name, /* raw name ? */
GIMP_PDB_END);
if (l_params[0].data.d_status == FALSE) return(-1);
@ -296,20 +296,20 @@ gint p_procedure_available(char *proc_name, t_proc_type ptype)
{
case PTYP_ITERATOR:
/* check exactly for Input Parametertypes (common to all Iterators) */
if (l_proc_type != PROC_EXTENSION ) { l_rc = -1; break; }
if (l_proc_type != GIMP_EXTENSION ) { l_rc = -1; break; }
if (l_nparams != 4) { l_rc = -1; break; }
if (l_params[0].type != PARAM_INT32) { l_rc = -1; break; }
if (l_params[1].type != PARAM_INT32) { l_rc = -1; break; }
if (l_params[2].type != PARAM_FLOAT) { l_rc = -1; break; }
if (l_params[3].type != PARAM_INT32) { l_rc = -1; break; }
if (l_params[0].type != GIMP_PDB_INT32) { l_rc = -1; break; }
if (l_params[1].type != GIMP_PDB_INT32) { l_rc = -1; break; }
if (l_params[2].type != GIMP_PDB_FLOAT) { l_rc = -1; break; }
if (l_params[3].type != GIMP_PDB_INT32) { l_rc = -1; break; }
break;
case PTYP_CAN_OPERATE_ON_DRAWABLE:
/* check if plugin can be a typical one, that works on one drawable */
if (l_proc_type != PROC_PLUG_IN) { l_rc = -1; break; }
if (l_proc_type != GIMP_PLUGIN) { l_rc = -1; break; }
if (l_nparams < 3) { l_rc = -1; break; }
if (l_params[0].type != PARAM_INT32) { l_rc = -1; break; }
if (l_params[1].type != PARAM_IMAGE) { l_rc = -1; break; }
if (l_params[2].type != PARAM_DRAWABLE) { l_rc = -1; break; }
if (l_params[0].type != GIMP_PDB_INT32) { l_rc = -1; break; }
if (l_params[1].type != GIMP_PDB_IMAGE) { l_rc = -1; break; }
if (l_params[2].type != GIMP_PDB_DRAWABLE) { l_rc = -1; break; }
break;
default:
break;
@ -384,7 +384,7 @@ char * p_get_iterator_proc(char *plugin_name)
int p_constraint_proc_sel1(gchar *proc_name)
{
int l_rc;
GImageType l_base_type;
GimpImageBaseType l_base_type;
/* here we should check, if proc_name
* can operate on the current Imagetype (RGB, INDEXED, GRAY)
@ -399,9 +399,9 @@ int p_constraint_proc_sel1(gchar *proc_name)
l_base_type =gimp_image_base_type(g_current_image_id);
switch(l_base_type)
{
case RGB:
case GRAY:
case INDEXED:
case GIMP_RGB:
case GIMP_GRAY:
case GIMP_INDEXED:
l_rc = 1;
break;
}

View File

@ -44,7 +44,7 @@ typedef enum
* ------------------------
*/
gint p_call_plugin(char *plugin_name, gint32 image_id, gint32 layer_id, GRunModeType run_mode);
gint p_call_plugin(char *plugin_name, gint32 image_id, gint32 layer_id, GimpRunModeType run_mode);
int p_save_xcf(gint32 image_id, char *sav_name);
gint p_get_data(char *key);
void p_set_data(char *key, gint plugin_data_len);

View File

@ -76,10 +76,10 @@ static char *gap_main_version = "1.1.11b; 1999/11/20";
int gap_debug = 0;
static void query(void);
static void run(char *name, int nparam, GParam *param,
int *nretvals, GParam **retvals);
static void run(char *name, int nparam, GimpParam *param,
int *nretvals, GimpParam **retvals);
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -92,29 +92,29 @@ MAIN ()
static void
query ()
{
static GParamDef args_xanim[] =
static GimpParamDef args_xanim[] =
{
{PARAM_INT32, "run_mode", "Interactive"},
{PARAM_IMAGE, "image", "(unused)"},
{PARAM_DRAWABLE, "drawable", "(unused)"},
{GIMP_PDB_INT32, "run_mode", "Interactive"},
{GIMP_PDB_IMAGE, "image", "(unused)"},
{GIMP_PDB_DRAWABLE, "drawable", "(unused)"},
};
static int nargs_xanim = sizeof(args_xanim) / sizeof(args_xanim[0]);
static GParamDef args_xanim_ext[] =
static GimpParamDef args_xanim_ext[] =
{
{PARAM_INT32, "run_mode", "Interactive"},
{GIMP_PDB_INT32, "run_mode", "Interactive"},
};
static int nargs_xanim_ext = sizeof(args_xanim_ext) / sizeof(args_xanim_ext[0]);
static GParamDef args_mpege[] =
static GimpParamDef args_mpege[] =
{
{PARAM_INT32, "run_mode", "Interactive, non-interactive"},
{PARAM_IMAGE, "image", "Input image (one of the Anim Frames)"},
{PARAM_DRAWABLE, "drawable", "Input drawable (unused)"},
{GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive"},
{GIMP_PDB_IMAGE, "image", "Input image (one of the Anim Frames)"},
{GIMP_PDB_DRAWABLE, "drawable", "Input drawable (unused)"},
};
static int nargs_mpege = sizeof(args_mpege) / sizeof(args_mpege[0]);
static GParamDef *return_vals = NULL;
static GimpParamDef *return_vals = NULL;
static int nreturn_vals = 0;
@ -126,7 +126,7 @@ query ()
gap_main_version,
N_("<Image>/Video/Split Video to Frames/Any XANIM readable..."),
NULL,
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs_xanim, nreturn_vals,
args_xanim, return_vals);
@ -138,7 +138,7 @@ query ()
gap_main_version,
N_("<Toolbox>/Xtns/Split Video to Frames/Any XANIM readable..."),
NULL,
PROC_EXTENSION,
GIMP_EXTENSION,
nargs_xanim_ext, nreturn_vals,
args_xanim_ext, return_vals);
@ -150,7 +150,7 @@ query ()
gap_main_version,
N_("<Image>/Video/Encode/MPEG1..."),
"*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs_mpege, nreturn_vals,
args_mpege, return_vals);
@ -163,7 +163,7 @@ query ()
gap_main_version,
N_("<Image>/Video/Encode/MPEG2..."),
"*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs_mpege, nreturn_vals,
args_mpege, return_vals);
@ -175,9 +175,9 @@ query ()
static void
run (char *name,
int n_params,
GParam *param,
GimpParam *param,
int *nreturn_vals,
GParam **return_vals)
GimpParam **return_vals)
{
typedef struct
{
@ -191,9 +191,9 @@ run (char *name,
char *l_env;
char l_extension[32];
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 nr;
@ -229,8 +229,8 @@ run (char *name,
{
fprintf(stderr, "gap_plugin is LOCKED for Image ID=%s\n", l_lockname);
status = STATUS_EXECUTION_ERROR;
values[0].type = PARAM_STATUS;
status = GIMP_PDB_EXECUTION_ERROR;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
return ;
}
@ -242,7 +242,7 @@ run (char *name,
gimp_set_data (l_lockname, &l_lock, sizeof(l_lock));
}
if (run_mode == RUN_NONINTERACTIVE) {
if (run_mode == GIMP_RUN_NONINTERACTIVE) {
INIT_I18N();
} else {
INIT_I18N_UI();
@ -251,13 +251,13 @@ run (char *name,
if ((strcmp (name, "plug_in_gap_xanim_decode") == 0)
|| (strcmp (name, "extension_gap_xanim_decode") == 0))
{
if (run_mode == RUN_NONINTERACTIVE)
if (run_mode == GIMP_RUN_NONINTERACTIVE)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
/* planed: define non interactive PARAMS */
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
/* planed: define non interactive PARAMS */
@ -267,11 +267,11 @@ run (char *name,
}
else if (strcmp (name, "plug_in_gap_mpeg_encode") == 0)
{
if (run_mode == RUN_NONINTERACTIVE)
if (run_mode == GIMP_RUN_NONINTERACTIVE)
{
if (n_params != 3)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
else
{
@ -280,7 +280,7 @@ run (char *name,
}
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
image_id = param[1].data.d_image;
@ -292,11 +292,11 @@ run (char *name,
}
else if (strcmp (name, "plug_in_gap_mpeg2encode") == 0)
{
if (run_mode == RUN_NONINTERACTIVE)
if (run_mode == GIMP_RUN_NONINTERACTIVE)
{
if (n_params != 3)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
else
{
@ -305,7 +305,7 @@ run (char *name,
}
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
image_id = param[1].data.d_image;
@ -320,14 +320,14 @@ run (char *name,
if(l_rc < 0)
{
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
if (run_mode != RUN_NONINTERACTIVE)
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush();
values[0].type = PARAM_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
if (strcmp (name, "extension_gap_xanim_decode") != 0)

View File

@ -51,14 +51,14 @@ extern int gap_debug; /* ==0 ... dont print debug infos */
gint32 p_my_layer_copy (gint32 dst_image_id,
gint32 src_layer_id,
gdouble opacity, /* 0.0 upto 100.0 */
GLayerMode mode,
GimpLayerModeEffects mode,
gint *src_offset_x,
gint *src_offset_y )
{
gint32 l_new_layer_id;
gint32 l_ret_id;
char *l_name;
GDrawableType l_src_type;
GimpImageType l_src_type;
if(gap_debug) printf("GAP p_my_layer_copy: START\n");
@ -69,21 +69,21 @@ gint32 p_my_layer_copy (gint32 dst_image_id,
if(opacity < 0.0) opacity = 0.0;
l_name = gimp_layer_get_name(src_layer_id);
l_src_type = gimp_layer_type(src_layer_id);
l_src_type = gimp_drawable_type(src_layer_id);
switch(l_src_type)
{
case RGB_IMAGE: /* 0 */
case RGBA_IMAGE: /* 1 */
if(gimp_image_base_type(dst_image_id) != RGB) { return -1; }
case GIMP_RGB_IMAGE: /* 0 */
case GIMP_RGBA_IMAGE: /* 1 */
if(gimp_image_base_type(dst_image_id) != GIMP_RGB) { return -1; }
break;
case GRAY_IMAGE: /* 2 */
case GRAYA_IMAGE: /* 3 */
if(gimp_image_base_type(dst_image_id) != GRAY) { return -1; }
case GIMP_GRAY_IMAGE: /* 2 */
case GIMP_GRAYA_IMAGE: /* 3 */
if(gimp_image_base_type(dst_image_id) != GIMP_GRAY) { return -1; }
break;
case INDEXED_IMAGE: /* 4 */
case INDEXEDA_IMAGE: /* 5 */
if(gimp_image_base_type(dst_image_id) != INDEXED) { return -1; }
case GIMP_INDEXED_IMAGE: /* 4 */
case GIMP_INDEXEDA_IMAGE: /* 5 */
if(gimp_image_base_type(dst_image_id) != GIMP_INDEXED) { return -1; }
break;
}

View File

@ -48,7 +48,7 @@
gint32 p_my_layer_copy (gint32 dst_image_id,
gint32 src_layer_id,
gdouble opacity, /* 0.0 upto 100.0 */
GLayerMode mode,
GimpLayerModeEffects mode,
gint *src_offset_x,
gint *src_offset_y );

View File

@ -36,7 +36,7 @@
* that are not the 4digit style. (like frame1.xcf)
* 1.1.8a; 1999/08/31 hof: for AnimFrame Filtypes != XCF:
* p_decide_save_as does save INTERACTIVE at 1.st time
* and uses RUN_WITH_LAST_VALS for subsequent calls
* and uses GIMP_RUN_WITH_LAST_VALS for subsequent calls
* (this enables to set Fileformat specific save-Parameters
* at least at the 1.st call, using the save dialog
* of the selected (by gimp_file_save) file_save procedure.
@ -213,7 +213,7 @@ p_strdup_del_underscore(char *name)
* ============================================================================
*/
void p_msg_win(GRunModeType run_mode, char *msg)
void p_msg_win(GimpRunModeType run_mode, char *msg)
{
static t_but_arg l_argv[1];
int l_argc;
@ -229,7 +229,7 @@ void p_msg_win(GRunModeType run_mode, char *msg)
fwrite(msg, 1, strlen(msg), stderr);
fputc('\n', stderr);
if(run_mode == RUN_INTERACTIVE) p_buttons_dialog (_("GAP Message"), msg, l_argc, l_argv, -1);
if(run_mode == GIMP_RUN_INTERACTIVE) p_buttons_dialog (_("GAP Message"), msg, l_argc, l_argv, -1);
}
}
} /* end p_msg_win */
@ -609,7 +609,7 @@ char* p_alloc_fname(char *basename, long nr, char *extension)
* allocate and init an ainfo structure from the given image.
* ============================================================================
*/
t_anim_info *p_alloc_ainfo(gint32 image_id, GRunModeType run_mode)
t_anim_info *p_alloc_ainfo(gint32 image_id, GimpRunModeType run_mode)
{
t_anim_info *l_ainfo_ptr;
@ -999,7 +999,7 @@ int p_decide_save_as(gint32 image_id, char *sav_name)
static t_but_arg l_argv[3];
int l_argc;
int l_save_as_mode;
GRunModeType l_run_mode;
GimpRunModeType l_run_mode;
l_msg = _("You are using a file format != xcf\n"
"Save Operations may result\n"
@ -1028,11 +1028,11 @@ int p_decide_save_as(gint32 image_id, char *sav_name)
if(gap_debug) fprintf(stderr, "DEBUG: decide SAVE_AS_MODE %d\n", (int)l_save_as_mode);
if(l_save_as_mode < 0) return -1;
l_run_mode = RUN_INTERACTIVE;
l_run_mode = GIMP_RUN_INTERACTIVE;
}
else
{
l_run_mode = RUN_WITH_LAST_VALS;
l_run_mode = GIMP_RUN_WITH_LAST_VALS;
}
gimp_set_data (l_save_as_name, &l_save_as_mode, sizeof(l_save_as_mode));
@ -1052,12 +1052,12 @@ int p_decide_save_as(gint32 image_id, char *sav_name)
* p_save_named_image
* ============================================================================
*/
gint32 p_save_named_image(gint32 image_id, char *sav_name, GRunModeType run_mode)
gint32 p_save_named_image(gint32 image_id, char *sav_name, GimpRunModeType run_mode)
{
GDrawable *l_drawable;
GimpDrawable *l_drawable;
gint l_nlayers;
gint32 *l_layers_list;
GParam *l_params;
GimpParam *l_params;
gint l_retvals;
if(gap_debug) fprintf(stderr, "DEBUG: before p_save_named_image: '%s'\n", sav_name);
@ -1077,12 +1077,12 @@ gint32 p_save_named_image(gint32 image_id, char *sav_name, GRunModeType run_mode
l_params = gimp_run_procedure ("gimp_file_save",
&l_retvals,
PARAM_INT32, run_mode,
PARAM_IMAGE, image_id,
PARAM_DRAWABLE, l_drawable->id,
PARAM_STRING, sav_name,
PARAM_STRING, sav_name, /* raw name ? */
PARAM_END);
GIMP_PDB_INT32, run_mode,
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_DRAWABLE, l_drawable->id,
GIMP_PDB_STRING, sav_name,
GIMP_PDB_STRING, sav_name, /* raw name ? */
GIMP_PDB_END);
if(gap_debug) fprintf(stderr, "DEBUG: after p_save_named_image: '%s' nlayers=%d image=%d drw=%d run_mode=%d\n", sav_name, (int)l_nlayers, (int)image_id, (int)l_drawable->id, (int)run_mode);
@ -1118,7 +1118,7 @@ gint32 p_save_named_image(gint32 image_id, char *sav_name, GRunModeType run_mode
*/
int p_save_named_frame(gint32 image_id, char *sav_name)
{
GParam* l_params;
GimpParam* l_params;
char *l_ext;
char *l_tmpname;
gint l_retvals;
@ -1159,9 +1159,9 @@ int p_save_named_frame(gint32 image_id, char *sav_name)
/* FILE exists: let gimp find another temp name */
l_params = gimp_run_procedure ("gimp_temp_name",
&l_retvals,
PARAM_STRING,
GIMP_PDB_STRING,
&l_ext[1],
PARAM_END);
GIMP_PDB_END);
if(l_params[1].data.d_string != NULL)
{
@ -1194,12 +1194,12 @@ int p_save_named_frame(gint32 image_id, char *sav_name)
*/
l_params = gimp_run_procedure ("gimp_xcf_save",
&l_retvals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, image_id,
PARAM_DRAWABLE, 0,
PARAM_STRING, l_tmpname,
PARAM_STRING, l_tmpname, /* raw name ? */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_DRAWABLE, 0,
GIMP_PDB_STRING, l_tmpname,
GIMP_PDB_STRING, l_tmpname, /* raw name ? */
GIMP_PDB_END);
if(gap_debug) fprintf(stderr, "DEBUG: after xcf p_save_named_frame: '%s'\n", l_tmpname);
if (l_params[0].data.d_status != FALSE)
@ -1301,7 +1301,7 @@ int p_save_old_frame(t_anim_info *ainfo_ptr)
*/
gint32 p_load_image (char *lod_name)
{
GParam* l_params;
GimpParam* l_params;
char *l_ext;
char *l_tmpname;
gint l_retvals;
@ -1320,9 +1320,9 @@ gint32 p_load_image (char *lod_name)
/* find a temp name */
l_params = gimp_run_procedure ("gimp_temp_name",
&l_retvals,
PARAM_STRING,
GIMP_PDB_STRING,
&l_ext[1], /* extension */
PARAM_END);
GIMP_PDB_END);
if(l_params[1].data.d_string != NULL)
{
@ -1346,10 +1346,10 @@ gint32 p_load_image (char *lod_name)
l_params = gimp_run_procedure ("gimp_file_load", /* "gimp_xcf_load" */
&l_retvals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_STRING, l_tmpname,
PARAM_STRING, l_tmpname, /* raw name ? */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_STRING, l_tmpname,
GIMP_PDB_STRING, l_tmpname, /* raw name ? */
GIMP_PDB_END);
l_tmp_image_id = l_params[1].data.d_int32;
@ -1597,7 +1597,7 @@ int p_dup(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
l_percentage = 0.0;
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
gimp_progress_init( _("Duplicating frames..."));
}
@ -1622,7 +1622,7 @@ int p_dup(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
l_percentage_step = 1.0 / ((1.0 + l_hi) - l_src_nr_max);
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -1640,7 +1640,7 @@ int p_dup(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
g_free(l_dup_name);
g_free(l_curr_name);
}
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -1773,7 +1773,7 @@ p_shift(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
g_free(l_curr_name);
l_percentage = 0.0;
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
gimp_progress_init( _("Renumber Framesequence..."));
}
@ -1792,7 +1792,7 @@ p_shift(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
g_free(tmp_errtxt);
return -1;
}
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -1814,7 +1814,7 @@ p_shift(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
g_free(tmp_errtxt);
return -1;
}
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -1848,7 +1848,7 @@ p_shift(t_anim_info *ainfo_ptr, long cnt, long range_from, long range_to)
* and load it from the next/prev anim Frame on disk.
* ============================================================================
*/
int gap_next(GRunModeType run_mode, gint32 image_id)
int gap_next(GimpRunModeType run_mode, gint32 image_id)
{
int rc;
t_anim_info *ainfo_ptr;
@ -1866,7 +1866,7 @@ int gap_next(GRunModeType run_mode, gint32 image_id)
return(rc);
} /* end gap_next */
int gap_prev(GRunModeType run_mode, gint32 image_id)
int gap_prev(GimpRunModeType run_mode, gint32 image_id)
{
int rc;
t_anim_info *ainfo_ptr;
@ -1892,7 +1892,7 @@ int gap_prev(GRunModeType run_mode, gint32 image_id)
* ============================================================================
*/
int gap_first(GRunModeType run_mode, gint32 image_id)
int gap_first(GimpRunModeType run_mode, gint32 image_id)
{
int rc;
t_anim_info *ainfo_ptr;
@ -1912,7 +1912,7 @@ int gap_first(GRunModeType run_mode, gint32 image_id)
return(rc);
} /* end gap_first */
int gap_last(GRunModeType run_mode, gint32 image_id)
int gap_last(GimpRunModeType run_mode, gint32 image_id)
{
int rc;
t_anim_info *ainfo_ptr;
@ -1937,12 +1937,12 @@ int gap_last(GRunModeType run_mode, gint32 image_id)
*
* store the current Gimp Image to disk
* and load it from the anim Frame on disk that has the specified frame Nr.
* RUN_INTERACTIVE:
* GIMP_RUN_INTERACTIVE:
* show dialogwindow where user can enter the destination frame Nr.
* ============================================================================
*/
int gap_goto(GRunModeType run_mode, gint32 image_id, int nr)
int gap_goto(GimpRunModeType run_mode, gint32 image_id, int nr)
{
int rc;
t_anim_info *ainfo_ptr;
@ -1959,7 +1959,7 @@ int gap_goto(GRunModeType run_mode, gint32 image_id, int nr)
{
if(0 != p_chk_framerange(ainfo_ptr)) return -1;
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_title = g_strdup_printf (_("Goto Frame (%ld/%ld)")
, ainfo_ptr->curr_frame_nr
@ -2009,7 +2009,7 @@ int gap_goto(GRunModeType run_mode, gint32 image_id, int nr)
* gap_del
* ============================================================================
*/
int gap_del(GRunModeType run_mode, gint32 image_id, int nr)
int gap_del(GimpRunModeType run_mode, gint32 image_id, int nr)
{
int rc;
t_anim_info *ainfo_ptr;
@ -2027,7 +2027,7 @@ int gap_del(GRunModeType run_mode, gint32 image_id, int nr)
{
if(0 != p_chk_framerange(ainfo_ptr)) return -1;
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_title = g_strdup_printf (_("Delete Frames (%ld/%ld)")
, ainfo_ptr->curr_frame_nr
@ -2146,7 +2146,7 @@ int p_dup_dialog(t_anim_info *ainfo_ptr, long *range_from, long *range_to)
* gap_dup
* ============================================================================
*/
int gap_dup(GRunModeType run_mode, gint32 image_id, int nr,
int gap_dup(GimpRunModeType run_mode, gint32 image_id, int nr,
long range_from, long range_to)
{
int rc;
@ -2160,7 +2160,7 @@ int gap_dup(GRunModeType run_mode, gint32 image_id, int nr,
{
if (0 == p_dir_ainfo(ainfo_ptr))
{
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
if(0 != p_chk_framechange(ainfo_ptr)) { l_cnt = -1; }
else { l_cnt = p_dup_dialog(ainfo_ptr, &l_from, &l_to); }
@ -2200,7 +2200,7 @@ int gap_dup(GRunModeType run_mode, gint32 image_id, int nr,
* ============================================================================
*/
int gap_exchg(GRunModeType run_mode, gint32 image_id, int nr)
int gap_exchg(GimpRunModeType run_mode, gint32 image_id, int nr)
{
int rc;
t_anim_info *ainfo_ptr;
@ -2218,7 +2218,7 @@ int gap_exchg(GRunModeType run_mode, gint32 image_id, int nr)
{
if(0 != p_chk_framerange(ainfo_ptr)) return -1;
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
if(ainfo_ptr->curr_frame_nr < ainfo_ptr->last_frame_nr)
{
@ -2323,7 +2323,7 @@ int p_shift_dialog(t_anim_info *ainfo_ptr, long *range_from, long *range_to)
* gap_shift
* ============================================================================
*/
int gap_shift(GRunModeType run_mode, gint32 image_id, int nr,
int gap_shift(GimpRunModeType run_mode, gint32 image_id, int nr,
long range_from, long range_to)
{
int rc;
@ -2337,7 +2337,7 @@ int gap_shift(GRunModeType run_mode, gint32 image_id, int nr,
{
if (0 == p_dir_ainfo(ainfo_ptr))
{
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_cnt = 1;
if(0 != p_chk_framechange(ainfo_ptr)) { l_cnt = 0; }
@ -2515,7 +2515,7 @@ p_vid_edit_framecount()
* ============================================================================
*/
gint
gap_vid_edit_copy(GRunModeType run_mode, gint32 image_id, long range_from, long range_to)
gap_vid_edit_copy(GimpRunModeType run_mode, gint32 image_id, long range_from, long range_to)
{
int rc;
t_anim_info *ainfo_ptr;
@ -2620,7 +2620,7 @@ static gint p_custom_palette_file(char *filename, guchar *rgb, gint count)
* ============================================================================
*/
gint
gap_vid_edit_paste(GRunModeType run_mode, gint32 image_id, long paste_mode)
gap_vid_edit_paste(GimpRunModeType run_mode, gint32 image_id, long paste_mode)
{
#define CUSTOM_PALETTE_NAME "gap_cmap"
int rc;
@ -2637,9 +2637,9 @@ gap_vid_edit_paste(GRunModeType run_mode, gint32 image_id, long paste_mode)
gint32 l_insert_frame_nr;
gint32 l_tmp_image_id;
gint l_rc;
GParam *l_params;
GimpParam *l_params;
gint l_retvals;
GImageType l_orig_basetype;
GimpImageBaseType l_orig_basetype;
l_cnt2 = p_vid_edit_framecount();
if(gap_debug)
@ -2723,7 +2723,7 @@ gap_vid_edit_paste(GRunModeType run_mode, gint32 image_id, long paste_mode)
if((gimp_image_width(l_tmp_image_id) != gimp_image_width(image_id))
|| (gimp_image_height(l_tmp_image_id) != gimp_image_height(image_id)))
{
GParam *l_params;
GimpParam *l_params;
gint l_retvals;
gint32 l_size_x, l_size_y;
@ -2733,10 +2733,10 @@ gap_vid_edit_paste(GRunModeType run_mode, gint32 image_id, long paste_mode)
l_params = gimp_run_procedure ("gimp_image_scale",
&l_retvals,
PARAM_IMAGE, l_tmp_image_id,
PARAM_INT32, l_size_x,
PARAM_INT32, l_size_y,
PARAM_END);
GIMP_PDB_IMAGE, l_tmp_image_id,
GIMP_PDB_INT32, l_size_x,
GIMP_PDB_INT32, l_size_y,
GIMP_PDB_END);
}
@ -2753,14 +2753,14 @@ gap_vid_edit_paste(GRunModeType run_mode, gint32 image_id, long paste_mode)
gint l_ncolors;
/* convert tmp image to dest type */
case INDEXED:
case GIMP_INDEXED:
l_cmap = gimp_image_get_cmap(image_id, &l_ncolors);
if(gap_debug) printf("DEBUG: convert to INDEXED %d colors\n", (int)l_ncolors);
l_params = gimp_run_procedure ("gimp_gimprc_query",
&l_retvals,
PARAM_STRING, "gimp_dir",
PARAM_END);
GIMP_PDB_STRING, "gimp_dir",
GIMP_PDB_END);
l_gimp_dir = g_strdup(l_params[1].data.d_string);
gimp_destroy_params(l_params, l_retvals);
@ -2776,19 +2776,19 @@ gap_vid_edit_paste(GRunModeType run_mode, gint32 image_id, long paste_mode)
{
l_params = gimp_run_procedure ("gimp_palette_refresh",
&l_retvals,
PARAM_END);
GIMP_PDB_END);
gimp_destroy_params(l_params, l_retvals);
l_params = gimp_run_procedure ("gimp_convert_indexed",
&l_retvals,
PARAM_IMAGE, l_tmp_image_id,
PARAM_INT32, 1, /* dither value 1== floyd-steinberg */
PARAM_INT32, 4, /* palette_type 4 == CUSTOM_PALETTE */
PARAM_INT32, l_ncolors, /* number of colors */
PARAM_INT32, 0, /* alpha_dither */
PARAM_INT32, 0, /* remove_unused */
PARAM_STRING, CUSTOM_PALETTE_NAME, /* name of the custom palette */
PARAM_END);
GIMP_PDB_IMAGE, l_tmp_image_id,
GIMP_PDB_INT32, 1, /* dither value 1== floyd-steinberg */
GIMP_PDB_INT32, 4, /* palette_type 4 == CUSTOM_PALETTE */
GIMP_PDB_INT32, l_ncolors, /* number of colors */
GIMP_PDB_INT32, 0, /* alpha_dither */
GIMP_PDB_INT32, 0, /* remove_unused */
GIMP_PDB_STRING, CUSTOM_PALETTE_NAME, /* name of the custom palette */
GIMP_PDB_END);
gimp_destroy_params(l_params, l_retvals);
}
else
@ -2799,22 +2799,25 @@ gap_vid_edit_paste(GRunModeType run_mode, gint32 image_id, long paste_mode)
g_free(l_palette_filename);
g_free(l_gimp_dir);
break;
case GRAY:
case GIMP_GRAY:
if(gap_debug) printf("DEBUG: convert to GRAY'\n");
l_params = gimp_run_procedure ("gimp_convert_grayscale",
&l_retvals,
PARAM_IMAGE, l_tmp_image_id,
PARAM_END);
GIMP_PDB_IMAGE, l_tmp_image_id,
GIMP_PDB_END);
gimp_destroy_params(l_params, l_retvals);
break;
case RGB:
case GIMP_RGB:
if(gap_debug) printf("DEBUG: convert to RGB'\n");
l_params = gimp_run_procedure ("gimp_convert_rgb",
&l_retvals,
PARAM_IMAGE, l_tmp_image_id,
PARAM_END);
GIMP_PDB_IMAGE, l_tmp_image_id,
GIMP_PDB_END);
gimp_destroy_params(l_params, l_retvals);
break;
default:
printf( "DEBUG: unknown image type\n");
return -1;

View File

@ -69,7 +69,7 @@ typedef struct t_anim_info {
char *extension;
char *new_filename;
char *old_filename;
GRunModeType run_mode;
GimpRunModeType run_mode;
long width;
long height;
long type;
@ -85,7 +85,7 @@ int p_file_copy(char *fname, char *fname_copy);
void p_free_ainfo(t_anim_info **ainfo);
char* p_alloc_basename(char *imagename, long *number);
char* p_alloc_extension(char *imagename);
t_anim_info* p_alloc_ainfo(gint32 image_id, GRunModeType run_mode);
t_anim_info* p_alloc_ainfo(gint32 image_id, GimpRunModeType run_mode);
int p_dir_ainfo(t_anim_info *ainfo_ptr);
int p_chk_framerange(t_anim_info *ainfo_ptr);
int p_chk_framechange(t_anim_info *ainfo_ptr);
@ -93,7 +93,7 @@ int p_chk_framechange(t_anim_info *ainfo_ptr);
int p_save_named_frame (gint32 image_id, char *sav_name);
int p_load_named_frame (gint32 image_id, char *lod_name);
gint32 p_load_image (char *lod_name);
gint32 p_save_named_image(gint32 image_id, char *sav_name, GRunModeType run_mode);
gint32 p_save_named_image(gint32 image_id, char *sav_name, GimpRunModeType run_mode);
char* p_alloc_fname(char *basename, long nr, char *extension);
char* p_gzip (char *orig_name, char *new_name, char *zip);
char* p_strdup_add_underscore(char *name);
@ -106,23 +106,23 @@ int p_image_file_copy(char *fname, char *fname_copy);
/* animation menu fuctions provided by gap_lib.c */
int gap_next(GRunModeType run_mode, gint32 image_id);
int gap_prev(GRunModeType run_mode, gint32 image_id);
int gap_first(GRunModeType run_mode, gint32 image_id);
int gap_last(GRunModeType run_mode, gint32 image_id);
int gap_goto(GRunModeType run_mode, gint32 image_id, int nr);
int gap_next(GimpRunModeType run_mode, gint32 image_id);
int gap_prev(GimpRunModeType run_mode, gint32 image_id);
int gap_first(GimpRunModeType run_mode, gint32 image_id);
int gap_last(GimpRunModeType run_mode, gint32 image_id);
int gap_goto(GimpRunModeType run_mode, gint32 image_id, int nr);
int gap_dup(GRunModeType run_mode, gint32 image_id, int nr, long range_from, long range_to);
int gap_del(GRunModeType run_mode, gint32 image_id, int nr);
int gap_exchg(GRunModeType run_mode, gint32 image_id, int nr);
int gap_shift(GRunModeType run_mode, gint32 image_id, int nr, long range_from, long range_to);
int gap_dup(GimpRunModeType run_mode, gint32 image_id, int nr, long range_from, long range_to);
int gap_del(GimpRunModeType run_mode, gint32 image_id, int nr);
int gap_exchg(GimpRunModeType run_mode, gint32 image_id, int nr);
int gap_shift(GimpRunModeType run_mode, gint32 image_id, int nr, long range_from, long range_to);
void p_msg_win(GRunModeType run_mode, char *msg);
void p_msg_win(GimpRunModeType run_mode, char *msg);
gchar *p_get_video_paste_name(void);
gint32 p_vid_edit_clear(void);
gint32 p_vid_edit_framecount(void);
gint gap_vid_edit_copy(GRunModeType run_mode, gint32 image_id, long range_from, long range_to);
gint gap_vid_edit_paste(GRunModeType run_mode, gint32 image_id, long paste_mode);
gint gap_vid_edit_copy(GimpRunModeType run_mode, gint32 image_id, long range_from, long range_to);
gint gap_vid_edit_paste(GimpRunModeType run_mode, gint32 image_id, long paste_mode);
#define VID_PASTE_REPLACE 0
#define VID_PASTE_INSERT_BEFORE 1

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@
/* revision history:
* gimp 1.1.6; 1999/06/21 hof: bugix: wrong iterator total_steps and direction
* gimp 1.1.15.1; 1999/05/08 hof: bugix (dont mix GDrawableType with GImageType)
* gimp 1.1.15.1; 1999/05/08 hof: bugix (dont mix GimpImageType with GimpImageBaseType)
* version 0.98.00 1998.11.27 hof: - use new module gap_pdb_calls.h
* version 0.97.00 1998.10.19 hof: - created module
*/
@ -385,7 +385,7 @@ p_alloc_layli(gint32 image_id, gint32 *l_sel_cnt, gint *nlayers,
void p_prevent_empty_image(gint32 image_id)
{
GImageType l_type;
GimpImageBaseType l_type;
guint l_width, l_height;
gint32 l_layer_id;
gint l_nlayers;
@ -407,7 +407,7 @@ void p_prevent_empty_image(gint32 image_id)
l_height = gimp_image_height(image_id);
l_type = gimp_image_base_type(image_id);
l_type = (l_type * 2); /* convert from GImageType to GDrawableType */
l_type = (l_type * 2); /* convert from GimpImageBaseType to GimpImageType */
/* add a transparent dummy layer */
l_layer_id = gimp_layer_new(image_id, "dummy",
@ -593,7 +593,7 @@ p_apply_action(gint32 image_id,
l_rc = p_call_plugin(filter_procname,
image_id,
l_layer_id,
RUN_WITH_LAST_VALS);
GIMP_RUN_WITH_LAST_VALS);
if(gap_debug) fprintf(stderr, "gap: p_apply_action FILTER:%s rc =%d\n",
filter_procname, (int)l_rc);
break;
@ -649,7 +649,7 @@ p_do_filter_dialogs(t_anim_info *ainfo_ptr,
static char l_key_from[512];
static gint l_gtk_init = TRUE; /* gkt_init at 1.st call */
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_gtk_init = FALSE; /* gtk_init was done in 1.st modify dialog before */
}
@ -704,7 +704,7 @@ p_do_filter_dialogs(t_anim_info *ainfo_ptr,
/* open a view for the 1.st handled frame */
*dpy_id = gimp_display_new (image_id);
l_rc = p_call_plugin(filter_procname, image_id, l_layer_id, RUN_INTERACTIVE);
l_rc = p_call_plugin(filter_procname, image_id, l_layer_id, GIMP_RUN_INTERACTIVE);
/* OOPS: cant delete the display here, because
* closing the last display seems to free up
@ -799,7 +799,7 @@ p_do_2nd_filter_dialogs(char *filter_procname,
l_idx = p_get_1st_selected(l_layli_ptr, l_nlayers);
if(l_idx < 0)
{
p_msg_win (RUN_INTERACTIVE, _("GAP Modify: No layer selected in last handled frame"));
p_msg_win (GIMP_RUN_INTERACTIVE, _("GAP Modify: No layer selected in last handled frame"));
goto cleanup;
}
l_layer_id = l_layli_ptr[l_idx].layer_id;
@ -809,7 +809,7 @@ p_do_2nd_filter_dialogs(char *filter_procname,
/* 2.nd INTERACTIV Filtercall dialog */
/* --------------------------------- */
l_rc = p_call_plugin(filter_procname, l_last_image_id, l_layer_id, RUN_INTERACTIVE);
l_rc = p_call_plugin(filter_procname, l_last_image_id, l_layer_id, GIMP_RUN_INTERACTIVE);
/* get values, then store with suffix "_ITER_TO" */
l_plugin_data_len = p_get_data(filter_procname);
@ -866,7 +866,7 @@ p_frames_modify(t_anim_info *ainfo_ptr,
gint32 l_sel_cnt;
t_LayliElem *l_layli_ptr;
GParam *l_params;
GimpParam *l_params;
gint l_retvals;
gint l_plugin_data_len;
char l_filter_procname[256];
@ -883,7 +883,7 @@ p_frames_modify(t_anim_info *ainfo_ptr,
(int)action_mode, (int)sel_mode, (int)sel_case, (int)sel_invert, sel_pattern);
l_percentage = 0.0;
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
gimp_progress_init( _("Modifying Frames/Layer(s)..."));
}
@ -966,7 +966,7 @@ p_frames_modify(t_anim_info *ainfo_ptr,
if(l_sel_cnt < 1)
{
p_msg_win(RUN_INTERACTIVE, _("No selected Layer in start frame"));
p_msg_win(GIMP_RUN_INTERACTIVE, _("No selected Layer in start frame"));
goto error;
}
@ -1076,11 +1076,11 @@ p_frames_modify(t_anim_info *ainfo_ptr,
l_plugin_iterator, (int)l_cur_frame_nr);
l_params = gimp_run_procedure (l_plugin_iterator,
&l_retvals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_INT32, l_total_steps, /* total steps */
PARAM_FLOAT, (gdouble)l_cur_step, /* current step */
PARAM_INT32, l_plugin_data_len, /* length of stored data struct */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_INT32, l_total_steps, /* total steps */
GIMP_PDB_FLOAT, (gdouble)l_cur_step, /* current step */
GIMP_PDB_INT32, l_plugin_data_len, /* length of stored data struct */
GIMP_PDB_END);
if (l_params[0].data.d_status == FALSE)
{
fprintf(stderr, "ERROR: iterator %s failed\n", l_plugin_iterator);
@ -1106,7 +1106,7 @@ p_frames_modify(t_anim_info *ainfo_ptr,
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -1144,7 +1144,7 @@ error:
* ============================================================================
*/
gint gap_mod_layer(GRunModeType run_mode, gint32 image_id,
gint gap_mod_layer(GimpRunModeType run_mode, gint32 image_id,
gint32 range_from, gint32 range_to,
gint32 action_mode, gint32 sel_mode,
gint32 sel_case, gint32 sel_invert,
@ -1171,7 +1171,7 @@ gint gap_mod_layer(GRunModeType run_mode, gint32 image_id,
if (0 == p_dir_ainfo(ainfo_ptr))
{
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_rc = p_layer_modify_dialog (ainfo_ptr, &l_from, &l_to,
&l_action_mode,

View File

@ -67,7 +67,7 @@ t_LayliElem *p_alloc_layli(gint32 image_id, gint32 *l_sel_cnt, gint *nlayers,
int p_get_1st_selected (t_LayliElem * layli_ptr, gint nlayers);
void p_prevent_empty_image(gint32 image_id);
gint gap_mod_layer(GRunModeType run_mode, gint32 image_id,
gint gap_mod_layer(GimpRunModeType run_mode, gint32 image_id,
gint32 range_from, gint32 range_to,
gint32 action_mode, gint32 sel_mode,
gint32 sel_case, gint32 sel_invert,

View File

@ -114,11 +114,11 @@ typedef struct {
typedef struct
{
GDrawable *drawable;
GimpDrawable *drawable;
gint dwidth, dheight;
gint bpp;
GtkWidget *preview;
GPixelRgn src_rgn;
GimpPixelRgn src_rgn;
gint PixelRgnIsInitialized;
gint show_path;
gint startup;
@ -206,12 +206,12 @@ static void p_clear_point ();
static void p_load_points (char *filename);
static void p_save_points (char *filename);
static GDrawable * p_get_flattened_drawable (gint32 image_id);
static GDrawable * p_get_prevw_drawable (t_mov_path_preview *path_ptr);
static GimpDrawable * p_get_flattened_drawable (gint32 image_id);
static GimpDrawable * p_get_prevw_drawable (t_mov_path_preview *path_ptr);
static gint mov_dialog ( GDrawable *drawable, t_mov_path_preview *path_ptr,
static gint mov_dialog ( GimpDrawable *drawable, t_mov_path_preview *path_ptr,
gint min, gint max);
static GtkWidget * mov_path_prevw_create ( GDrawable *drawable,
static GtkWidget * mov_path_prevw_create ( GimpDrawable *drawable,
t_mov_path_preview *path_ptr);
static GtkWidget * mov_src_sel_create ();
@ -261,20 +261,20 @@ static void mov_show_path_callback (GtkWidget *, gpointer);
/* the option menu items -- the paint modes */
static MenuItem option_paint_items[] =
{
{ N_("Normal"), 0, 0, mov_paintmode_menu_callback, (gpointer) NORMAL_MODE, NULL, NULL },
{ N_("Dissolve"), 0, 0, mov_paintmode_menu_callback, (gpointer) DISSOLVE_MODE, NULL, NULL },
{ N_("Multiply"), 0, 0, mov_paintmode_menu_callback, (gpointer) MULTIPLY_MODE, NULL, NULL },
{ N_("Screen"), 0, 0, mov_paintmode_menu_callback, (gpointer) SCREEN_MODE, NULL, NULL },
{ N_("Overlay"), 0, 0, mov_paintmode_menu_callback, (gpointer) OVERLAY_MODE, NULL, NULL },
{ N_("Difference"), 0, 0, mov_paintmode_menu_callback, (gpointer) DIFFERENCE_MODE, NULL, NULL },
{ N_("Addition"), 0, 0, mov_paintmode_menu_callback, (gpointer) ADDITION_MODE, NULL, NULL },
{ N_("Subtract"), 0, 0, mov_paintmode_menu_callback, (gpointer) SUBTRACT_MODE, NULL, NULL },
{ N_("Darken Only"), 0, 0, mov_paintmode_menu_callback, (gpointer) DARKEN_ONLY_MODE, NULL, NULL },
{ N_("Lighten Only"), 0, 0, mov_paintmode_menu_callback, (gpointer) LIGHTEN_ONLY_MODE, NULL, NULL },
{ N_("Hue"), 0, 0, mov_paintmode_menu_callback, (gpointer) HUE_MODE, NULL, NULL },
{ N_("Saturation"), 0, 0, mov_paintmode_menu_callback, (gpointer) SATURATION_MODE, NULL, NULL },
{ N_("Color"), 0, 0, mov_paintmode_menu_callback, (gpointer) COLOR_MODE, NULL, NULL },
{ N_("Value"), 0, 0, mov_paintmode_menu_callback, (gpointer) VALUE_MODE, NULL, NULL },
{ N_("Normal"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_NORMAL_MODE, NULL, NULL },
{ N_("Dissolve"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_DISSOLVE_MODE, NULL, NULL },
{ N_("Multiply"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_MULTIPLY_MODE, NULL, NULL },
{ N_("Screen"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_SCREEN_MODE, NULL, NULL },
{ N_("Overlay"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_OVERLAY_MODE, NULL, NULL },
{ N_("Difference"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_DIFFERENCE_MODE, NULL, NULL },
{ N_("Addition"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_ADDITION_MODE, NULL, NULL },
{ N_("Subtract"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_SUBTRACT_MODE, NULL, NULL },
{ N_("Darken Only"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_DARKEN_ONLY_MODE, NULL, NULL },
{ N_("Lighten Only"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_LIGHTEN_ONLY_MODE, NULL, NULL },
{ N_("Hue"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_HUE_MODE, NULL, NULL },
{ N_("Saturation"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_SATURATION_MODE, NULL, NULL },
{ N_("Color"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_COLOR_MODE, NULL, NULL },
{ N_("Value"), 0, 0, mov_paintmode_menu_callback, (gpointer) GIMP_VALUE_MODE, NULL, NULL },
{ NULL, 0, 0, NULL, NULL, NULL, NULL }
};
@ -324,7 +324,7 @@ OpsButtonModifier global_key_modifier = OPS_BUTTON_MODIFIER_NONE;
long p_move_dialog (t_mov_data *mov_ptr)
{
GDrawable *l_drawable_ptr;
GimpDrawable *l_drawable_ptr;
gint l_first, l_last;
char *l_str;
t_mov_path_preview *path_ptr;
@ -358,7 +358,7 @@ long p_move_dialog (t_mov_data *mov_ptr)
pvals->tmp_image_id = -1;
pvals->src_image_id = -1;
pvals->src_layer_id = -1;
pvals->src_paintmode = NORMAL_MODE;
pvals->src_paintmode = GIMP_NORMAL_MODE;
pvals->src_handle = GAP_HANDLE_LEFT_TOP;
pvals->src_stepmode = GAP_STEP_LOOP;
pvals->src_force_visible = 0;
@ -421,7 +421,7 @@ long p_move_dialog (t_mov_data *mov_ptr)
*/
static gint
mov_dialog ( GDrawable *drawable, t_mov_path_preview *path_ptr,
mov_dialog ( GimpDrawable *drawable, t_mov_path_preview *path_ptr,
gint first_nr, gint last_nr )
{
GtkWidget *vbox;
@ -688,7 +688,7 @@ mov_ok_callback (GtkWidget *widget,
if(pvals->src_layer_id < 0)
{
p_msg_win(RUN_INTERACTIVE,
p_msg_win(GIMP_RUN_INTERACTIVE,
_("No Source Image was selected\n"
"(Please open a 2nd Image of the same type before opening Move Path)"));
return;
@ -781,7 +781,7 @@ mov_apv_callback (GtkWidget *widget,
t_video_info *vin_ptr;
static gint apv_locked = FALSE;
gint32 l_new_image_id;
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
static t_arr_arg argv[ARGC_APV];
@ -900,17 +900,17 @@ mov_apv_callback (GtkWidget *widget,
l_new_image_id = p_mov_anim_preview(pvals, path_ptr->ainfo_ptr, path_ptr->preview_frame_nr);
if(l_new_image_id < 0)
{
p_msg_win(RUN_INTERACTIVE,
p_msg_win(GIMP_RUN_INTERACTIVE,
_("Generate Animated Preview failed\n"));
}
else
{
return_vals = gimp_run_procedure ("plug_in_animationplay",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, l_new_image_id,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, l_new_image_id,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_END);
}
}
@ -2044,7 +2044,7 @@ mov_src_sel_create()
*/
static GtkWidget *
mov_path_prevw_create ( GDrawable *drawable, t_mov_path_preview *path_ptr)
mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
{
GtkWidget *frame;
GtkWidget *vbox;
@ -2503,7 +2503,7 @@ mov_path_prevw_destroy ( GtkWidget *widget,
g_free( path_ptr );
}
static void render_preview ( GtkWidget *preview, GPixelRgn *srcrgn );
static void render_preview ( GtkWidget *preview, GimpPixelRgn *srcrgn );
/* ============================================================================
* mov_path_prevw_preview_init
@ -2536,7 +2536,7 @@ mov_path_prevw_preview_init ( t_mov_path_preview *path_ptr )
#endif
static void
render_preview ( GtkWidget *preview, GPixelRgn *srcrgn )
render_preview ( GtkWidget *preview, GimpPixelRgn *srcrgn )
{
guchar *src_row, *dest_row, *src, *dest;
gint row, col;
@ -3050,11 +3050,11 @@ p_chk_keyframes(t_mov_path_preview *path_ptr)
* (only) remaining drawable.
* ============================================================================
*/
GDrawable *
GimpDrawable *
p_get_flattened_drawable(gint32 image_id)
{
GDrawable *l_drawable_ptr ;
GImageType l_type;
GimpDrawable *l_drawable_ptr ;
GimpImageBaseType l_type;
guint l_width, l_height;
gint32 l_layer_id;
@ -3063,7 +3063,7 @@ p_get_flattened_drawable(gint32 image_id)
l_height = gimp_image_height(image_id);
l_type = gimp_image_base_type(image_id);
l_type = (l_type * 2); /* convert from GImageType to GDrawableType */
l_type = (l_type * 2); /* convert from GimpImageBaseType to GimpImageType */
/* add 2 full transparent dummy layers at top
* (because gimp_image_merge_visible_layers complains
@ -3095,7 +3095,7 @@ p_get_flattened_drawable(gint32 image_id)
* ============================================================================
*/
GDrawable *
GimpDrawable *
p_get_prevw_drawable (t_mov_path_preview *path_ptr)
{
t_mov_current l_curr;
@ -3287,8 +3287,8 @@ p_mov_render(gint32 image_id, t_mov_values *val_ptr, t_mov_current *cur_ptr)
}
l_resized_flag = 0;
l_orig_width = gimp_layer_width(l_cp_layer_id);
l_orig_height = gimp_layer_height(l_cp_layer_id);
l_orig_width = gimp_drawable_width(l_cp_layer_id);
l_orig_height = gimp_drawable_height(l_cp_layer_id);
l_new_width = l_orig_width;
l_new_height = l_orig_height;
@ -3313,8 +3313,8 @@ p_mov_render(gint32 image_id, t_mov_values *val_ptr, t_mov_current *cur_ptr)
p_gimp_rotate(l_cp_layer_id, l_interpolation, cur_ptr->currRotation);
l_new_width = gimp_layer_width(l_cp_layer_id);
l_new_height = gimp_layer_height(l_cp_layer_id);
l_new_width = gimp_drawable_width(l_cp_layer_id);
l_new_height = gimp_drawable_height(l_cp_layer_id);
}
if(l_resized_flag == 1)

View File

@ -117,7 +117,7 @@ typedef struct {
gint dst_range_start; /* use current frame as default */
gint dst_range_end;
gint dst_layerstack;
gint dst_combination_mode; /* GLayerMode */
gint dst_combination_mode; /* GimpLayerModeEffects */
/* for dialog only */
gint32 dst_image_id; /* frame image */

View File

@ -129,7 +129,7 @@ p_mov_call_render(t_mov_data *mov_ptr, t_mov_current *cur_ptr, gint apv_layersta
if((mov_ptr->val_ptr->apv_scalex != 100.0) || (mov_ptr->val_ptr->apv_scaley != 100.0))
{
GParam *l_params;
GimpParam *l_params;
gint l_retvals;
gint32 l_size_x, l_size_y;
@ -138,10 +138,10 @@ p_mov_call_render(t_mov_data *mov_ptr, t_mov_current *cur_ptr, gint apv_layersta
l_params = gimp_run_procedure ("gimp_image_scale",
&l_retvals,
PARAM_IMAGE, l_tmp_image_id,
PARAM_INT32, l_size_x,
PARAM_INT32, l_size_y,
PARAM_END);
GIMP_PDB_IMAGE, l_tmp_image_id,
GIMP_PDB_INT32, l_size_x,
GIMP_PDB_INT32, l_size_y,
GIMP_PDB_END);
}
}
@ -343,7 +343,7 @@ p_mov_execute(t_mov_data *mov_ptr)
l_apv_layerstack = 0;
l_percentage = 0.0;
if(mov_ptr->dst_ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(mov_ptr->dst_ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
if(mov_ptr->val_ptr->apv_mlayer_image < 0)
{
@ -568,7 +568,7 @@ p_mov_execute(t_mov_data *mov_ptr)
l_rc = p_mov_call_render(mov_ptr, cur_ptr, l_apv_layerstack);
/* show progress */
if(mov_ptr->dst_ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(mov_ptr->dst_ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage = (gdouble)l_fridx / (gdouble)(l_cnt -1);
gimp_progress_update (l_percentage);
@ -599,9 +599,9 @@ p_mov_anim_preview(t_mov_values *pvals_orig, t_anim_info *ainfo_ptr, gint previe
gint32 l_tmp_image_id;
gint32 l_tmp_frame_id;
gint32 l_mlayer_image_id;
GParam *l_params;
GimpParam *l_params;
gint l_retvals;
GImageType l_type;
GimpImageBaseType l_type;
guint l_width, l_height;
gint32 l_stackpos;
gint l_nlayers;
@ -638,10 +638,10 @@ p_mov_anim_preview(t_mov_values *pvals_orig, t_anim_info *ainfo_ptr, gint previe
l_size_y = MAX(1, (gimp_image_height(l_tmp_image_id) * l_pvals->apv_scaley) / 100);
l_params = gimp_run_procedure ("gimp_image_scale",
&l_retvals,
PARAM_IMAGE, l_tmp_image_id,
PARAM_INT32, l_size_x,
PARAM_INT32, l_size_y,
PARAM_END);
GIMP_PDB_IMAGE, l_tmp_image_id,
GIMP_PDB_INT32, l_size_x,
GIMP_PDB_INT32, l_size_y,
GIMP_PDB_END);
/* findout the src_layer id in the scaled copy by stackpos index */
l_pvals->src_layer_id = -1;
@ -732,10 +732,10 @@ p_mov_anim_preview(t_mov_values *pvals_orig, t_anim_info *ainfo_ptr, gint previe
l_size_y = (gimp_image_height(l_tmp_frame_id) * l_pvals->apv_scaley) / 100;
l_params = gimp_run_procedure ("gimp_image_scale",
&l_retvals,
PARAM_IMAGE, l_tmp_frame_id,
PARAM_INT32, l_size_x,
PARAM_INT32, l_size_y,
PARAM_END);
GIMP_PDB_IMAGE, l_tmp_frame_id,
GIMP_PDB_INT32, l_size_x,
GIMP_PDB_INT32, l_size_y,
GIMP_PDB_END);
}
g_free(l_filename);
break;
@ -783,7 +783,7 @@ p_mov_anim_preview(t_mov_values *pvals_orig, t_anim_info *ainfo_ptr, gint previe
* gap_move
* ============================================================================
*/
int gap_move(GRunModeType run_mode, gint32 image_id)
int gap_move(GimpRunModeType run_mode, gint32 image_id)
{
int l_rc;
t_anim_info *ainfo_ptr;
@ -801,7 +801,7 @@ int gap_move(GRunModeType run_mode, gint32 image_id)
if(0 != p_chk_framerange(ainfo_ptr)) return -1;
l_mov_data.dst_ainfo_ptr = ainfo_ptr;
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_rc = p_move_dialog (&l_mov_data);
if(0 != p_chk_framechange(ainfo_ptr))

View File

@ -38,7 +38,7 @@
#include "libgimp/gimp.h"
#include "gap_mov_dialog.h"
int gap_move(GRunModeType run_mode, gint32 image_id);
int gap_move(GimpRunModeType run_mode, gint32 image_id);
gint32 p_mov_anim_preview(t_mov_values *pvals_orig, t_anim_info *ainfo_ptr, gint preview_frame_nr);
#endif

View File

@ -935,7 +935,7 @@ int p_mpege_gen_parfile(t_anim_info *ainfo_ptr, t_mpg_par *mp_ptr, t_gap_mpeg_en
* ============================================================================
*/
int gap_mpeg_encode(GRunModeType run_mode,
int gap_mpeg_encode(GimpRunModeType run_mode,
gint32 image_id,
t_gap_mpeg_encoder encoder
)
@ -1000,7 +1000,7 @@ int gap_mpeg_encode(GRunModeType run_mode,
if(l_rc == 0)
{
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_genmode = p_mpege_dialog(ainfo_ptr, &mp_par, encoder);
if(l_genmode < 0) l_rc = -1;

View File

@ -40,7 +40,7 @@ typedef enum
} t_gap_mpeg_encoder;
int gap_mpeg_encode(GRunModeType run_mode,
int gap_mpeg_encode(GimpRunModeType run_mode,
gint32 image_id,
t_gap_mpeg_encoder encoder
/* ,

View File

@ -420,10 +420,10 @@ int gap_debug = 0;
static void query(void);
static void run(char *name, int nparam, GParam *param,
int *nretvals, GParam **retvals);
static void run(char *name, int nparam, GimpParam *param,
int *nretvals, GimpParam **retvals);
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -441,15 +441,15 @@ MAIN ()
static void
query ()
{
static GParamDef args_navigator[] =
static GimpParamDef args_navigator[] =
{
{PARAM_INT32, "run_mode", "Interactive"},
{PARAM_IMAGE, "image", "(unused)"},
{PARAM_DRAWABLE, "drawable", "(unused)"},
{GIMP_PDB_INT32, "run_mode", "Interactive"},
{GIMP_PDB_IMAGE, "image", "(unused)"},
{GIMP_PDB_DRAWABLE, "drawable", "(unused)"},
};
static int nargs_navigator = sizeof(args_navigator) / sizeof(args_navigator[0]);
static GParamDef *return_vals = NULL;
static GimpParamDef *return_vals = NULL;
static int nreturn_vals = 0;
@ -461,7 +461,7 @@ query ()
gap_navigator_version,
N_("<Image>/Video/VCR Navigator..."),
"RGB*, INDEXED*, GRAY*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs_navigator, nreturn_vals,
args_navigator, return_vals);
} /* end query */
@ -471,16 +471,16 @@ query ()
static void
run (char *name,
int n_params,
GParam *param,
GimpParam *param,
int *nreturn_vals,
GParam **return_vals)
GimpParam **return_vals)
{
gint32 l_active_image;
char *l_env;
static GParam values[2];
GRunModeType run_mode;
GStatusType status = STATUS_SUCCESS;
static GimpParam values[2];
GimpRunModeType run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 nr;
pid_t l_navid_pid;
@ -505,7 +505,7 @@ run (char *name,
l_active_image = param[1].data.d_image;
if (run_mode == RUN_NONINTERACTIVE) {
if (run_mode == GIMP_RUN_NONINTERACTIVE) {
INIT_I18N();
} else {
INIT_I18N_UI();
@ -522,7 +522,7 @@ run (char *name,
*/
if (0 == kill(l_navid_pid, 0))
{
p_msg_win(RUN_INTERACTIVE, _("Cant open two or more Video Navigator Windows."));
p_msg_win(GIMP_RUN_INTERACTIVE, _("Cant open two or more Video Navigator Windows."));
l_rc = -1;
}
}
@ -535,12 +535,12 @@ run (char *name,
gimp_set_data(PLUGIN_NAME, &l_navid_pid, sizeof(pid_t));
if (strcmp (name, PLUGIN_NAME) == 0)
{
if (run_mode != RUN_INTERACTIVE)
if (run_mode != GIMP_RUN_INTERACTIVE)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
l_rc = gap_navigator(l_active_image);
}
@ -554,10 +554,10 @@ run (char *name,
if(l_rc < 0)
{
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
values[0].type = PARAM_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
}
@ -584,7 +584,7 @@ edit_cut_callback (GtkWidget *w, gpointer client_data)
static void
p_edit_paste_call(gint32 paste_mode)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
if(naviD->paste_at_frame >= 0)
@ -592,23 +592,23 @@ p_edit_paste_call(gint32 paste_mode)
/* goto the first selected frame */
return_vals = gimp_run_procedure ("plug_in_gap_goto",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, naviD->paste_at_frame,
PARAM_END);
if (return_vals[0].data.d_status != STATUS_SUCCESS)
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, naviD->paste_at_frame,
GIMP_PDB_END);
if (return_vals[0].data.d_status != GIMP_PDB_SUCCESS)
{
return;
}
}
return_vals = gimp_run_procedure ("plug_in_gap_video_edit_paste",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, paste_mode,
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, paste_mode,
GIMP_PDB_END);
navi_update_after_goto();
}
@ -631,16 +631,16 @@ edit_paster_callback (GtkWidget *w, gpointer client_data)
static void
edit_clrpaste_callback (GtkWidget *w, gpointer client_data)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
if(gap_debug) printf("edit_clrpaste_callback\n");
return_vals = gimp_run_procedure ("plug_in_gap_video_edit_clear",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_END);
}
@ -650,7 +650,7 @@ navi_vid_copy_and_cut(gint cut_flag)
SelectedRange *range_list;
SelectedRange *range_list2;
SelectedRange *range_item;
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
if(gap_debug) printf("navi_dialog_vid_copy_callback\n");
@ -688,12 +688,12 @@ navi_vid_copy_and_cut(gint cut_flag)
return_vals = gimp_run_procedure ("plug_in_gap_video_edit_copy",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, range_list2->from,
PARAM_INT32, range_list2->to,
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, range_list2->from,
GIMP_PDB_INT32, range_list2->to,
GIMP_PDB_END);
range_item = range_list2;
range_list2 = range_list2->prev;
}
@ -707,20 +707,20 @@ navi_vid_copy_and_cut(gint cut_flag)
return_vals = gimp_run_procedure ("plug_in_gap_goto",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, range_list->from,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, range_list->from,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
return_vals = gimp_run_procedure ("plug_in_gap_del",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, 1 + (range_list->to - range_list->from), /* number of frames to delete */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, 1 + (range_list->to - range_list->from), /* number of frames to delete */
GIMP_PDB_END);
}
}
@ -829,7 +829,7 @@ t_anim_info *
navi_get_ainfo(gint32 image_id, t_anim_info *old_ainfo_ptr)
{
t_anim_info *ainfo_ptr;
ainfo_ptr = p_alloc_ainfo(image_id, RUN_NONINTERACTIVE);
ainfo_ptr = p_alloc_ainfo(image_id, GIMP_RUN_NONINTERACTIVE);
if(ainfo_ptr)
{
if(old_ainfo_ptr)
@ -1122,7 +1122,7 @@ navi_check_image_menu_changes()
}
item_list = NULL;
item_count = 0;
images = gimp_query_images (&nimages);
images = gimp_image_list (&nimages);
for (i = 0; i < nimages; i++)
{
frame_nr = p_get_frame_nr(images[i]); /* check for anim frame */
@ -1383,7 +1383,7 @@ static void navi_playback(gint32 optimize)
gint32 l_to;
gint32 l_new_image_id;
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
char l_frame_name[50];
int l_frame_delay;
@ -1422,22 +1422,22 @@ static void navi_playback(gint32 optimize)
return_vals = gimp_run_procedure ("plug_in_gap_range_to_multilayer",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, l_from,
PARAM_INT32, l_to,
PARAM_INT32, 3, /* flatten image */
PARAM_INT32, 1, /* BG_VISIBLE */
PARAM_INT32, (gint32)naviD->vin_ptr->framerate,
PARAM_STRING, l_frame_name,
PARAM_INT32, 6, /* use all visible layers */
PARAM_INT32, 0, /* ignore case */
PARAM_INT32, 0, /* normal selection (no invert) */
PARAM_STRING, "0", /* select string (ignored) */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, l_from,
GIMP_PDB_INT32, l_to,
GIMP_PDB_INT32, 3, /* flatten image */
GIMP_PDB_INT32, 1, /* BG_VISIBLE */
GIMP_PDB_INT32, (gint32)naviD->vin_ptr->framerate,
GIMP_PDB_STRING, l_frame_name,
GIMP_PDB_INT32, 6, /* use all visible layers */
GIMP_PDB_INT32, 0, /* ignore case */
GIMP_PDB_INT32, 0, /* normal selection (no invert) */
GIMP_PDB_STRING, "0", /* select string (ignored) */
GIMP_PDB_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
l_new_image_id = return_vals[1].data.d_image;
@ -1445,11 +1445,11 @@ static void navi_playback(gint32 optimize)
{
return_vals = gimp_run_procedure ("plug_in_animationoptimize",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, l_new_image_id,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, l_new_image_id,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
#ifdef COMMENT_BLOCK
/* sorry, plug_in_animationoptimize does create
@ -1471,10 +1471,10 @@ static void navi_playback(gint32 optimize)
*/
return_vals = gimp_run_procedure ("plug_in_animationplay",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, l_new_image_id,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, l_new_image_id,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_END);
}
}
@ -1495,7 +1495,7 @@ void navi_dialog_frames_duplicate_frame_callback(GtkWidget *w, gpointer data)
{
SelectedRange *range_list;
SelectedRange *range_item;
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
@ -1517,22 +1517,22 @@ void navi_dialog_frames_duplicate_frame_callback(GtkWidget *w, gpointer data)
return_vals = gimp_run_procedure ("plug_in_gap_goto",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, range_list->from,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, range_list->from,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
return_vals = gimp_run_procedure ("plug_in_gap_dup",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, 1, /* copy block 1 times */
PARAM_INT32, range_list->from,
PARAM_INT32, range_list->to,
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, 1, /* copy block 1 times */
GIMP_PDB_INT32, range_list->from,
GIMP_PDB_INT32, range_list->to,
GIMP_PDB_END);
}
range_item = range_list;
range_list = range_list->next;
@ -1546,7 +1546,7 @@ void navi_dialog_frames_delete_frame_callback(GtkWidget *w, gpointer data)
{
SelectedRange *range_list;
SelectedRange *range_item;
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
@ -1568,20 +1568,20 @@ void navi_dialog_frames_delete_frame_callback(GtkWidget *w, gpointer data)
return_vals = gimp_run_procedure ("plug_in_gap_goto",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, range_list->from,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, range_list->from,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
return_vals = gimp_run_procedure ("plug_in_gap_del",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, 1 + (range_list->to - range_list->from), /* number of frames to delete */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, 1 + (range_list->to - range_list->from), /* number of frames to delete */
GIMP_PDB_END);
}
range_item = range_list;
range_list = range_list->next;
@ -1593,50 +1593,50 @@ void navi_dialog_frames_delete_frame_callback(GtkWidget *w, gpointer data)
void navi_dialog_goto_callback(gint32 dst_framenr)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
if(gap_debug) printf("navi_dialog_goto_callback\n");
navi_set_waiting_cursor();
return_vals = gimp_run_procedure ("plug_in_gap_goto",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_INT32, dst_framenr,
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_INT32, dst_framenr,
GIMP_PDB_END);
navi_update_after_goto();
}
void navi_dialog_vcr_goto_first_callback(GtkWidget *w, gpointer data)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
if(gap_debug) printf("navi_dialog_vcr_goto_first_callback\n");
navi_set_waiting_cursor();
return_vals = gimp_run_procedure ("plug_in_gap_first",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_END);
navi_update_after_goto();
}
void navi_dialog_vcr_goto_prev_callback(GtkWidget *w, gpointer data)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
if(gap_debug) printf("navi_dialog_vcr_goto_prev_callback\n");
navi_set_waiting_cursor();
return_vals = gimp_run_procedure ("plug_in_gap_prev",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_END);
navi_update_after_goto();
}
@ -1656,17 +1656,17 @@ void navi_dialog_vcr_goto_prevblock_callback(GtkWidget *w, gpointer data)
void navi_dialog_vcr_goto_next_callback(GtkWidget *w, gpointer data)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
if(gap_debug) printf("navi_dialog_vcr_goto_next_callback\n");
navi_set_waiting_cursor();
return_vals = gimp_run_procedure ("plug_in_gap_next",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_END);
navi_update_after_goto();
}
void navi_dialog_vcr_goto_nextblock_callback(GtkWidget *w, gpointer data)
@ -1685,17 +1685,17 @@ void navi_dialog_vcr_goto_nextblock_callback(GtkWidget *w, gpointer data)
void navi_dialog_vcr_goto_last_callback(GtkWidget *w, gpointer data)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
if(gap_debug) printf("navi_dialog_vcr_goto_last_callback\n");
navi_set_waiting_cursor();
return_vals = gimp_run_procedure ("plug_in_gap_last",
&nreturn_vals,
PARAM_INT32, RUN_NONINTERACTIVE,
PARAM_IMAGE, naviD->active_imageid,
PARAM_DRAWABLE, -1, /* dummy */
PARAM_END);
GIMP_PDB_INT32, GIMP_RUN_NONINTERACTIVE,
GIMP_PDB_IMAGE, naviD->active_imageid,
GIMP_PDB_DRAWABLE, -1, /* dummy */
GIMP_PDB_END);
navi_update_after_goto();
}

View File

@ -109,15 +109,15 @@ gint
p_get_gimp_selection_bounds (gint32 image_id, gint32 *x1, gint32 *y1, gint32 *x2, gint32 *y2)
{
static char *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;
@ -139,15 +139,15 @@ gint
p_gimp_selection_load (gint32 channel_id)
{
static char *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);
}
@ -166,16 +166,16 @@ int
p_layer_set_linked (gint32 layer_id, gint32 new_state)
{
static char *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);
}
@ -192,17 +192,17 @@ p_layer_set_linked (gint32 layer_id, gint32 new_state)
gint p_layer_get_linked(gint32 layer_id)
{
static char *l_get_linked_proc = "gimp_layer_get_linked";
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
gint32 is_linked;
is_linked = FALSE;
return_vals = gimp_run_procedure (l_get_linked_proc,
&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;
}
@ -220,15 +220,15 @@ gint p_layer_get_linked(gint32 layer_id)
gint32 p_gimp_image_floating_sel_attached_to(gint32 image_id)
{
static char *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);
}
@ -245,16 +245,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 char *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);
}
@ -271,16 +271,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 char *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);
}
@ -297,16 +297,16 @@ gint p_gimp_floating_sel_rigor(gint32 layer_id, gint32 undo)
gint p_gimp_floating_sel_relax(gint32 layer_id, gint32 undo)
{
static char *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);
}
@ -326,10 +326,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 char *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";
}
@ -340,11 +340,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 */
}
@ -367,16 +367,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 char *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 */
}
@ -395,16 +395,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 char *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 */
}
@ -422,16 +422,16 @@ gint32 p_gimp_image_get_guide_position(gint32 image_id, gint32 guide_id)
gint32 p_gimp_image_get_guide_orientation(gint32 image_id, gint32 guide_id)
{
static char *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 */
}
@ -449,16 +449,16 @@ gint32 p_gimp_image_get_guide_orientation(gint32 image_id, gint32 guide_id)
gint32 p_gimp_image_delete_guide(gint32 image_id, gint32 guide_id)
{
static char *l_delete_guide_proc = "gimp_image_delete_guide";
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
return_vals = gimp_run_procedure (l_delete_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 */
}
@ -476,15 +476,15 @@ gint32 p_gimp_image_delete_guide(gint32 image_id, gint32 guide_id)
gint p_gimp_selection_none(gint32 image_id)
{
static char *l_sel_none_proc = "gimp_selection_none";
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
return_vals = gimp_run_procedure (l_sel_none_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 (0);
}
@ -502,7 +502,7 @@ gint p_gimp_selection_none(gint32 image_id)
gint p_gimp_rotate(gint32 drawable_id, gint32 interpolation, gdouble angle_deg)
{
static char *l_rotate_proc = "gimp_rotate";
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
gdouble l_angle_rad;
@ -510,11 +510,11 @@ gint p_gimp_rotate(gint32 drawable_id, gint32 interpolation, gdouble angle_deg)
return_vals = gimp_run_procedure (l_rotate_proc,
&nreturn_vals,
PARAM_DRAWABLE, drawable_id,
PARAM_INT32, interpolation,
PARAM_FLOAT, l_angle_rad,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
GIMP_PDB_DRAWABLE, drawable_id,
GIMP_PDB_INT32, interpolation,
GIMP_PDB_FLOAT, l_angle_rad,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
return(0);
}
@ -529,17 +529,17 @@ gint p_gimp_rotate(gint32 drawable_id, gint32 interpolation, gdouble angle_deg)
*/
gint32 p_gimp_channel_ops_duplicate (gint32 image_ID)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
gint32 new_image_ID;
return_vals = gimp_run_procedure ("gimp_channel_ops_duplicate",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_END);
new_image_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
new_image_ID = return_vals[1].data.d_image;
}
@ -558,16 +558,16 @@ gint32 p_gimp_channel_ops_duplicate (gint32 image_ID)
gint p_gimp_drawable_set_image(gint32 drawable_id, gint32 image_id)
{
static char *l_drawable_set_img_proc = "gimp_drawable_set_image";
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
return_vals = gimp_run_procedure (l_drawable_set_img_proc,
&nreturn_vals,
PARAM_DRAWABLE, drawable_id,
PARAM_IMAGE, image_id,
PARAM_END);
GIMP_PDB_DRAWABLE, drawable_id,
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 (0);
}
@ -583,17 +583,17 @@ gint p_gimp_drawable_set_image(gint32 drawable_id, gint32 image_id)
char*
p_gimp_gimprc_query(char *key)
{
GParam *return_vals;
GimpParam *return_vals;
gint nreturn_vals;
char *value;
return_vals = gimp_run_procedure ("gimp_gimprc_query",
&nreturn_vals,
PARAM_STRING, key,
PARAM_END);
GIMP_PDB_STRING, key,
GIMP_PDB_END);
value = NULL;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
if(return_vals[1].data.d_string != NULL)
{
@ -616,16 +616,16 @@ gint
p_gimp_file_save_thumbnail(gint32 image_id, char* filename)
{
static char *l_called_proc = "gimp_file_save_thumbnail";
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, filename,
PARAM_END);
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_STRING, filename,
GIMP_PDB_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
return (0);
}
@ -644,16 +644,16 @@ p_gimp_file_load_thumbnail(char* filename, gint32 *th_width, gint32 *th_height,
gint32 *th_data_count, unsigned char **th_data)
{
static char *l_called_proc = "gimp_file_load_thumbnail";
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
*th_data = NULL;
return_vals = gimp_run_procedure (l_called_proc,
&nreturn_vals,
PARAM_STRING, filename,
PARAM_END);
GIMP_PDB_STRING, filename,
GIMP_PDB_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
*th_width = return_vals[1].data.d_int32;
*th_height = return_vals[2].data.d_int32;
@ -672,18 +672,18 @@ gint p_gimp_image_thumbnail(gint32 image_id, gint32 width, gint32 height,
gint32 *th_data_count, unsigned char **th_data)
{
static char *l_called_proc = "gimp_image_thumbnail";
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
*th_data = NULL;
return_vals = gimp_run_procedure (l_called_proc,
&nreturn_vals,
PARAM_IMAGE, image_id,
PARAM_INT32, width,
PARAM_INT32, height,
PARAM_END);
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_INT32, width,
GIMP_PDB_INT32, height,
GIMP_PDB_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
*th_width = return_vals[1].data.d_int32;
*th_height = return_vals[2].data.d_int32;
@ -708,19 +708,19 @@ p_gimp_path_set_points(gint32 image_id, char *name,
gint32 path_type, gint32 num_points, gdouble *path_points)
{
static char *l_called_proc = "gimp_path_set_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_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 */
}
@ -740,16 +740,16 @@ p_gimp_path_get_points(gint32 image_id, char *name,
gint32 *path_type, gint32 *path_closed, gint32 *num_points)
{
static char *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;
@ -771,16 +771,16 @@ gint
p_gimp_path_delete(gint32 image_id, char *name)
{
static char *l_called_proc = "gimp_path_delete";
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);
}
@ -799,15 +799,15 @@ char **
p_gimp_path_list(gint32 image_id, gint32 *num_paths)
{
static char *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 */
@ -827,15 +827,15 @@ char *
p_gimp_path_get_current(gint32 image_id)
{
static char *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 */
}
@ -853,16 +853,16 @@ gint
p_gimp_path_set_current(gint32 image_id, char *name)
{
static char *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 */
}
@ -879,16 +879,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 */
}
@ -905,17 +905,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 */
}
@ -932,15 +932,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 */

View File

@ -39,12 +39,12 @@
* 1.1.10a 1999/10/22 hof: bugfix: have to use the changed PDB-Interface
* for gimp_convert_indexed
* (with extended dither options and extra dialog window)
* 1.1.9a 1999/09/21 hof: bugfix RUN_NONINTERACTIVE did not work in
* 1.1.9a 1999/09/21 hof: bugfix GIMP_RUN_NONINTERACTIVE did not work in
* plug_in_gap_range_convert
* plug_in_gap_range_layer_del
* plug_in_gap_range_flatten
* 1.1.8 1999/08/31 hof: frames convert: save subsequent frames
* with rumode RUN_WITH_LAST_VALS
* with rumode GIMP_RUN_WITH_LAST_VALS
* 0.97.00; 1998/10/19 hof: gap_range_to_multilayer: extended layer selection
* 0.96.03; 1998/08/31 hof: gap_range_to_multilayer: all params available
* in non-interactive runmode
@ -419,7 +419,7 @@ p_convert_indexed_dialog(gint32 *dest_colors, gint32 *dest_dither,
static long
p_convert_dialog(t_anim_info *ainfo_ptr,
long *range_from, long *range_to, long *flatten,
GImageType *dest_type, gint32 *dest_colors, gint32 *dest_dither,
GimpImageBaseType *dest_type, gint32 *dest_colors, gint32 *dest_dither,
char *basename, gint len_base,
char *extension, gint len_ext,
gint32 *palette_type, gint32 *alpha_dither, gint32 *remove_unused,
@ -492,16 +492,16 @@ p_convert_dialog(t_anim_info *ainfo_ptr,
switch(argv[5].radio_ret)
{
case 1:
*dest_type = RGB;
*dest_type = GIMP_RGB;
break;
case 2:
*dest_type = GRAY;
*dest_type = GIMP_GRAY;
break;
case 3:
*dest_type = INDEXED;
*dest_type = GIMP_INDEXED;
break;
default:
*dest_type = 9444;
*dest_type = 9444; /* huh ?? */
break;
}
*flatten = (long)(argv[6].int_ret);
@ -512,7 +512,7 @@ p_convert_dialog(t_anim_info *ainfo_ptr,
*alpha_dither = 0;
*remove_unused = 0;
if(*dest_type == INDEXED)
if(*dest_type == GIMP_INDEXED)
{
/* Open a 2.nd dialog for the Dither Options */
if(0 != p_convert_indexed_dialog(dest_colors,
@ -719,7 +719,7 @@ p_frames_to_multilayer(t_anim_info *ainfo_ptr,
gint32 sel_mode, gint32 sel_case,
gint32 sel_invert, char *sel_pattern)
{
GImageType l_type;
GimpImageBaseType l_type;
guint l_width, l_height;
long l_cur_frame_nr;
long l_step, l_begin, l_end;
@ -742,7 +742,7 @@ p_frames_to_multilayer(t_anim_info *ainfo_ptr,
l_percentage = 0.0;
l_nlayers_result = 0;
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
gimp_progress_init( _("Creating Layer-Animated Image..."));
}
@ -897,7 +897,7 @@ p_frames_to_multilayer(t_anim_info *ainfo_ptr,
/* destroy the tmp image */
gimp_image_delete(l_tmp_image_id);
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -926,7 +926,7 @@ error:
* gap_range_to_multilayer
* ============================================================================
*/
gint32 gap_range_to_multilayer(GRunModeType run_mode, gint32 image_id,
gint32 gap_range_to_multilayer(GimpRunModeType run_mode, gint32 image_id,
long range_from, long range_to,
long flatten_mode, long bg_visible,
long framerate,
@ -952,7 +952,7 @@ gint32 gap_range_to_multilayer(GRunModeType run_mode, gint32 image_id,
{
if (0 == p_dir_ainfo(ainfo_ptr))
{
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_framerate = 24.0;
vin_ptr = p_get_video_info(ainfo_ptr->basename);
@ -1012,10 +1012,10 @@ gint32 gap_range_to_multilayer(GRunModeType run_mode, gint32 image_id,
* ============================================================================
*/
static int
p_type_convert(gint32 image_id, GImageType dest_type, gint32 dest_colors, gint32 dest_dither,
p_type_convert(gint32 image_id, GimpImageBaseType dest_type, gint32 dest_colors, gint32 dest_dither,
gint32 palette_type, gint32 alpha_dither, gint32 remove_unused, char *palette)
{
GParam *l_params;
GimpParam *l_params;
gint l_retvals;
int l_rc;
@ -1024,33 +1024,33 @@ p_type_convert(gint32 image_id, GImageType dest_type, gint32 dest_colors, gint32
switch(dest_type)
{
case INDEXED:
case GIMP_INDEXED:
if(gap_debug) fprintf(stderr, "DEBUG: p_type_convert to INDEXED ncolors=%d, palette_type=%d palette_name=%s'\n",
(int)dest_colors, (int)palette_type, palette);
l_params = gimp_run_procedure ("gimp_convert_indexed",
&l_retvals,
PARAM_IMAGE, image_id,
PARAM_INT32, dest_dither, /* value 1== floyd-steinberg */
PARAM_INT32, palette_type, /* value 0: MAKE_PALETTE, 2: WEB_PALETTE 4:CUSTOM_PALETTE */
PARAM_INT32, dest_colors,
PARAM_INT32, alpha_dither,
PARAM_INT32, remove_unused,
PARAM_STRING, palette, /* name of custom palette */
PARAM_END);
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_INT32, dest_dither, /* value 1== floyd-steinberg */
GIMP_PDB_INT32, palette_type, /* value 0: MAKE_PALETTE, 2: WEB_PALETTE 4:CUSTOM_PALETTE */
GIMP_PDB_INT32, dest_colors,
GIMP_PDB_INT32, alpha_dither,
GIMP_PDB_INT32, remove_unused,
GIMP_PDB_STRING, palette, /* name of custom palette */
GIMP_PDB_END);
break;
case GRAY:
case GIMP_GRAY:
if(gap_debug) fprintf(stderr, "DEBUG: p_type_convert to GRAY'\n");
l_params = gimp_run_procedure ("gimp_convert_grayscale",
&l_retvals,
PARAM_IMAGE, image_id,
PARAM_END);
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_END);
break;
case RGB:
case GIMP_RGB:
if(gap_debug) fprintf(stderr, "DEBUG: p_type_convert to RGB'\n");
l_params = gimp_run_procedure ("gimp_convert_rgb",
&l_retvals,
PARAM_IMAGE, image_id,
PARAM_END);
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_END);
break;
default:
if(gap_debug) fprintf(stderr, "DEBUG: p_type_convert AS_IT_IS (dont convert)'\n");
@ -1085,10 +1085,10 @@ p_frames_convert(t_anim_info *ainfo_ptr,
long range_from, long range_to,
char *save_proc_name, char *new_basename, char *new_extension,
int flatten,
GImageType dest_type, gint32 dest_colors, gint32 dest_dither,
GimpImageBaseType dest_type, gint32 dest_colors, gint32 dest_dither,
gint32 palette_type, gint32 alpha_dither, gint32 remove_unused, char *palette)
{
GRunModeType l_run_mode;
GimpRunModeType l_run_mode;
gint32 l_tmp_image_id;
long l_cur_frame_nr;
long l_step, l_begin, l_end;
@ -1106,7 +1106,7 @@ p_frames_convert(t_anim_info *ainfo_ptr,
l_overwrite_mode = 0;
l_percentage = 0.0;
l_run_mode = ainfo_ptr->run_mode;
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
if(save_proc_name == NULL) gimp_progress_init( _("Flattening Frames..."));
else gimp_progress_init( _("Converting Frames..."));
@ -1262,9 +1262,9 @@ p_frames_convert(t_anim_info *ainfo_ptr,
"or desired save plugin not available."));
}
}
if(l_run_mode == RUN_INTERACTIVE)
if(l_run_mode == GIMP_RUN_INTERACTIVE)
{
l_run_mode = RUN_WITH_LAST_VALS; /* for all further calls */
l_run_mode = GIMP_RUN_WITH_LAST_VALS; /* for all further calls */
}
g_free(l_sav_name);
}
@ -1273,7 +1273,7 @@ p_frames_convert(t_anim_info *ainfo_ptr,
/* destroy the tmp image */
gimp_image_delete(l_tmp_image_id);
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -1304,7 +1304,7 @@ int p_image_sizechange(gint32 image_id,
long offs_x, long offs_y
)
{
GParam *l_params;
GimpParam *l_params;
gint l_retvals;
switch(asiz_mode)
@ -1312,12 +1312,12 @@ int p_image_sizechange(gint32 image_id,
case ASIZ_CROP:
l_params = gimp_run_procedure ("gimp_crop",
&l_retvals,
PARAM_IMAGE, image_id,
PARAM_INT32, size_x,
PARAM_INT32, size_y,
PARAM_INT32, offs_x,
PARAM_INT32, offs_y,
PARAM_END);
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_INT32, size_x,
GIMP_PDB_INT32, size_y,
GIMP_PDB_INT32, offs_x,
GIMP_PDB_INT32, offs_y,
GIMP_PDB_END);
break;
case ASIZ_RESIZE:
gimp_image_resize(image_id, (guint)size_x, (guint)size_y, (gint)offs_x, (gint)offs_y);
@ -1325,10 +1325,10 @@ int p_image_sizechange(gint32 image_id,
default:
l_params = gimp_run_procedure ("gimp_image_scale",
&l_retvals,
PARAM_IMAGE, image_id,
PARAM_INT32, size_x,
PARAM_INT32, size_y,
PARAM_END);
GIMP_PDB_IMAGE, image_id,
GIMP_PDB_INT32, size_x,
GIMP_PDB_INT32, size_y,
GIMP_PDB_END);
break;
}
@ -1352,7 +1352,7 @@ gint32 p_anim_sizechange(t_anim_info *ainfo_ptr,
long l_step, l_begin, l_end;
gint32 l_tmp_image_id;
gdouble l_percentage, l_percentage_step;
GParam *l_params;
GimpParam *l_params;
int l_rc;
l_rc = 0;
@ -1360,7 +1360,7 @@ gint32 p_anim_sizechange(t_anim_info *ainfo_ptr,
l_percentage = 0.0;
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
switch(asiz_mode)
{
@ -1417,7 +1417,7 @@ gint32 p_anim_sizechange(t_anim_info *ainfo_ptr,
/* destroy the tmp image */
gimp_image_delete(l_tmp_image_id);
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -1441,7 +1441,7 @@ gint32 p_anim_sizechange(t_anim_info *ainfo_ptr,
* gap_range_flatten
* ============================================================================
*/
int gap_range_flatten(GRunModeType run_mode, gint32 image_id,
int gap_range_flatten(GimpRunModeType run_mode, gint32 image_id,
long range_from, long range_to)
{
int l_rc;
@ -1454,7 +1454,7 @@ int gap_range_flatten(GRunModeType run_mode, gint32 image_id,
{
if (0 == p_dir_ainfo(ainfo_ptr))
{
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_rc = p_range_dialog (ainfo_ptr, &l_from, &l_to,
_("Flatten Frames"),
@ -1511,7 +1511,7 @@ p_frames_layer_del(t_anim_info *ainfo_ptr,
l_rc = 0;
l_percentage = 0.0;
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_buff = g_strdup_printf (_("Removing Layer (pos:%ld) from Frames..."), position);
gimp_progress_init(l_buff);
@ -1597,7 +1597,7 @@ p_frames_layer_del(t_anim_info *ainfo_ptr,
/* destroy the tmp image */
gimp_image_delete(l_tmp_image_id);
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -1619,7 +1619,7 @@ p_frames_layer_del(t_anim_info *ainfo_ptr,
* gap_range_layer_del
* ============================================================================
*/
int gap_range_layer_del(GRunModeType run_mode, gint32 image_id,
int gap_range_layer_del(GimpRunModeType run_mode, gint32 image_id,
long range_from, long range_to, long position)
{
int l_rc;
@ -1634,7 +1634,7 @@ int gap_range_layer_del(GRunModeType run_mode, gint32 image_id,
{
if (0 == p_dir_ainfo(ainfo_ptr))
{
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_rc = p_range_dialog (ainfo_ptr, &l_from, &l_to,
_("Delete Layers in Frames"),
@ -1672,10 +1672,10 @@ int gap_range_layer_del(GRunModeType run_mode, gint32 image_id,
* convert frame range to any gimp supported fileformat
* ============================================================================
*/
gint32 gap_range_conv(GRunModeType run_mode, gint32 image_id,
gint32 gap_range_conv(GimpRunModeType run_mode, gint32 image_id,
long range_from, long range_to,
long flatten,
GImageType dest_type,
GimpImageBaseType dest_type,
gint32 dest_colors,
gint32 dest_dither,
char *basename,
@ -1693,7 +1693,7 @@ gint32 gap_range_conv(GRunModeType run_mode, gint32 image_id,
gint32 l_palette_type;
gint32 l_alpha_dither;
gint32 l_remove_unused;
GImageType l_dest_type;
GimpImageBaseType l_dest_type;
t_anim_info *ainfo_ptr;
char l_save_proc_name[128];
@ -1715,7 +1715,7 @@ gint32 gap_range_conv(GRunModeType run_mode, gint32 image_id,
strncpy(l_basename, ainfo_ptr->basename, sizeof(l_basename) -1);
l_basename[sizeof(l_basename) -1] = '\0';
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_flatten = 1;
@ -1795,7 +1795,7 @@ gint32 gap_range_conv(GRunModeType run_mode, gint32 image_id,
* (depending on asiz_mode)
* ============================================================================
*/
int gap_anim_sizechange(GRunModeType run_mode, t_gap_asiz asiz_mode, gint32 image_id,
int gap_anim_sizechange(GimpRunModeType run_mode, t_gap_asiz asiz_mode, gint32 image_id,
long size_x, long size_y, long offs_x, long offs_y)
{
int l_rc;
@ -1809,7 +1809,7 @@ int gap_anim_sizechange(GRunModeType run_mode, t_gap_asiz asiz_mode, gint32 imag
{
if (0 == p_dir_ainfo(ainfo_ptr))
{
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_rc = p_anim_sizechange_dialog (ainfo_ptr, asiz_mode,
&l_size_x, &l_size_y,

View File

@ -55,7 +55,7 @@ typedef enum
gint32 gap_range_to_multilayer(GRunModeType run_mode,
gint32 gap_range_to_multilayer(GimpRunModeType run_mode,
gint32 image_id,
long range_from, long range_to,
long flatten_mode, long bg_visible,
@ -64,18 +64,18 @@ gint32 gap_range_to_multilayer(GRunModeType run_mode,
gint32 sel_invert, char *sel_pattern
);
int gap_range_flatten(GRunModeType run_mode,
int gap_range_flatten(GimpRunModeType run_mode,
gint32 image_id,
long range_from, long range_to);
int gap_range_layer_del(GRunModeType run_mode,
int gap_range_layer_del(GimpRunModeType run_mode,
gint32 image_id,
long range_from, long range_to, long position);
int gap_range_conv(GRunModeType run_mode,
int gap_range_conv(GimpRunModeType run_mode,
gint32 image_id,
long range_from, long range_to,
long flatten,
GImageType dest_type,
GimpImageBaseType dest_type,
gint32 dest_colors,
gint32 dest_dither,
char *basename,
@ -86,7 +86,7 @@ int gap_range_conv(GRunModeType run_mode,
char *palette
);
int gap_anim_sizechange(GRunModeType run_mode,
int gap_anim_sizechange(GimpRunModeType run_mode,
t_gap_asiz asiz_mode,
gint32 image_id,
long size_x,

View File

@ -26,9 +26,9 @@
*/
/* revision history
* 1.1.9a; 1999/09/21 hof: bugfix RUN_NONINTERACTIVE mode did not work
* 1.1.9a; 1999/09/21 hof: bugfix GIMP_RUN_NONINTERACTIVE mode did not work
* 1.1.8a; 1999/08/31 hof: accept anim framenames without underscore '_'
* 1.1.5a; 1999/05/08 hof: bugix (dont mix GDrawableType with GImageType)
* 1.1.5a; 1999/05/08 hof: bugix (dont mix GimpImageType with GimpImageBaseType)
* 0.96.00; 1998/07/01 hof: - added scale, resize and crop
* (affects full range == all anim frames)
* - now using gap_arr_dialog.h
@ -75,9 +75,9 @@ p_split_image(t_anim_info *ainfo_ptr,
char *new_extension,
gint invers, gint no_alpha)
{
GImageType l_type;
GimpImageBaseType l_type;
guint l_width, l_height;
GRunModeType l_run_mode;
GimpRunModeType l_run_mode;
gint32 l_new_image_id;
gint l_nlayers;
gint32 *l_layers_list;
@ -95,7 +95,7 @@ p_split_image(t_anim_info *ainfo_ptr,
l_rc = -1;
l_percentage = 0.0;
l_run_mode = ainfo_ptr->run_mode;
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
gimp_progress_init( _("Splitting into Frames..."));
}
@ -149,7 +149,7 @@ p_split_image(t_anim_info *ainfo_ptr,
/* add a dummy layer (flatten needs at least 2 layers) */
l_cp_layer_id = gimp_layer_new(l_new_image_id, "dummy",
4, 4, /* width, height */
((l_type * 2 ) + 1), /* convert from GImageType to GDrawableType, and add alpha */
((l_type * 2 ) + 1), /* convert from GimpImageBaseType to GimpImageType, and add alpha */
0.0, /* Opacity full transparent */
0); /* NORMAL */
gimp_image_add_layer(l_new_image_id, l_cp_layer_id, 0);
@ -178,7 +178,7 @@ p_split_image(t_anim_info *ainfo_ptr,
break;
}
l_run_mode = RUN_NONINTERACTIVE; /* for all further calls */
l_run_mode = GIMP_RUN_NONINTERACTIVE; /* for all further calls */
/* set image name */
gimp_image_set_filename (l_new_image_id, l_sav_name);
@ -193,7 +193,7 @@ p_split_image(t_anim_info *ainfo_ptr,
/* show progress bar */
if(ainfo_ptr->run_mode == RUN_INTERACTIVE)
if(ainfo_ptr->run_mode == GIMP_RUN_INTERACTIVE)
{
l_percentage += l_percentage_step;
gimp_progress_update (l_percentage);
@ -268,7 +268,7 @@ p_split_dialog(t_anim_info *ainfo_ptr, gint *inverse_order, gint *no_alpha, char
* one frame per layer.
* ============================================================================
*/
int gap_split_image(GRunModeType run_mode,
int gap_split_image(GimpRunModeType run_mode,
gint32 image_id,
gint32 inverse_order,
gint32 no_alpha,
@ -301,7 +301,7 @@ int gap_split_image(GRunModeType run_mode,
}
else
{
if(run_mode == RUN_INTERACTIVE)
if(run_mode == GIMP_RUN_INTERACTIVE)
{
l_rc = p_split_dialog (ainfo_ptr, &l_inverse_order, &l_no_alpha, &l_extension[0], sizeof(l_extension));
}

View File

@ -35,7 +35,7 @@
int gap_split_image(GRunModeType run_mode,
int gap_split_image(GimpRunModeType run_mode,
gint32 image_id,
gint32 inverse_order,
gint32 no_alpha,

View File

@ -132,7 +132,7 @@ gdt_run (gchar *name,
switch(run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
memset (&oldvals, 0, sizeof(GdtVals));
gimp_get_data ("plug_in_gdyntext", &oldvals);
@ -158,13 +158,13 @@ gdt_run (gchar *name,
return;
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
#ifdef DEBUG
g_print ("%d\n", nparams);
#endif
if (nparams != 11)
{
values[0].data.d_status = STATUS_CALLING_ERROR;
values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
return;
}
else
@ -183,7 +183,7 @@ gdt_run (gchar *name,
}
break;
case RUN_WITH_LAST_VALS:
case GIMP_RUN_WITH_LAST_VALS:
gimp_get_data ("plug_in_gdyntext", &gdtvals);
gdtvals.image_id = param[1].data.d_image;
gdtvals.drawable_id = param[2].data.d_drawable;
@ -194,7 +194,7 @@ gdt_run (gchar *name,
gdt_render_text (&gdtvals);
if (run_mode == RUN_INTERACTIVE)
if (run_mode == GIMP_RUN_INTERACTIVE)
{
gdtvals.valid = TRUE;
gimp_set_data ("plug_in_gdyntext", &gdtvals, sizeof(GdtVals));
@ -304,8 +304,8 @@ gdt_save (GdtVals *data)
g_free(text);
parasite = gimp_parasite_new (GDYNTEXT_PARASITE,
PARASITE_PERSISTENT | PARASITE_UNDOABLE, strlen(lname), lname);
gimp_drawable_attach_parasite (data->drawable_id, parasite);
GIMP_PARASITE_PERSISTENT | GIMP_PARASITE_UNDOABLE, strlen(lname), lname);
gimp_drawable_parasite_attach (data->drawable_id, parasite);
gimp_parasite_free (parasite);
if (!data->change_layer_name)
@ -447,7 +447,7 @@ gdt_render_text_p (GdtVals *data,
data->layer_id = data->drawable_id = gimp_layer_new (data->image_id,
_("GDynText Layer"), layer_width, layer_height,
(GimpImageType)(gimp_image_base_type (data->image_id) * 2 + 1),
100.0, NORMAL_MODE);
100.0, GIMP_NORMAL_MODE);
gimp_layer_add_alpha (data->layer_id);
gimp_image_add_layer (data->image_id, data->layer_id, 0);
gimp_image_set_active_layer (data->image_id, data->layer_id);

View File

@ -65,7 +65,7 @@ typedef enum
/* gimp-1.1.14+ function names reorganization forgotten something */
#if defined(GIMP_HAVE_PARASITES) && GIMP_MICRO_VERSION < 14
# warning Replacing missing function 'gimp_drawable_parasite_find'
# define gimp_drawable_parasite_find gimp_drawable_find_parasite
# define gimp_drawable_parasite_find gimp_drawable_parasite_find
#endif

View File

@ -117,7 +117,7 @@ extern void * gdk_root_parent;
GDK_KEY_PRESS_MASK | \
GDK_KEY_RELEASE_MASK
static GDrawable *gfig_select_drawable;
static GimpDrawable *gfig_select_drawable;
static GtkWidget *gfig_preview;
static GtkWidget *pic_preview;
static GtkWidget *gfig_gtk_list;
@ -133,9 +133,9 @@ static gint img_width, img_height, img_bpp, real_img_bpp;
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 gfig_dialog (void);
static void gfig_clear_selection (gint32 ID);
@ -223,7 +223,7 @@ static gint calculate_point_to_line_distance (GdkPoint *p,
GdkPoint *B,
GdkPoint *I);
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -652,12 +652,12 @@ MAIN ()
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" },
{ PARAM_INT32, "dummy", "dummy" }
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_INT32, "dummy", "dummy" }
};
static gint nargs = sizeof (args) / sizeof (args[0]);
@ -669,7 +669,7 @@ query (void)
"1997",
N_("<Image>/Filters/Render/Gfig..."),
"RGB*, GRAY*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs, 0,
args, NULL);
}
@ -677,14 +677,14 @@ query (void)
static void
run (gchar *name,
gint nparams,
GParam *param,
GimpParam *param,
gint *nreturn_vals,
GParam **return_vals)
GimpParam **return_vals)
{
GParam * values = g_new (GParam, 1);
GDrawable *drawable;
GRunModeType run_mode;
GStatusType status = STATUS_SUCCESS;
GimpParam * values = g_new (GimpParam, 1);
GimpDrawable *drawable;
GimpRunModeType run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint pwidth, pheight;
@ -697,7 +697,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;
gfig_select_drawable = drawable =
@ -737,7 +737,7 @@ run (gchar *name,
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
/*gimp_get_data ("plug_in_gfig", &selvals);*/
INIT_I18N_UI ();
if (!gfig_dialog ())
@ -747,11 +747,11 @@ run (gchar *name,
}
break;
case RUN_NONINTERACTIVE:
status = STATUS_CALLING_ERROR;
case GIMP_RUN_NONINTERACTIVE:
status = GIMP_PDB_CALLING_ERROR;
break;
case RUN_WITH_LAST_VALS:
case GIMP_RUN_WITH_LAST_VALS:
/*gimp_get_data ("plug_in_gfig", &selvals);*/
break;
@ -768,17 +768,17 @@ run (gchar *name,
do_gfig ();
if (run_mode != RUN_NONINTERACTIVE)
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush ();
#if 0
if (run_mode == RUN_INTERACTIVE)
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_gfig", &selvals, sizeof (SelectItVals));
#endif /* 0 */
}
else
{
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
values[0].data.d_status = status;
@ -789,7 +789,7 @@ run (gchar *name,
static void
gfig_clear_selection (gint32 image_ID)
{
GParam *return_vals;
GimpParam *return_vals;
gint nreturn_vals;
/* Clear any selection - needed because drawing circles/ellipses
@ -797,8 +797,8 @@ gfig_clear_selection (gint32 image_ID)
*/
return_vals = gimp_run_procedure ("gimp_selection_clear",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
@ -1639,7 +1639,7 @@ void * yyy;
static void
cache_preview (void)
{
GPixelRgn src_rgn;
GimpPixelRgn src_rgn;
int y, x;
guchar *src_rows;
guchar *p;
@ -1666,8 +1666,8 @@ cache_preview (void)
switch (gimp_drawable_type (gfig_select_drawable->id))
{
case GRAYA_IMAGE:
case GRAY_IMAGE:
case GIMP_GRAYA_IMAGE:
case GIMP_GRAY_IMAGE:
isgrey = 1;
default:
break;
@ -2422,8 +2422,8 @@ gfig_brush_fill_preview (GtkWidget *pw,
gint32 layer_ID,
BrushDesc *bdesc)
{
GPixelRgn src_rgn;
GDrawable *brushdrawable;
GimpPixelRgn src_rgn;
GimpDrawable *brushdrawable;
gint bcount = 3;
if (bdesc->pv_buf)
@ -2452,15 +2452,15 @@ gfig_brush_fill_preview (GtkWidget *pw,
static void
mygimp_brush_set (gchar *bname)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
return_vals = gimp_run_procedure ("gimp_brushes_set_brush",
&nreturn_vals,
PARAM_STRING, bname,
PARAM_END);
GIMP_PDB_STRING, bname,
GIMP_PDB_END);
if (return_vals[0].data.d_status != STATUS_SUCCESS)
if (return_vals[0].data.d_status != GIMP_PDB_SUCCESS)
{
g_message ("Can't set brush...(1)");
}
@ -2471,15 +2471,15 @@ mygimp_brush_set (gchar *bname)
static gchar *
mygimp_brush_get (void)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
static gchar saved_bname[1024]; /* required to be static - returned from proc */
return_vals = gimp_run_procedure ("gimp_brushes_get_brush",
&nreturn_vals,
PARAM_END);
GIMP_PDB_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
strncpy (saved_bname, return_vals[1].data.d_string, sizeof (saved_bname));
}
@ -2497,14 +2497,14 @@ static void
mygimp_brush_info (gint32 *width,
gint32 *height)
{
GParam *return_vals;
GimpParam *return_vals;
int nreturn_vals;
return_vals = gimp_run_procedure ("gimp_brushes_get_brush",
&nreturn_vals,
PARAM_END);
GIMP_PDB_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
*width = MAX (return_vals[2].data.d_int32, 32);
*height = MAX (return_vals[3].data.d_int32, 32);
@ -4621,8 +4621,8 @@ paint_layer_new (gchar *new_name)
switch (gimp_drawable_type (gfig_select_drawable->id))
{
case GRAYA_IMAGE:
case GRAY_IMAGE:
case GIMP_GRAYA_IMAGE:
case GIMP_GRAY_IMAGE:
isgrey = 2;
default:
break;
@ -7174,7 +7174,7 @@ d_draw_circle (Dobject * obj)
static void
d_paint_circle (Dobject *obj)
{
GParam *return_vals;
GimpParam *return_vals;
gint nreturn_vals;
DobjPoints * center_pnt;
DobjPoints * edge_pnt;
@ -7239,8 +7239,8 @@ d_paint_circle (Dobject *obj)
gimp_edit_stroke (gfig_drawable);
return_vals = gimp_run_procedure ("gimp_selection_clear", &nreturn_vals,
PARAM_IMAGE, gfig_image,
PARAM_END);
GIMP_PDB_IMAGE, gfig_image,
GIMP_PDB_END);
gimp_destroy_params (return_vals, nreturn_vals);
@ -7644,7 +7644,7 @@ d_paint_approx_ellipse (Dobject *obj)
static void
d_paint_ellipse (Dobject *obj)
{
GParam *return_vals;
GimpParam *return_vals;
gint nreturn_vals;
DobjPoints * center_pnt;
DobjPoints * edge_pnt;
@ -7722,8 +7722,8 @@ d_paint_ellipse (Dobject *obj)
gimp_edit_stroke (gfig_drawable);
return_vals = gimp_run_procedure ("gimp_selection_clear", &nreturn_vals,
PARAM_IMAGE, gfig_image,
PARAM_END);
GIMP_PDB_IMAGE, gfig_image,
GIMP_PDB_END);
gimp_destroy_params (return_vals, nreturn_vals);

View File

@ -316,7 +316,7 @@ typedef struct
typedef struct
{
GTile *tile;
GimpTile *tile;
gint col;
gint row;
gint shadow;
@ -408,9 +408,9 @@ typedef void (*QueryFunc) (GtkWidget *, gpointer, gpointer);
static void plugin_query (void);
static void plugin_run (gchar *name,
gint nparams,
GParam *param,
GimpParam *param,
gint *nreturn_vals,
GParam **return_vals);
GimpParam **return_vals);
static void plug_in_parse_gflare_path (void);
@ -507,7 +507,7 @@ static void gradient_cache_flush (void);
*** Variables
**/
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -598,7 +598,7 @@ static gchar *gflare_menu_modes[] =
};
static gint32 image_ID;
static GDrawable *drawable;
static GimpDrawable *drawable;
static DrawableInfo dinfo;
static TileKeeper *tk_read;
static TileKeeper *tk_write;
@ -790,22 +790,22 @@ MAIN ();
void
plugin_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" },
{ PARAM_STRING, "gflare_name", "The name of GFlare" },
{ PARAM_INT32, "xcenter", "X coordinate of center of GFlare" },
{ PARAM_INT32, "ycenter", "Y coordinate of center of GFlare" },
{ PARAM_FLOAT, "radius", "Radius of GFlare (pixel)" },
{ PARAM_FLOAT, "rotation", "Rotation of GFlare (degree)" },
{ PARAM_FLOAT, "hue", "Hue rotation of GFlare (degree)" },
{ PARAM_FLOAT, "vangle", "Vector angle for second flares (degree)" },
{ PARAM_FLOAT, "vlength", "Vector length for second flares (percentage to Radius)" },
{ PARAM_INT32, "use_asupsample", "Whether it uses or not adaptive supersampling while rendering (boolean)" },
{ PARAM_INT32, "asupsample_max_depth", "Max depth for adaptive supersampling"},
{ PARAM_FLOAT, "asupsample_threshold", "Threshold for adaptive supersampling"}
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image (unused)" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_STRING, "gflare_name", "The name of GFlare" },
{ GIMP_PDB_INT32, "xcenter", "X coordinate of center of GFlare" },
{ GIMP_PDB_INT32, "ycenter", "Y coordinate of center of GFlare" },
{ GIMP_PDB_FLOAT, "radius", "Radius of GFlare (pixel)" },
{ GIMP_PDB_FLOAT, "rotation", "Rotation of GFlare (degree)" },
{ GIMP_PDB_FLOAT, "hue", "Hue rotation of GFlare (degree)" },
{ GIMP_PDB_FLOAT, "vangle", "Vector angle for second flares (degree)" },
{ GIMP_PDB_FLOAT, "vlength", "Vector length for second flares (percentage to Radius)" },
{ GIMP_PDB_INT32, "use_asupsample", "Whether it uses or not adaptive supersampling while rendering (boolean)" },
{ GIMP_PDB_INT32, "asupsample_max_depth", "Max depth for adaptive supersampling"},
{ GIMP_PDB_FLOAT, "asupsample_threshold", "Threshold for adaptive supersampling"}
};
static gint nargs = sizeof (args) / sizeof (args[0]);
@ -825,7 +825,7 @@ plugin_query (void)
"1997",
N_("<Image>/Filters/Light Effects/GFlare..."),
"RGB*, GRAY*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs, 0,
args, NULL);
}
@ -833,13 +833,13 @@ plugin_query (void)
void
plugin_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;
/* Initialize */
run_mode = param[0].data.d_int32;
@ -847,7 +847,7 @@ plugin_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;
/*
@ -881,7 +881,7 @@ plugin_run (gchar *name,
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
INIT_I18N_UI();
/* Possibly retrieve data */
@ -895,15 +895,15 @@ plugin_run (gchar *name,
}
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
#if 0
printf("Currently non interactive call of gradient flare is not supported\n");
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
break;
#endif
if (nparams != 14)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
}
else
{
@ -920,11 +920,11 @@ plugin_run (gchar *name,
pvals.asupsample_threshold = param[13].data.d_float;
if (pvals.radius <= 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 ("plug_in_gflare", &pvals);
break;
@ -933,7 +933,7 @@ plugin_run (gchar *name,
break;
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
/* Make sure that the drawable is gray or RGB color */
if (gimp_drawable_is_rgb (drawable->id) ||
@ -942,17 +942,17 @@ plugin_run (gchar *name,
gimp_progress_init (_("Gradient Flare..."));
plugin_do ();
if (run_mode != RUN_NONINTERACTIVE)
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush ();
/* Store data */
if (run_mode == RUN_INTERACTIVE)
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_gflare", &pvals, sizeof (PluginValues));
}
else
{
g_message (_("GFlare: cannot operate on indexed color images"));
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
}
@ -1063,7 +1063,7 @@ plugin_do (void)
static void
plugin_do_non_asupsample (void)
{
GPixelRgn src_rgn, dest_rgn;
GimpPixelRgn src_rgn, dest_rgn;
gpointer pr;
guchar *src_row, *dest_row;
guchar *src, *dest;
@ -2771,7 +2771,7 @@ dlg_preview_init_func (Preview *preview, gpointer data)
static void
dlg_preview_render_func (Preview *preview, guchar *dest, gint y, gpointer data)
{
GPixelRgn srcPR;
GimpPixelRgn srcPR;
gint x;
gint dx, dy; /* drawable x, y */
guchar *src_row, *src;

View File

@ -69,9 +69,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);
/* return the image-ID of the new image, or -1 in case of an error */
static gint32 load_image (gchar *filename,
@ -95,7 +95,7 @@ static gint get_info (gchar *filename,
/*
* GIMP interface
*/
GPlugInInfo PLUG_IN_INFO =
GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@ -103,44 +103,44 @@ GPlugInInfo PLUG_IN_INFO =
run, /* run_proc */
};
GParamDef load_args[] =
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 entered" },
{ PARAM_INT32, "from_frame", "Load beginning from this frame" },
{ PARAM_INT32, "to_frame", "End loading with this frame" },
{ 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 entered" },
{ GIMP_PDB_INT32, "from_frame", "Load beginning from this frame" },
{ GIMP_PDB_INT32, "to_frame", "End loading with this frame" },
};
GParamDef load_return_vals[] =
GimpParamDef load_return_vals[] =
{
{ PARAM_IMAGE, "image", "Output image" },
{ GIMP_PDB_IMAGE, "image", "Output image" },
};
gint nload_args = sizeof (load_args) / sizeof (load_args[0]);
gint nload_return_vals = (sizeof (load_return_vals) /
sizeof (load_return_vals[0]));
GParamDef save_args[] =
GimpParamDef save_args[] =
{
{ PARAM_INT32, "run_mode", "Interactive, non-interactive" },
{ PARAM_IMAGE, "image", "Input image" },
{ PARAM_DRAWABLE, "drawable", "Input drawable (unused)" },
{ PARAM_STRING, "filename", "The name of the file to save" },
{ PARAM_STRING, "raw_filename", "The name entered" },
{ PARAM_INT32, "from_frame", "Save beginning from this frame" },
{ PARAM_INT32, "to_frame", "End saving with this frame" },
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable (unused)" },
{ GIMP_PDB_STRING, "filename", "The name of the file to save" },
{ GIMP_PDB_STRING, "raw_filename", "The name entered" },
{ GIMP_PDB_INT32, "from_frame", "Save beginning from this frame" },
{ GIMP_PDB_INT32, "to_frame", "End saving with this frame" },
};
gint nsave_args = sizeof (save_args) / sizeof (save_args[0]);
GParamDef info_args[] =
GimpParamDef info_args[] =
{
{ PARAM_STRING, "filename", "The name of the file to get info" },
{ GIMP_PDB_STRING, "filename", "The name of the file to get info" },
};
GParamDef info_return_vals[] =
GimpParamDef info_return_vals[] =
{
{ PARAM_INT32, "width", "Width of one frame" },
{ PARAM_INT32, "height", "Height of one frame" },
{ PARAM_INT32, "frames", "Number of Frames" },
{ GIMP_PDB_INT32, "width", "Width of one frame" },
{ GIMP_PDB_INT32, "height", "Height of one frame" },
{ GIMP_PDB_INT32, "frames", "Number of Frames" },
};
gint ninfo_args = sizeof (info_args) / sizeof (info_args[0]);
gint ninfo_return_vals = (sizeof (info_return_vals) /
@ -166,7 +166,7 @@ query (void)
"1997",
"<Load>/FLI",
NULL,
PROC_PLUG_IN,
GIMP_PLUGIN,
nload_args - 2, nload_return_vals,
load_args, load_return_vals);
@ -183,7 +183,7 @@ query (void)
"1997",
"<Save>/FLI",
"INDEXED,GRAY",
PROC_PLUG_IN,
GIMP_PLUGIN,
nsave_args, 0,
save_args, NULL);
@ -203,22 +203,22 @@ query (void)
"1997",
NULL,
NULL,
PROC_EXTENSION,
GIMP_EXTENSION,
ninfo_args, ninfo_return_vals,
info_args, info_return_vals);
}
GParam values[5];
GimpParam values[5];
static void
run (gchar *name,
gint nparams,
GParam *param,
GimpParam *param,
gint *nreturn_vals,
GParam **return_vals)
GimpParam **return_vals)
{
GStatusType status = STATUS_SUCCESS;
GRunModeType run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpRunModeType run_mode;
gint32 pc;
gint32 image_ID;
gint32 drawable_ID;
@ -229,8 +229,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;
if (strcmp (name, "file_fli_load") == 0)
{
@ -238,21 +238,21 @@ run (gchar *name,
switch (run_mode)
{
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
/*
* check for valid parameters:
* (Or can I trust GIMP ?)
*/
if ((nparams < nload_args - 2) || (nload_args < nparams))
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
break;
}
for (pc = 0; pc < nload_args - 2; pc++)
{
if (load_args[pc].type != param[pc].type)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
break;
}
}
@ -260,7 +260,7 @@ run (gchar *name,
{
if (load_args[pc].type != param[pc].type)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
break;
}
}
@ -273,14 +273,14 @@ 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;
break;
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
if (load_dialog (param[1].data.d_string))
{
image_ID = load_image (param[1].data.d_string,
@ -289,18 +289,18 @@ 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
status = STATUS_CANCEL;
status = GIMP_PDB_CANCEL;
break;
case RUN_WITH_LAST_VALS:
status = STATUS_CALLING_ERROR;
case GIMP_RUN_WITH_LAST_VALS:
status = GIMP_PDB_CALLING_ERROR;
break;
}
}
@ -313,28 +313,28 @@ run (gchar *name,
switch (run_mode)
{
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
if (nparams!=nsave_args)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
break;
}
for (pc = 0; pc < nsave_args; pc++)
{
if (save_args[pc].type!=param[pc].type)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
break;
}
}
if (! save_image (param[3].data.d_string, image_ID,
param[5].data.d_int32,
param[6].data.d_int32))
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
break;
case RUN_INTERACTIVE:
case RUN_WITH_LAST_VALS:
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("gfli", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "FLI",
(CAN_HANDLE_INDEXED |
@ -343,17 +343,17 @@ run (gchar *name,
CAN_HANDLE_LAYERS));
if (export == EXPORT_CANCEL)
{
values[0].data.d_status = STATUS_CANCEL;
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
}
if (save_dialog (param[1].data.d_image))
{
if (! save_image (param[3].data.d_string, image_ID, from_frame, to_frame))
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
else
status = STATUS_CANCEL;
status = GIMP_PDB_CANCEL;
break;
}
@ -370,38 +370,38 @@ run (gchar *name,
* check for valid parameters;
*/
if (nparams != ninfo_args)
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
for (pc = 0; pc < nsave_args; pc++)
{
if (info_args[pc].type != param[pc].type)
{
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
break;
}
}
}
if (status == STATUS_SUCCESS)
if (status == GIMP_PDB_SUCCESS)
{
if (get_info (param[0].data.d_string, &width, &height, &frames))
{
*nreturn_vals = 4;
values[1].type = PARAM_INT32;
values[1].type = GIMP_PDB_INT32;
values[1].data.d_int32 = width;
values[2].type = PARAM_INT32;
values[2].type = GIMP_PDB_INT32;
values[2].data.d_int32 = height;
values[3].type = PARAM_INT32;
values[3].type = GIMP_PDB_INT32;
values[3].data.d_int32 = frames;
}
else
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
}
}
else
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
values[0].data.d_status = status;
}
@ -446,12 +446,12 @@ load_image (gchar *filename,
{
FILE *file;
gchar *name_buf;
GDrawable *drawable;
GimpDrawable *drawable;
gint32 image_id, layer_ID;
guchar *fb, *ofb, *fb_x;
guchar cm[768], ocm[768];
GPixelRgn pixel_rgn;
GimpPixelRgn pixel_rgn;
s_fli_header fli_header;
gint cnt;
@ -526,7 +526,7 @@ load_image (gchar *filename,
name_buf = g_strdup_printf (_("Frame (%i)"), cnt);
layer_ID = gimp_layer_new (image_id, name_buf,
fli_header.width, fli_header.height,
INDEXED_IMAGE, 100, NORMAL_MODE);
GIMP_INDEXED_IMAGE, 100, GIMP_NORMAL_MODE);
g_free (name_buf);
drawable = gimp_drawable_get (layer_ID);
@ -581,7 +581,7 @@ save_image (gchar *filename,
{
FILE *file;
gchar *name_buf;
GDrawable *drawable;
GimpDrawable *drawable;
gint32 *framelist;
gint nframes;
gint colors, i;
@ -594,7 +594,7 @@ save_image (gchar *filename,
guchar *src_row;
guchar *fb, *ofb;
guchar cm[768];
GPixelRgn pixel_rgn;
GimpPixelRgn pixel_rgn;
s_fli_header fli_header;
gint cnt;

View File

@ -45,7 +45,7 @@ int colorfile(char *fn)
void brushdmenuselect(gint32 id, gpointer data)
{
GPixelRgn src_rgn;
GimpPixelRgn src_rgn;
guchar *src_row;
guchar *src;
gint alpha, has_alpha, bpp;
@ -53,7 +53,7 @@ void brushdmenuselect(gint32 id, gpointer data)
struct ppm *p;
gint x1, y1, x2, y2;
gint row, col;
GDrawable *drawable;
GimpDrawable *drawable;
int rowstride;
if(brushfile == 2) return; /* Not finished GUI-building yet */

View File

@ -12,7 +12,7 @@
static void query(void);
static void gimpressionist_main(void);
static void run(char *, int, GParam *, int *, GParam **);
static void run(char *, int, GimpParam *, int *, GimpParam **);
void repaint(struct ppm *p, struct ppm *a);
int create_gimpressionist(void);
@ -21,7 +21,7 @@ static gint img_width, img_height, img_bpp;
gint img_has_alpha = 0;
static gint sel_x1, sel_y1, sel_x2, sel_y2;
GPlugInInfo PLUG_IN_INFO = {
GimpPlugInInfo PLUG_IN_INFO = {
NULL, /* init_proc */
NULL, /* quit_proc */
query, /* query_proc */
@ -79,18 +79,18 @@ gimpressionist_vals_t defaultpcvals = {
0, 0.0
};
static GDrawable *drawable;
static GimpDrawable *drawable;
static void
query(void)
{
static GParamDef args[] = {
{ PARAM_INT32, "run_mode", "Interactive" },
{ PARAM_IMAGE, "image", "Input image" },
{ PARAM_DRAWABLE, "drawable", "Input drawable" },
static GimpParamDef args[] = {
{ GIMP_PDB_INT32, "run_mode", "Interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
}; /* args */
static GParamDef *return_vals = NULL;
static GimpParamDef *return_vals = NULL;
static int nargs = sizeof(args) / sizeof(args[0]);
static int nreturn_vals = 0;
@ -104,7 +104,7 @@ query(void)
PLUG_IN_VERSION,
N_("<Image>/Filters/Artistic/GIMPressionist..."),
"RGB*, GRAY*",
PROC_PLUG_IN,
GIMP_PLUGIN,
nargs,
nreturn_vals,
args,
@ -120,17 +120,17 @@ gimpressionist_get_data(char *name, void *ptr)
static void
run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **return_vals)
run(char *name, int nparams, GimpParam *param, int *nreturn_vals, GimpParam **return_vals)
{
static GParam values[1];
static GimpParam values[1];
GRunModeType run_mode;
GStatusType status;
GimpRunModeType run_mode;
GimpPDBStatusType status;
status = STATUS_SUCCESS;
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;
@ -148,35 +148,35 @@ run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **return_v
gimp_drawable_mask_bounds(drawable->id, &sel_x1, &sel_y1, &sel_x2, &sel_y2);
switch (run_mode) {
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
INIT_I18N_UI();
gimpressionist_get_data(PLUG_IN_NAME, &pcvals);
if(!create_gimpressionist())
return;
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
INIT_I18N();
g_message("GIMPressionist: RUN_NONINTERACTIVE not implemented yet!\n");
status = STATUS_EXECUTION_ERROR;
g_message("GIMPressionist: GIMP_RUN_NONINTERACTIVE not implemented yet!\n");
status = GIMP_PDB_EXECUTION_ERROR;
break;
case RUN_WITH_LAST_VALS:
case GIMP_RUN_WITH_LAST_VALS:
INIT_I18N_UI();
gimpressionist_get_data(PLUG_IN_NAME, &pcvals);
break;
default:
g_message("Huh?!\n");
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
break;
}
if((status == STATUS_SUCCESS) && (gimp_drawable_is_rgb(drawable->id) || gimp_drawable_is_gray(drawable->id))) {
if((status == GIMP_PDB_SUCCESS) && (gimp_drawable_is_rgb(drawable->id) || gimp_drawable_is_gray(drawable->id))) {
gimpressionist_main();
gimp_displays_flush ();
if (run_mode == RUN_INTERACTIVE)
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data(PLUG_IN_NAME, &pcvals, sizeof(gimpressionist_vals_t));
} else if(status == STATUS_SUCCESS)
status = STATUS_EXECUTION_ERROR;
} else if(status == GIMP_PDB_SUCCESS)
status = GIMP_PDB_EXECUTION_ERROR;
values[0].data.d_status = status;
@ -185,7 +185,7 @@ run(char *name, int nparams, GParam *param, int *nreturn_vals, GParam **return_v
void grabarea(void)
{
GPixelRgn src_rgn;
GimpPixelRgn src_rgn;
guchar *src_row;
guchar *src;
gint alpha, has_alpha, bpp;
@ -273,7 +273,7 @@ void grabarea(void)
void gimpressionist_main(void)
{
GPixelRgn dest_rgn;
GimpPixelRgn dest_rgn;
guchar *dest_row;
guchar *dest;
gint alpha, has_alpha, bpp;

View File

@ -522,7 +522,7 @@ int create_gimpressionist(void)
char *standalone = NULL;
extern GPlugInInfo PLUG_IN_INFO;
extern GimpPlugInInfo PLUG_IN_INFO;
#ifdef G_OS_WIN32
/* No standalone on win32. */

View File

@ -127,19 +127,19 @@ extern FILE *siod_output;
void
script_fu_console_run (char *name,
int nparams,
GParam *params,
GimpParam *params,
int *nreturn_vals,
GParam **return_vals)
GimpParam **return_vals)
{
static GParam values[1];
GStatusType status = STATUS_SUCCESS;
GRunModeType run_mode;
static GimpParam values[1];
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpRunModeType run_mode;
run_mode = params[0].data.d_int32;
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
/* Enable SIOD output */
script_fu_open_siod_console ();
@ -150,9 +150,9 @@ script_fu_console_run (char *name,
script_fu_close_siod_console ();
break;
case RUN_WITH_LAST_VALS:
case RUN_NONINTERACTIVE:
status = STATUS_CALLING_ERROR;
case GIMP_RUN_WITH_LAST_VALS:
case GIMP_RUN_NONINTERACTIVE:
status = GIMP_PDB_CALLING_ERROR;
gimp_message (_("Script-Fu console mode allows only interactive invocation"));
break;
@ -163,7 +163,7 @@ script_fu_console_run (char *name,
*nreturn_vals = 1;
*return_vals = values;
values[0].type = PARAM_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
}
@ -605,26 +605,26 @@ script_fu_close_siod_console (void)
void
script_fu_eval_run (char *name,
int nparams,
GParam *params,
GimpParam *params,
int *nreturn_vals,
GParam **return_vals)
GimpParam **return_vals)
{
static GParam values[1];
GStatusType status = STATUS_SUCCESS;
GRunModeType run_mode;
static GimpParam values[1];
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpRunModeType run_mode;
run_mode = params[0].data.d_int32;
switch (run_mode)
{
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
if (repl_c_string (params[1].data.d_string, 0, 0, 1) != 0)
status = STATUS_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
break;
case RUN_INTERACTIVE:
case RUN_WITH_LAST_VALS:
status = STATUS_CALLING_ERROR;
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
status = GIMP_PDB_CALLING_ERROR;
gimp_message (_("Script-Fu evaluate mode allows only noninteractive invocation"));
break;
@ -635,6 +635,6 @@ script_fu_eval_run (char *name,
*nreturn_vals = 1;
*return_vals = values;
values[0].type = PARAM_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
}

View File

@ -19,15 +19,15 @@
#ifndef __SCRIPT_FU_CONSOLE_H__
#define __SCRIPT_FU_CONSOLE_H__
void script_fu_console_run (char *name,
int nparams,
GParam *params,
int *nreturn_vals,
GParam **return_vals);
void script_fu_eval_run (char *name,
int nparams,
GParam *params,
int *nreturn_vals,
GParam **return_vals);
void script_fu_console_run (gchar *name,
gint nparams,
GimpParam *params,
gint *nreturn_vals,
GimpParam **return_vals);
void script_fu_eval_run (gchar *name,
gint nparams,
GimpParam *params,
gint *nreturn_vals,
GimpParam **return_vals);
#endif /* __SCRIPT_FU_CONSOLE__ */

View File

@ -779,7 +779,7 @@ script_fu_install_script (gpointer foo,
script->date,
menu_path,
script->img_types,
PROC_TEMPORARY,
GIMP_TEMPORARY,
script->num_args + 1, 0,
script->args, NULL,
script_fu_script_proc);
@ -812,7 +812,7 @@ script_fu_script_proc (gchar *name,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpPDBStatusType status = STATUS_SUCCESS;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpRunModeType run_mode;
SFScript *script;
gint min_args;
@ -821,16 +821,16 @@ script_fu_script_proc (gchar *name,
run_mode = params[0].data.d_int32;
if (! (script = script_fu_find_script (name)))
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
else
{
if (script->num_args == 0)
run_mode = RUN_NONINTERACTIVE;
run_mode = GIMP_RUN_NONINTERACTIVE;
switch (run_mode)
{
case RUN_INTERACTIVE:
case RUN_WITH_LAST_VALS:
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
/* Determine whether the script is image based (runs on an image) */
if (strncmp (script->description, "<Image>", 7) == 0)
{
@ -850,11 +850,11 @@ script_fu_script_proc (gchar *name,
break;
}
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
/* Make sure all the arguments are there! */
if (nparams != (script->num_args + 1))
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS)
status = GIMP_PDB_CALLING_ERROR;
if (status == GIMP_PDB_SUCCESS)
{
gchar *text = NULL;
gchar *command;

View File

@ -779,7 +779,7 @@ script_fu_install_script (gpointer foo,
script->date,
menu_path,
script->img_types,
PROC_TEMPORARY,
GIMP_TEMPORARY,
script->num_args + 1, 0,
script->args, NULL,
script_fu_script_proc);
@ -812,7 +812,7 @@ script_fu_script_proc (gchar *name,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpPDBStatusType status = STATUS_SUCCESS;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpRunModeType run_mode;
SFScript *script;
gint min_args;
@ -821,16 +821,16 @@ script_fu_script_proc (gchar *name,
run_mode = params[0].data.d_int32;
if (! (script = script_fu_find_script (name)))
status = STATUS_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
else
{
if (script->num_args == 0)
run_mode = RUN_NONINTERACTIVE;
run_mode = GIMP_RUN_NONINTERACTIVE;
switch (run_mode)
{
case RUN_INTERACTIVE:
case RUN_WITH_LAST_VALS:
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
/* Determine whether the script is image based (runs on an image) */
if (strncmp (script->description, "<Image>", 7) == 0)
{
@ -850,11 +850,11 @@ script_fu_script_proc (gchar *name,
break;
}
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
/* Make sure all the arguments are there! */
if (nparams != (script->num_args + 1))
status = STATUS_CALLING_ERROR;
if (status == STATUS_SUCCESS)
status = GIMP_PDB_CALLING_ERROR;
if (status == GIMP_PDB_SUCCESS)
{
gchar *text = NULL;
gchar *command;

View File

@ -165,19 +165,19 @@ extern LISP repl_return_val;
void
script_fu_server_run (char *name,
int nparams,
GParam *params,
GimpParam *params,
int *nreturn_vals,
GParam **return_vals)
GimpParam **return_vals)
{
static GParam values[1];
GStatusType status = STATUS_SUCCESS;
GRunModeType run_mode;
static GimpParam values[1];
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpRunModeType run_mode;
run_mode = params[0].data.d_int32;
switch (run_mode)
{
case RUN_INTERACTIVE:
case GIMP_RUN_INTERACTIVE:
if (server_interface ())
{
server_mode = TRUE;
@ -187,7 +187,7 @@ script_fu_server_run (char *name,
}
break;
case RUN_NONINTERACTIVE:
case GIMP_RUN_NONINTERACTIVE:
/* Set server_mode to TRUE */
server_mode = TRUE;
@ -195,9 +195,9 @@ script_fu_server_run (char *name,
server_start (params[1].data.d_int32, params[2].data.d_string);
break;
case RUN_WITH_LAST_VALS:
status = STATUS_CALLING_ERROR;
g_warning ("Script-Fu server does handle \"RUN_WITH_LAST_VALS\"");
case GIMP_RUN_WITH_LAST_VALS:
status = GIMP_PDB_CALLING_ERROR;
g_warning ("Script-Fu server does handle \"GIMP_RUN_WITH_LAST_VALS\"");
default:
break;
@ -206,7 +206,7 @@ script_fu_server_run (char *name,
*nreturn_vals = 1;
*return_vals = values;
values[0].type = PARAM_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
}

View File

@ -19,12 +19,12 @@
#ifndef __SCRIPT_FU_SERVER_H__
#define __SCRIPT_FU_SERVER_H__
void script_fu_server_run (char *name,
int nparams,
GParam *params,
int *nreturn_vals,
GParam **return_vals);
void script_fu_server_run (gchar *name,
gint nparams,
GimpParam *params,
gint *nreturn_vals,
GimpParam **return_vals);
void script_fu_server_listen (gint timeout);
void script_fu_server_listen (gint timeout);
#endif /* __SCRIPT_FU_SERVER__ */

View File

@ -314,7 +314,7 @@ init_procedures (void)
init_lsubr ("script-fu-register", script_fu_register_call);
init_lsubr ("script-fu-quit", script_fu_quit_call);
gimp_query_database (".*", ".*", ".*", ".*", ".*", ".*", ".*", &num_procs, &proc_list);
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*", &num_procs, &proc_list);
/* Register each procedure as a scheme func */
for (i = 0; i < num_procs; i++)
@ -413,12 +413,12 @@ init_constants (void)
setvar (cintern ("BLUR"), flocons (0), NIL);
setvar (cintern ("SHARPEN"), flocons (1), NIL);
setvar (cintern ("RGB_IMAGE"), flocons (0), NIL);
setvar (cintern ("RGBA_IMAGE"), flocons (1), NIL);
setvar (cintern ("GRAY_IMAGE"), flocons (2), NIL);
setvar (cintern ("GRAYA_IMAGE"), flocons (3), NIL);
setvar (cintern ("INDEXED_IMAGE"), flocons (4), NIL);
setvar (cintern ("INDEXEDA_IMAGE"), flocons (5), NIL);
setvar (cintern ("GIMP_RGB_IMAGE"), flocons (0), NIL);
setvar (cintern ("GIMP_RGBA_IMAGE"), flocons (1), NIL);
setvar (cintern ("GIMP_GRAY_IMAGE"), flocons (2), NIL);
setvar (cintern ("GIMP_GRAYA_IMAGE"), flocons (3), NIL);
setvar (cintern ("GIMP_INDEXED_IMAGE"), flocons (4), NIL);
setvar (cintern ("GIMP_INDEXEDA_IMAGE"), flocons (5), NIL);
/* Useful misc stuff */
setvar (cintern ("TRUE"), flocons (1), NIL);