use GIMP_GRADIENT as prefix for the GimpGradientType enum.

2003-08-26  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.h: use GIMP_GRADIENT as prefix for the
	GimpGradientType enum.

	* app/core/core-enums.c
	* app/pdb/misc_tools_cmds.c
	* libgimp/gimpenums.h
	* plug-ins/pygimp/gimpenums.py
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: regenerated.

	* app/core/gimpdrawable-blend.c
	* app/tools/gimpblendoptions.c
	* plug-ins/pygimp/plug-ins/sphere.py
	* plug-ins/script-fu/scripts: changed accordingly.

	* libgimp/gimpcompat.h
	* plug-ins/script-fu/siod-wrapper.c: added compatibility defines
	for the old enum values.
This commit is contained in:
Sven Neumann 2003-08-26 18:12:42 +00:00 committed by Sven Neumann
parent 17d1fb17f2
commit ee6dad2eb5
40 changed files with 299 additions and 235 deletions

View File

@ -1,3 +1,24 @@
2003-08-26 Sven Neumann <sven@gimp.org>
* app/core/core-enums.h: use GIMP_GRADIENT as prefix for the
GimpGradientType enum.
* app/core/core-enums.c
* app/pdb/misc_tools_cmds.c
* libgimp/gimpenums.h
* plug-ins/pygimp/gimpenums.py
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl: regenerated.
* app/core/gimpdrawable-blend.c
* app/tools/gimpblendoptions.c
* plug-ins/pygimp/plug-ins/sphere.py
* plug-ins/script-fu/scripts: changed accordingly.
* libgimp/gimpcompat.h
* plug-ins/script-fu/siod-wrapper.c: added compatibility defines
for the old enum values.
2003-08-26 Michael Natterer <mitch@gimp.org> 2003-08-26 Michael Natterer <mitch@gimp.org>
* app/tools/gimptransformoptions.c * app/tools/gimptransformoptions.c

View File

@ -206,17 +206,17 @@ gimp_fill_type_get_type (void)
static const GEnumValue gimp_gradient_type_enum_values[] = static const GEnumValue gimp_gradient_type_enum_values[] =
{ {
{ GIMP_LINEAR, N_("Linear"), "linear" }, { GIMP_GRADIENT_LINEAR, N_("Linear"), "linear" },
{ GIMP_BILINEAR, N_("Bi-Linear"), "bilinear" }, { GIMP_GRADIENT_BILINEAR, N_("Bi-Linear"), "bilinear" },
{ GIMP_RADIAL, N_("Radial"), "radial" }, { GIMP_GRADIENT_RADIAL, N_("Radial"), "radial" },
{ GIMP_SQUARE, N_("Square"), "square" }, { GIMP_GRADIENT_SQUARE, N_("Square"), "square" },
{ GIMP_CONICAL_SYMMETRIC, N_("Conical (symmetric)"), "conical-symmetric" }, { GIMP_GRADIENT_CONICAL_SYMMETRIC, N_("Conical (symmetric)"), "conical-symmetric" },
{ GIMP_CONICAL_ASYMMETRIC, N_("Conical (asymmetric)"), "conical-asymmetric" }, { GIMP_GRADIENT_CONICAL_ASYMMETRIC, N_("Conical (asymmetric)"), "conical-asymmetric" },
{ GIMP_SHAPEBURST_ANGULAR, N_("Shapeburst (angular)"), "shapeburst-angular" }, { GIMP_GRADIENT_SHAPEBURST_ANGULAR, N_("Shapeburst (angular)"), "shapeburst-angular" },
{ GIMP_SHAPEBURST_SPHERICAL, N_("Shapeburst (spherical)"), "shapeburst-spherical" }, { GIMP_GRADIENT_SHAPEBURST_SPHERICAL, N_("Shapeburst (spherical)"), "shapeburst-spherical" },
{ GIMP_SHAPEBURST_DIMPLED, N_("Shapeburst (dimpled)"), "shapeburst-dimpled" }, { GIMP_GRADIENT_SHAPEBURST_DIMPLED, N_("Shapeburst (dimpled)"), "shapeburst-dimpled" },
{ GIMP_SPIRAL_CLOCKWISE, N_("Spiral (clockwise)"), "spiral-clockwise" }, { GIMP_GRADIENT_SPIRAL_CLOCKWISE, N_("Spiral (clockwise)"), "spiral-clockwise" },
{ GIMP_SPIRAL_ANTICLOCKWISE, N_("Spiral (anticlockwise)"), "spiral-anticlockwise" }, { GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE, N_("Spiral (anticlockwise)"), "spiral-anticlockwise" },
{ 0, NULL, NULL } { 0, NULL, NULL }
}; };

View File

@ -167,17 +167,17 @@ GType gimp_gradient_type_get_type (void) G_GNUC_CONST;
typedef enum typedef enum
{ {
GIMP_LINEAR, /*< desc="Linear" >*/ GIMP_GRADIENT_LINEAR, /*< desc="Linear" >*/
GIMP_BILINEAR, /*< desc="Bi-Linear" >*/ GIMP_GRADIENT_BILINEAR, /*< desc="Bi-Linear" >*/
GIMP_RADIAL, /*< desc="Radial" >*/ GIMP_GRADIENT_RADIAL, /*< desc="Radial" >*/
GIMP_SQUARE, /*< desc="Square" >*/ GIMP_GRADIENT_SQUARE, /*< desc="Square" >*/
GIMP_CONICAL_SYMMETRIC, /*< desc="Conical (symmetric)" >*/ GIMP_GRADIENT_CONICAL_SYMMETRIC, /*< desc="Conical (symmetric)" >*/
GIMP_CONICAL_ASYMMETRIC, /*< desc="Conical (asymmetric)" >*/ GIMP_GRADIENT_CONICAL_ASYMMETRIC, /*< desc="Conical (asymmetric)" >*/
GIMP_SHAPEBURST_ANGULAR, /*< desc="Shapeburst (angular)" >*/ GIMP_GRADIENT_SHAPEBURST_ANGULAR, /*< desc="Shapeburst (angular)" >*/
GIMP_SHAPEBURST_SPHERICAL, /*< desc="Shapeburst (spherical)" >*/ GIMP_GRADIENT_SHAPEBURST_SPHERICAL, /*< desc="Shapeburst (spherical)" >*/
GIMP_SHAPEBURST_DIMPLED, /*< desc="Shapeburst (dimpled)" >*/ GIMP_GRADIENT_SHAPEBURST_DIMPLED, /*< desc="Shapeburst (dimpled)" >*/
GIMP_SPIRAL_CLOCKWISE, /*< desc="Spiral (clockwise)" >*/ GIMP_GRADIENT_SPIRAL_CLOCKWISE, /*< desc="Spiral (clockwise)" >*/
GIMP_SPIRAL_ANTICLOCKWISE /*< desc="Spiral (anticlockwise)" >*/ GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE /*< desc="Spiral (anticlockwise)" >*/
} GimpGradientType; } GimpGradientType;

View File

@ -701,54 +701,54 @@ gradient_render_pixel (double x,
switch (rbd->gradient_type) switch (rbd->gradient_type)
{ {
case GIMP_LINEAR: case GIMP_GRADIENT_LINEAR:
factor = gradient_calc_linear_factor (rbd->dist, rbd->vec, rbd->offset, factor = gradient_calc_linear_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy); x - rbd->sx, y - rbd->sy);
break; break;
case GIMP_BILINEAR: case GIMP_GRADIENT_BILINEAR:
factor = gradient_calc_bilinear_factor (rbd->dist, rbd->vec, rbd->offset, factor = gradient_calc_bilinear_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy); x - rbd->sx, y - rbd->sy);
break; break;
case GIMP_RADIAL: case GIMP_GRADIENT_RADIAL:
factor = gradient_calc_radial_factor (rbd->dist, rbd->offset, factor = gradient_calc_radial_factor (rbd->dist, rbd->offset,
x - rbd->sx, y - rbd->sy); x - rbd->sx, y - rbd->sy);
break; break;
case GIMP_SQUARE: case GIMP_GRADIENT_SQUARE:
factor = gradient_calc_square_factor (rbd->dist, rbd->offset, factor = gradient_calc_square_factor (rbd->dist, rbd->offset,
x - rbd->sx, y - rbd->sy); x - rbd->sx, y - rbd->sy);
break; break;
case GIMP_CONICAL_SYMMETRIC: case GIMP_GRADIENT_CONICAL_SYMMETRIC:
factor = gradient_calc_conical_sym_factor (rbd->dist, rbd->vec, rbd->offset, factor = gradient_calc_conical_sym_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy); x - rbd->sx, y - rbd->sy);
break; break;
case GIMP_CONICAL_ASYMMETRIC: case GIMP_GRADIENT_CONICAL_ASYMMETRIC:
factor = gradient_calc_conical_asym_factor (rbd->dist, rbd->vec, rbd->offset, factor = gradient_calc_conical_asym_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy); x - rbd->sx, y - rbd->sy);
break; break;
case GIMP_SHAPEBURST_ANGULAR: case GIMP_GRADIENT_SHAPEBURST_ANGULAR:
factor = gradient_calc_shapeburst_angular_factor (x, y); factor = gradient_calc_shapeburst_angular_factor (x, y);
break; break;
case GIMP_SHAPEBURST_SPHERICAL: case GIMP_GRADIENT_SHAPEBURST_SPHERICAL:
factor = gradient_calc_shapeburst_spherical_factor (x, y); factor = gradient_calc_shapeburst_spherical_factor (x, y);
break; break;
case GIMP_SHAPEBURST_DIMPLED: case GIMP_GRADIENT_SHAPEBURST_DIMPLED:
factor = gradient_calc_shapeburst_dimpled_factor (x, y); factor = gradient_calc_shapeburst_dimpled_factor (x, y);
break; break;
case GIMP_SPIRAL_CLOCKWISE: case GIMP_GRADIENT_SPIRAL_CLOCKWISE:
factor = gradient_calc_spiral_factor (rbd->dist, rbd->vec, rbd->offset, factor = gradient_calc_spiral_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy,TRUE); x - rbd->sx, y - rbd->sy,TRUE);
break; break;
case GIMP_SPIRAL_ANTICLOCKWISE: case GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE:
factor = gradient_calc_spiral_factor (rbd->dist, rbd->vec, rbd->offset, factor = gradient_calc_spiral_factor (rbd->dist, rbd->vec, rbd->offset,
x - rbd->sx, y - rbd->sy,FALSE); x - rbd->sx, y - rbd->sy,FALSE);
break; break;
@ -971,20 +971,20 @@ gradient_fill_region (GimpImage *gimage,
switch (gradient_type) switch (gradient_type)
{ {
case GIMP_RADIAL: case GIMP_GRADIENT_RADIAL:
rbd.dist = sqrt(SQR(ex - sx) + SQR(ey - sy)); rbd.dist = sqrt(SQR(ex - sx) + SQR(ey - sy));
break; break;
case GIMP_SQUARE: case GIMP_GRADIENT_SQUARE:
rbd.dist = MAX (fabs (ex - sx), fabs (ey - sy)); rbd.dist = MAX (fabs (ex - sx), fabs (ey - sy));
break; break;
case GIMP_CONICAL_SYMMETRIC: case GIMP_GRADIENT_CONICAL_SYMMETRIC:
case GIMP_CONICAL_ASYMMETRIC: case GIMP_GRADIENT_CONICAL_ASYMMETRIC:
case GIMP_SPIRAL_CLOCKWISE: case GIMP_GRADIENT_SPIRAL_CLOCKWISE:
case GIMP_SPIRAL_ANTICLOCKWISE: case GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE:
case GIMP_LINEAR: case GIMP_GRADIENT_LINEAR:
case GIMP_BILINEAR: case GIMP_GRADIENT_BILINEAR:
rbd.dist = sqrt (SQR (ex - sx) + SQR (ey - sy)); rbd.dist = sqrt (SQR (ex - sx) + SQR (ey - sy));
if (rbd.dist > 0.0) if (rbd.dist > 0.0)
@ -995,9 +995,9 @@ gradient_fill_region (GimpImage *gimage,
break; break;
case GIMP_SHAPEBURST_ANGULAR: case GIMP_GRADIENT_SHAPEBURST_ANGULAR:
case GIMP_SHAPEBURST_SPHERICAL: case GIMP_GRADIENT_SHAPEBURST_SPHERICAL:
case GIMP_SHAPEBURST_DIMPLED: case GIMP_GRADIENT_SHAPEBURST_DIMPLED:
rbd.dist = sqrt (SQR (ex - sx) + SQR (ey - sy)); rbd.dist = sqrt (SQR (ex - sx) + SQR (ey - sy));
gradient_precalc_shapeburst (gimage, drawable, PR, rbd.dist); gradient_precalc_shapeburst (gimage, drawable, PR, rbd.dist);
break; break;

View File

@ -85,7 +85,7 @@ blend_invoker (Gimp *gimp,
success = FALSE; success = FALSE;
gradient_type = args[3].value.pdb_int; gradient_type = args[3].value.pdb_int;
if (gradient_type < GIMP_LINEAR || gradient_type > GIMP_SPIRAL_ANTICLOCKWISE) if (gradient_type < GIMP_GRADIENT_LINEAR || gradient_type > GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE)
success = FALSE; success = FALSE;
opacity = args[4].value.pdb_float; opacity = args[4].value.pdb_float;
@ -166,7 +166,7 @@ static ProcArg blend_inargs[] =
{ {
GIMP_PDB_INT32, GIMP_PDB_INT32,
"gradient_type", "gradient_type",
"The type of gradient: { GIMP_LINEAR (0), GIMP_BILINEAR (1), GIMP_RADIAL (2), GIMP_SQUARE (3), GIMP_CONICAL_SYMMETRIC (4), GIMP_CONICAL_ASYMMETRIC (5), GIMP_SHAPEBURST_ANGULAR (6), GIMP_SHAPEBURST_SPHERICAL (7), GIMP_SHAPEBURST_DIMPLED (8), GIMP_SPIRAL_CLOCKWISE (9), GIMP_SPIRAL_ANTICLOCKWISE (10) }" "The type of gradient: { GIMP_GRADIENT_LINEAR (0), GIMP_GRADIENT_BILINEAR (1), GIMP_GRADIENT_RADIAL (2), GIMP_GRADIENT_SQUARE (3), GIMP_GRADIENT_CONICAL_SYMMETRIC (4), GIMP_GRADIENT_CONICAL_ASYMMETRIC (5), GIMP_GRADIENT_SHAPEBURST_ANGULAR (6), GIMP_GRADIENT_SHAPEBURST_SPHERICAL (7), GIMP_GRADIENT_SHAPEBURST_DIMPLED (8), GIMP_GRADIENT_SPIRAL_CLOCKWISE (9), GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE (10) }"
}, },
{ {
GIMP_PDB_FLOAT, GIMP_PDB_FLOAT,

View File

@ -118,7 +118,7 @@ gimp_blend_options_class_init (GimpBlendOptionsClass *klass)
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_GRADIENT_TYPE, GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_GRADIENT_TYPE,
"gradient-type", NULL, "gradient-type", NULL,
GIMP_TYPE_GRADIENT_TYPE, GIMP_TYPE_GRADIENT_TYPE,
GIMP_LINEAR, GIMP_GRADIENT_LINEAR,
0); 0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SUPERSAMPLE, GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SUPERSAMPLE,

View File

@ -1,3 +1,7 @@
2003-08-26 Sven Neumann <sven@gimp.org>
* libgimp/tmpl/gimpenums.sgml: updated GimpGradientType.
2003-08-23 Michael Natterer <mitch@gimp.org> 2003-08-23 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/libgimpwidgets.types: added missing * libgimpwidgets/libgimpwidgets.types: added missing

View File

@ -185,17 +185,17 @@ Enums and definitions.
</para> </para>
@GIMP_LINEAR: @GIMP_GRADIENT_LINEAR:
@GIMP_BILINEAR: @GIMP_GRADIENT_BILINEAR:
@GIMP_RADIAL: @GIMP_GRADIENT_RADIAL:
@GIMP_SQUARE: @GIMP_GRADIENT_SQUARE:
@GIMP_CONICAL_SYMMETRIC: @GIMP_GRADIENT_CONICAL_SYMMETRIC:
@GIMP_CONICAL_ASYMMETRIC: @GIMP_GRADIENT_CONICAL_ASYMMETRIC:
@GIMP_SHAPEBURST_ANGULAR: @GIMP_GRADIENT_SHAPEBURST_ANGULAR:
@GIMP_SHAPEBURST_SPHERICAL: @GIMP_GRADIENT_SHAPEBURST_SPHERICAL:
@GIMP_SHAPEBURST_DIMPLED: @GIMP_GRADIENT_SHAPEBURST_DIMPLED:
@GIMP_SPIRAL_CLOCKWISE: @GIMP_GRADIENT_SPIRAL_CLOCKWISE:
@GIMP_SPIRAL_ANTICLOCKWISE: @GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE:
<!-- ##### ENUM GimpHueRange ##### --> <!-- ##### ENUM GimpHueRange ##### -->
<para> <para>

View File

@ -124,6 +124,21 @@ enum
GIMP_UNKNOWN = GIMP_ORIENTATION_UNKNOWN GIMP_UNKNOWN = GIMP_ORIENTATION_UNKNOWN
}; };
enum
{
GIMP_LINEAR = GIMP_GRADIENT_LINEAR,
GIMP_BILNEAR = GIMP_GRADIENT_BILINEAR,
GIMP_RADIAL = GIMP_GRADIENT_RADIAL,
GIMP_SQUARE = GIMP_GRADIENT_SQUARE,
GIMP_CONICAL_SYMMETRIC = GIMP_GRADIENT_CONICAL_SYMMETRIC,
GIMP_CONICAL_ASYMMETRIC = GIMP_GRADIENT_CONICAL_ASYMMETRIC,
GIMP_SHAPEBURST_ANGULAR = GIMP_GRADIENT_SHAPEBURST_ANGULAR,
GIMP_SHAPEBURST_SPHERICAL = GIMP_GRADIENT_SHAPEBURST_SPHERICAL,
GIMP_SHAPEBURST_DIMPLED = GIMP_GRADIENT_SHAPEBURST_DIMPLED,
GIMP_SPIRAL_CLOCKWISE = GIMP_GRADIENT_SPIRAL_CLOCKWISE,
GIMP_SPIRAL_ANTICLOCKWISE = GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE
};
G_END_DECLS G_END_DECLS
#endif /* __GIMP_COMPAT_H__ */ #endif /* __GIMP_COMPAT_H__ */

View File

@ -134,17 +134,17 @@ typedef enum
typedef enum typedef enum
{ {
GIMP_LINEAR, GIMP_GRADIENT_LINEAR,
GIMP_BILINEAR, GIMP_GRADIENT_BILINEAR,
GIMP_RADIAL, GIMP_GRADIENT_RADIAL,
GIMP_SQUARE, GIMP_GRADIENT_SQUARE,
GIMP_CONICAL_SYMMETRIC, GIMP_GRADIENT_CONICAL_SYMMETRIC,
GIMP_CONICAL_ASYMMETRIC, GIMP_GRADIENT_CONICAL_ASYMMETRIC,
GIMP_SHAPEBURST_ANGULAR, GIMP_GRADIENT_SHAPEBURST_ANGULAR,
GIMP_SHAPEBURST_SPHERICAL, GIMP_GRADIENT_SHAPEBURST_SPHERICAL,
GIMP_SHAPEBURST_DIMPLED, GIMP_GRADIENT_SHAPEBURST_DIMPLED,
GIMP_SPIRAL_CLOCKWISE, GIMP_GRADIENT_SPIRAL_CLOCKWISE,
GIMP_SPIRAL_ANTICLOCKWISE GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE
} GimpGradientType; } GimpGradientType;
typedef enum typedef enum

View File

@ -114,17 +114,17 @@ TRANSPARENT_FILL = 3
NO_FILL = 4 NO_FILL = 4
# GimpGradientType # GimpGradientType
LINEAR = 0 GRADIENT_LINEAR = 0
BILINEAR = 1 GRADIENT_BILINEAR = 1
RADIAL = 2 GRADIENT_RADIAL = 2
SQUARE = 3 GRADIENT_SQUARE = 3
CONICAL_SYMMETRIC = 4 GRADIENT_CONICAL_SYMMETRIC = 4
CONICAL_ASYMMETRIC = 5 GRADIENT_CONICAL_ASYMMETRIC = 5
SHAPEBURST_ANGULAR = 6 GRADIENT_SHAPEBURST_ANGULAR = 6
SHAPEBURST_SPHERICAL = 7 GRADIENT_SHAPEBURST_SPHERICAL = 7
SHAPEBURST_DIMPLED = 8 GRADIENT_SHAPEBURST_DIMPLED = 8
SPIRAL_CLOCKWISE = 9 GRADIENT_SPIRAL_CLOCKWISE = 9
SPIRAL_ANTICLOCKWISE = 10 GRADIENT_SPIRAL_ANTICLOCKWISE = 10
# GimpHueRange # GimpHueRange
ALL_HUES = 0 ALL_HUES = 0

View File

@ -57,7 +57,7 @@ def python_sphere(radius, light, shadow, bg_colour, sphere_colour):
MULTIPLY_MODE, 100, 0, FALSE, 0, 0) MULTIPLY_MODE, 100, 0, FALSE, 0, 0)
pdb.gimp_ellipse_select(img, cx - radius, cy - radius, 2 * radius, pdb.gimp_ellipse_select(img, cx - radius, cy - radius, 2 * radius,
2 * radius, CHANNEL_OP_REPLACE, TRUE, FALSE, 0) 2 * radius, CHANNEL_OP_REPLACE, TRUE, FALSE, 0)
pdb.gimp_blend(drawable, FG_BG_RGB_MODE, NORMAL_MODE, RADIAL, pdb.gimp_blend(drawable, FG_BG_RGB_MODE, NORMAL_MODE, GRADIENT_RADIAL,
100, offset, REPEAT_NONE, FALSE, FALSE, 0, 0, TRUE, 100, offset, REPEAT_NONE, FALSE, FALSE, 0, 0, TRUE,
light_x, light_y, light_end_x, light_end_y) light_x, light_y, light_end_x, light_end_y)
pdb.gimp_selection_none(img) pdb.gimp_selection_none(img)

View File

@ -55,20 +55,20 @@ siod_get_output_file (void)
return siod_output; return siod_output;
} }
void void
siod_set_output_file (FILE *file) siod_set_output_file (FILE *file)
{ {
siod_output = file; siod_output = file;
} }
int int
siod_get_verbose_level (void) siod_get_verbose_level (void)
{ {
return siod_verbose_level; return siod_verbose_level;
} }
void void
siod_set_verbose_level (gint verbose_level) siod_set_verbose_level (gint verbose_level)
{ {
siod_verbose_level = verbose_level; siod_verbose_level = verbose_level;
@ -107,7 +107,7 @@ static void init_procedures (void);
static gboolean register_scripts = FALSE; static gboolean register_scripts = FALSE;
void void
siod_init (gboolean local_register_scripts) siod_init (gboolean local_register_scripts)
{ {
char *siod_argv[] = char *siod_argv[] =
@ -147,10 +147,10 @@ static LISP script_fu_quit_call (LISP a);
/********* /*********
Below can be found the functions responsible for registering the gimp functions Below can be found the functions responsible for registering the gimp functions
and types against the scheme interpreter. and types against the scheme interpreter.
********/ ********/
@ -178,7 +178,7 @@ init_procedures (void)
init_lsubr ("script-fu-register", script_fu_register_call); init_lsubr ("script-fu-register", script_fu_register_call);
init_lsubr ("script-fu-quit", script_fu_quit_call); init_lsubr ("script-fu-quit", script_fu_quit_call);
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*", gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list); &num_procs, &proc_list);
/* Register each procedure as a scheme func */ /* Register each procedure as a scheme func */
@ -187,13 +187,13 @@ init_procedures (void)
proc_name = g_strdup (proc_list[i]); proc_name = g_strdup (proc_list[i]);
/* lookup the procedure */ /* lookup the procedure */
if (gimp_procedural_db_proc_info (proc_name, if (gimp_procedural_db_proc_info (proc_name,
&proc_blurb, &proc_blurb,
&proc_help, &proc_help,
&proc_author, &proc_author,
&proc_copyright, &proc_copyright,
&proc_date, &proc_date,
&proc_type, &proc_type,
&nparams, &nreturn_vals, &nparams, &nreturn_vals,
&params, &return_vals)) &params, &return_vals))
{ {
@ -221,8 +221,8 @@ init_procedures (void)
args = cons (cintern (proc_name), args); args = cons (cintern (proc_name), args);
/* set the acture pdb procedure name */ /* set the acture pdb procedure name */
code = cons (cons (cintern ("quote"), code = cons (cons (cintern ("quote"),
cons (cintern (proc_list[i]), NIL)), cons (cintern (proc_list[i]), NIL)),
code); code);
code = cons (cintern ("gimp-proc-db-call"), code); code = cons (cintern ("gimp-proc-db-call"), code);
@ -247,17 +247,17 @@ init_constants (void)
{ {
gchar *gimp_plugin_dir; gchar *gimp_plugin_dir;
setvar (cintern ("gimp-data-dir"), setvar (cintern ("gimp-data-dir"),
strcons (-1, (gchar *) gimp_data_directory ()), NIL); strcons (-1, (gchar *) gimp_data_directory ()), NIL);
gimp_plugin_dir = gimp_gimprc_query ("gimp_plugin_dir"); gimp_plugin_dir = gimp_gimprc_query ("gimp_plugin_dir");
if (gimp_plugin_dir) if (gimp_plugin_dir)
{ {
setvar (cintern ("gimp-plugin-dir"), setvar (cintern ("gimp-plugin-dir"),
strcons (-1, gimp_plugin_dir), NIL); strcons (-1, gimp_plugin_dir), NIL);
g_free (gimp_plugin_dir); g_free (gimp_plugin_dir);
} }
/* Generated constants */ /* Generated constants */
init_generated_constants (); init_generated_constants ();
@ -322,6 +322,18 @@ init_constants (void)
setvar (cintern ("VERTICAL"), flocons (GIMP_ORIENTATION_VERTICAL), NIL); setvar (cintern ("VERTICAL"), flocons (GIMP_ORIENTATION_VERTICAL), NIL);
setvar (cintern ("UNKNOWN"), flocons (GIMP_ORIENTATION_UNKNOWN), NIL); setvar (cintern ("UNKNOWN"), flocons (GIMP_ORIENTATION_UNKNOWN), NIL);
setvar (cintern ("LINEAR"), flocons (GIMP_GRADIENT_LINEAR), NIL);
setvar (cintern ("BILINEAR"), flocons (GIMP_GRADIENT_BILINEAR), NIL);
setvar (cintern ("RADIAL"), flocons (GIMP_GRADIENT_RADIAL), NIL);
setvar (cintern ("SQUARE"), flocons (GIMP_GRADIENT_SQUARE), NIL);
setvar (cintern ("CONICAL-SYMMETRIC"), flocons (GIMP_GRADIENT_CONICAL_SYMMETRIC), NIL);
setvar (cintern ("CONICAL-ASYMMETRIC"), flocons (GIMP_GRADIENT_CONICAL_ASYMMETRIC), NIL);
setvar (cintern ("SHAPEBURST-ANGULAR"), flocons (GIMP_GRADIENT_SHAPEBURST_ANGULAR), NIL);
setvar (cintern ("SHAPEBURST-SPHERICAL"), flocons (GIMP_GRADIENT_SHAPEBURST_SPHERICAL), NIL);
setvar (cintern ("SHAPEBURST-DIMPLED"), flocons (GIMP_GRADIENT_SHAPEBURST_DIMPLED), NIL);
setvar (cintern ("SPIRAL-CLOCKWISE"), flocons (GIMP_GRADIENT_SPIRAL_CLOCKWISE), NIL);
setvar (cintern ("SPIRAL-ANTICLOCKWISE"), flocons (GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE), NIL);
/* Useful misc stuff */ /* Useful misc stuff */
setvar (cintern ("TRUE"), flocons (TRUE), NIL); setvar (cintern ("TRUE"), flocons (TRUE), NIL);
setvar (cintern ("FALSE"), flocons (FALSE), NIL); setvar (cintern ("FALSE"), flocons (FALSE), NIL);
@ -420,7 +432,7 @@ marshall_proc_db_call (LISP a)
"The procedure to be executed and the arguments it requires " "The procedure to be executed and the arguments it requires "
"(possibly none) must be specified.", NIL); "(possibly none) must be specified.", NIL);
/* Derive the pdb procedure name from the argument /* Derive the pdb procedure name from the argument
or first argument of a list */ or first argument of a list */
if (TYPEP (a, tc_cons)) if (TYPEP (a, tc_cons))
proc_name = get_c_string (car (a)); proc_name = get_c_string (car (a));
@ -431,9 +443,9 @@ marshall_proc_db_call (LISP a)
script_fu_report_cc (proc_name); script_fu_report_cc (proc_name);
/* Attempt to fetch the procedure from the database */ /* Attempt to fetch the procedure from the database */
if (! gimp_procedural_db_proc_info (proc_name, if (! gimp_procedural_db_proc_info (proc_name,
&proc_blurb, &proc_blurb,
&proc_help, &proc_help,
&proc_author, &proc_author,
&proc_copyright, &proc_copyright,
&proc_date, &proc_date,
@ -457,7 +469,7 @@ marshall_proc_db_call (LISP a)
/* Check the supplied number of arguments */ /* Check the supplied number of arguments */
if ((nlength (a) - 1) != nparams) if ((nlength (a) - 1) != nparams)
{ {
g_snprintf (error_str, sizeof (error_str), g_snprintf (error_str, sizeof (error_str),
"Invalid arguments supplied to %s--(# args: %ld, expecting: %d)", "Invalid arguments supplied to %s--(# args: %ld, expecting: %d)",
proc_name, (nlength (a) - 1), nparams); proc_name, (nlength (a) - 1), nparams);
return my_err (error_str, NIL); return my_err (error_str, NIL);
@ -530,7 +542,7 @@ marshall_proc_db_call (LISP a)
if (success) if (success)
{ {
args[i].type = GIMP_PDB_INT32ARRAY; args[i].type = GIMP_PDB_INT32ARRAY;
args[i].data.d_int32array = args[i].data.d_int32array =
(gint32*) (car (a))->storage_as.long_array.data; (gint32*) (car (a))->storage_as.long_array.data;
} }
break; break;
@ -541,7 +553,7 @@ marshall_proc_db_call (LISP a)
if (success) if (success)
{ {
args[i].type = GIMP_PDB_INT16ARRAY; args[i].type = GIMP_PDB_INT16ARRAY;
args[i].data.d_int16array = args[i].data.d_int16array =
(gint16*) (car (a))->storage_as.long_array.data; (gint16*) (car (a))->storage_as.long_array.data;
} }
break; break;
@ -552,7 +564,7 @@ marshall_proc_db_call (LISP a)
if (success) if (success)
{ {
args[i].type = GIMP_PDB_INT8ARRAY; args[i].type = GIMP_PDB_INT8ARRAY;
args[i].data.d_int8array = args[i].data.d_int8array =
(gint8*) (car (a))->storage_as.string.data; (gint8*) (car (a))->storage_as.string.data;
} }
break; break;
@ -563,7 +575,7 @@ marshall_proc_db_call (LISP a)
if (success) if (success)
{ {
args[i].type = GIMP_PDB_FLOATARRAY; args[i].type = GIMP_PDB_FLOATARRAY;
args[i].data.d_floatarray = args[i].data.d_floatarray =
(car (a))->storage_as.double_array.data; (car (a))->storage_as.double_array.data;
} }
break; break;
@ -586,7 +598,7 @@ marshall_proc_db_call (LISP a)
num_strings = args[i - 1].data.d_int32; num_strings = args[i - 1].data.d_int32;
if (nlength (list) != num_strings) if (nlength (list) != num_strings)
return my_err ("String array argument has incorrectly specified length", NIL); return my_err ("String array argument has incorrectly specified length", NIL);
array = args[i].data.d_stringarray = array = args[i].data.d_stringarray =
g_new (char *, num_strings); g_new (char *, num_strings);
for (j = 0; j < num_strings; j++) for (j = 0; j < num_strings; j++)
@ -619,7 +631,7 @@ marshall_proc_db_call (LISP a)
break; break;
case GIMP_PDB_REGION: case GIMP_PDB_REGION:
return my_err ("Regions are currently unsupported as arguments", return my_err ("Regions are currently unsupported as arguments",
car (a)); car (a));
break; break;
@ -684,12 +696,12 @@ marshall_proc_db_call (LISP a)
break; break;
case GIMP_PDB_BOUNDARY: case GIMP_PDB_BOUNDARY:
return my_err ("Boundaries are currently unsupported as arguments", return my_err ("Boundaries are currently unsupported as arguments",
car (a)); car (a));
break; break;
case GIMP_PDB_PATH: case GIMP_PDB_PATH:
return my_err ("Paths are currently unsupported as arguments", return my_err ("Paths are currently unsupported as arguments",
car (a)); car (a));
break; break;
@ -701,9 +713,9 @@ marshall_proc_db_call (LISP a)
args[i].type = GIMP_PDB_PARASITE; args[i].type = GIMP_PDB_PARASITE;
/* parasite->name */ /* parasite->name */
intermediate_val = car (a); intermediate_val = car (a);
args[i].data.d_parasite.name = args[i].data.d_parasite.name =
get_c_string (car (intermediate_val)); get_c_string (car (intermediate_val));
/* parasite->flags */ /* parasite->flags */
intermediate_val = cdr (intermediate_val); intermediate_val = cdr (intermediate_val);
args[i].data.d_parasite.flags = get_c_long (car(intermediate_val)); args[i].data.d_parasite.flags = get_c_long (car(intermediate_val));
@ -740,7 +752,7 @@ marshall_proc_db_call (LISP a)
{ {
strcpy (error_str, "Procedural database execution did not return a status:\n "); strcpy (error_str, "Procedural database execution did not return a status:\n ");
lprin1s (a_saved, error_str + strlen(error_str)); lprin1s (a_saved, error_str + strlen(error_str));
return my_err (error_str, NIL); return my_err (error_str, NIL);
} }
@ -766,22 +778,22 @@ marshall_proc_db_call (LISP a)
switch (return_vals[i].type) switch (return_vals[i].type)
{ {
case GIMP_PDB_INT32: case GIMP_PDB_INT32:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_INT16: case GIMP_PDB_INT16:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_INT8: case GIMP_PDB_INT8:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_FLOAT: case GIMP_PDB_FLOAT:
return_val = cons (flocons (values[i + 1].data.d_float), return_val = cons (flocons (values[i + 1].data.d_float),
return_val); return_val);
break; break;
@ -799,7 +811,7 @@ marshall_proc_db_call (LISP a)
array = arcons (tc_long_array, values[i].data.d_int32, 0); array = arcons (tc_long_array, values[i].data.d_int32, 0);
for (j = 0; j < values[i].data.d_int32; j++) for (j = 0; j < values[i].data.d_int32; j++)
{ {
array->storage_as.long_array.data[j] = array->storage_as.long_array.data[j] =
values[i + 1].data.d_int32array[j]; values[i + 1].data.d_int32array[j];
} }
return_val = cons (array, return_val); return_val = cons (array, return_val);
@ -818,7 +830,7 @@ marshall_proc_db_call (LISP a)
array = arcons (tc_byte_array, values[i].data.d_int32, 0); array = arcons (tc_byte_array, values[i].data.d_int32, 0);
for (j = 0; j < values[i].data.d_int32; j++) for (j = 0; j < values[i].data.d_int32; j++)
{ {
array->storage_as.string.data[j] = array->storage_as.string.data[j] =
values[i + 1].data.d_int8array[j]; values[i + 1].data.d_int8array[j];
} }
return_val = cons (array, return_val); return_val = cons (array, return_val);
@ -833,7 +845,7 @@ marshall_proc_db_call (LISP a)
array = arcons (tc_double_array, values[i].data.d_int32, 0); array = arcons (tc_double_array, values[i].data.d_int32, 0);
for (j = 0; j < values[i].data.d_int32; j++) for (j = 0; j < values[i].data.d_int32; j++)
{ {
array->storage_as.double_array.data[j] = array->storage_as.double_array.data[j] =
values[i + 1].data.d_floatarray[j]; values[i + 1].data.d_floatarray[j];
} }
return_val = cons (array, return_val); return_val = cons (array, return_val);
@ -853,7 +865,7 @@ marshall_proc_db_call (LISP a)
for (j = 0; j < num_strings; j++) for (j = 0; j < num_strings; j++)
{ {
string_len = strlen (array[j]); string_len = strlen (array[j]);
string_array = cons (strcons (string_len, array[j]), string_array = cons (strcons (string_len, array[j]),
string_array); string_array);
} }
@ -880,32 +892,32 @@ marshall_proc_db_call (LISP a)
break; break;
case GIMP_PDB_DISPLAY: case GIMP_PDB_DISPLAY:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_IMAGE: case GIMP_PDB_IMAGE:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_LAYER: case GIMP_PDB_LAYER:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_CHANNEL: case GIMP_PDB_CHANNEL:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_DRAWABLE: case GIMP_PDB_DRAWABLE:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_SELECTION: case GIMP_PDB_SELECTION:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
@ -930,15 +942,15 @@ marshall_proc_db_call (LISP a)
string_len = strlen (values[i + 1].data.d_parasite.name); string_len = strlen (values[i + 1].data.d_parasite.name);
name = strcons (string_len, name = strcons (string_len,
values[i + 1].data.d_parasite.name); values[i + 1].data.d_parasite.name);
flags = flocons (values[i + 1].data.d_parasite.flags); flags = flocons (values[i + 1].data.d_parasite.flags);
data = arcons (tc_byte_array, data = arcons (tc_byte_array,
values[i+1].data.d_parasite.size, 0); values[i+1].data.d_parasite.size, 0);
memcpy(data->storage_as.string.data, memcpy(data->storage_as.string.data,
values[i+1].data.d_parasite.data, values[i+1].data.d_parasite.data,
values[i+1].data.d_parasite.size); values[i+1].data.d_parasite.size);
intermediate_val = cons (name, intermediate_val = cons (name,
cons(flags, cons(data, NIL))); cons(flags, cons(data, NIL)));
return_val = cons (intermediate_val, return_val); return_val = cons (intermediate_val, return_val);
} }

View File

@ -89,17 +89,17 @@ init_generated_constants (void)
setvar (cintern ("TRANSPARENT-FILL"), flocons (3), NIL); setvar (cintern ("TRANSPARENT-FILL"), flocons (3), NIL);
setvar (cintern ("NO-FILL"), flocons (4), NIL); setvar (cintern ("NO-FILL"), flocons (4), NIL);
setvar (cintern ("LINEAR"), flocons (0), NIL); setvar (cintern ("GRADIENT-LINEAR"), flocons (0), NIL);
setvar (cintern ("BILINEAR"), flocons (1), NIL); setvar (cintern ("GRADIENT-BILINEAR"), flocons (1), NIL);
setvar (cintern ("RADIAL"), flocons (2), NIL); setvar (cintern ("GRADIENT-RADIAL"), flocons (2), NIL);
setvar (cintern ("SQUARE"), flocons (3), NIL); setvar (cintern ("GRADIENT-SQUARE"), flocons (3), NIL);
setvar (cintern ("CONICAL-SYMMETRIC"), flocons (4), NIL); setvar (cintern ("GRADIENT-CONICAL-SYMMETRIC"), flocons (4), NIL);
setvar (cintern ("CONICAL-ASYMMETRIC"), flocons (5), NIL); setvar (cintern ("GRADIENT-CONICAL-ASYMMETRIC"), flocons (5), NIL);
setvar (cintern ("SHAPEBURST-ANGULAR"), flocons (6), NIL); setvar (cintern ("GRADIENT-SHAPEBURST-ANGULAR"), flocons (6), NIL);
setvar (cintern ("SHAPEBURST-SPHERICAL"), flocons (7), NIL); setvar (cintern ("GRADIENT-SHAPEBURST-SPHERICAL"), flocons (7), NIL);
setvar (cintern ("SHAPEBURST-DIMPLED"), flocons (8), NIL); setvar (cintern ("GRADIENT-SHAPEBURST-DIMPLED"), flocons (8), NIL);
setvar (cintern ("SPIRAL-CLOCKWISE"), flocons (9), NIL); setvar (cintern ("GRADIENT-SPIRAL-CLOCKWISE"), flocons (9), NIL);
setvar (cintern ("SPIRAL-ANTICLOCKWISE"), flocons (10), NIL); setvar (cintern ("GRADIENT-SPIRAL-ANTICLOCKWISE"), flocons (10), NIL);
setvar (cintern ("ALL-HUES"), flocons (0), NIL); setvar (cintern ("ALL-HUES"), flocons (0), NIL);
setvar (cintern ("RED-HUES"), flocons (1), NIL); setvar (cintern ("RED-HUES"), flocons (1), NIL);

View File

@ -102,7 +102,7 @@
SUB TRUE FALSE 0) SUB TRUE FALSE 0)
(gimp-blend temp-draw FG-BG-RGB NORMAL (gimp-blend temp-draw FG-BG-RGB NORMAL
SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
supersample 3 .2 TRUE supersample 3 .2 TRUE
size size (* size 2) (/ size 2)) size size (* size 2) (/ size 2))
@ -119,7 +119,7 @@
;(gimp-edit-fill temp-img temp-draw2 BG-IMAGE-FILL) ;(gimp-edit-fill temp-img temp-draw2 BG-IMAGE-FILL)
(gimp-blend temp-draw2 FG-BG-RGB NORMAL (gimp-blend temp-draw2 FG-BG-RGB NORMAL
SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
supersample 3 .2 TRUE supersample 3 .2 TRUE
size size (* size 2) (* size 2)) size size (* size 2) (* size 2))

View File

@ -101,7 +101,7 @@
(gimp-palette-set-background '(0 0 0)) (gimp-palette-set-background '(0 0 0))
(gimp-blend ruler-layer FG-BG-RGB NORMAL (gimp-blend ruler-layer FG-BG-RGB NORMAL
SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 size size) 0 0 size size)

View File

@ -49,7 +49,7 @@
(gimp-palette-set-background '(0 0 0)) (gimp-palette-set-background '(0 0 0))
(gimp-blend ruler-layer FG-BG-RGB NORMAL (gimp-blend ruler-layer FG-BG-RGB NORMAL
SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 height height) 0 0 height height)

View File

@ -67,7 +67,7 @@
(gimp-palette-set-background '(0 0 0)) (gimp-palette-set-background '(0 0 0))
(gimp-blend bullet-layer FG-BG-RGB NORMAL (gimp-blend bullet-layer FG-BG-RGB NORMAL
RADIAL 100 0 REPEAT-NONE FALSE GRADIENT-RADIAL 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
blend-start blend-start blend-start blend-start
(+ half-radius radius) (+ half-radius radius)) (+ half-radius radius) (+ half-radius radius))

View File

@ -42,7 +42,7 @@
x2 x2
y2) y2)
(gimp-blend drawable FG-BG-RGB DARKEN-ONLY (gimp-blend drawable FG-BG-RGB DARKEN-ONLY
LINEAR 100 0 REPEAT-NONE FALSE GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
x1 y1 x2 y2)) x1 y1 x2 y2))
@ -97,7 +97,7 @@
(gimp-palette-set-background '(0 0 0)) (gimp-palette-set-background '(0 0 0))
(gimp-blend button-layer FG-BG-RGB NORMAL (gimp-blend button-layer FG-BG-RGB NORMAL
SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 img-height img-width) 0 0 img-height img-width)

View File

@ -34,7 +34,7 @@
(gimp-palette-set-foreground '(79 79 79)) (gimp-palette-set-foreground '(79 79 79))
(gimp-blend logo-layer FG-BG-RGB NORMAL (gimp-blend logo-layer FG-BG-RGB NORMAL
SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 1 1) 0 0 1 1)

View File

@ -30,7 +30,7 @@
(gimp-palette-set-foreground '(255 255 255)) (gimp-palette-set-foreground '(255 255 255))
(gimp-blend logo-layer FG-BG-RGB MULTIPLY (gimp-blend logo-layer FG-BG-RGB MULTIPLY
RADIAL 100 20 REPEAT-NONE FALSE GRADIENT-RADIAL 100 20 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 width height) 0 0 width height)

View File

@ -47,7 +47,7 @@
(gimp-palette-set-foreground '(255 255 255)) (gimp-palette-set-foreground '(255 255 255))
(gimp-blend logo-layer FG-BG-RGB MULTIPLY (gimp-blend logo-layer FG-BG-RGB MULTIPLY
RADIAL 100 20 REPEAT-NONE FALSE GRADIENT-RADIAL 100 20 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 width height) 0 0 width height)

View File

@ -45,7 +45,7 @@
x2 x2
y2) y2)
(gimp-blend drawable FG-BG-RGB DARKEN-ONLY (gimp-blend drawable FG-BG-RGB DARKEN-ONLY
LINEAR 100 0 REPEAT-NONE FALSE GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
x1 y1 x2 y2)) x1 y1 x2 y2))
@ -108,7 +108,7 @@
(gimp-palette-set-background lr-color) (gimp-palette-set-background lr-color)
(gimp-blend gradient FG-BG-RGB NORMAL (gimp-blend gradient FG-BG-RGB NORMAL
LINEAR 100 0 REPEAT-NONE FALSE GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 (- img-width 1) (- img-height 1)) 0 0 (- img-width 1) (- img-height 1))

View File

@ -60,7 +60,7 @@
(gimp-palette-set-foreground '(255 255 255)) (gimp-palette-set-foreground '(255 255 255))
(gimp-blend text-shadow-layer FG-BG-RGB NORMAL (gimp-blend text-shadow-layer FG-BG-RGB NORMAL
SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 1 1) 0 0 1 1)
@ -70,7 +70,7 @@
(gimp-gradients-set-gradient blend-gradient) (gimp-gradients-set-gradient blend-gradient)
(gimp-blend blend-layer blend-mode NORMAL (gimp-blend blend-layer blend-mode NORMAL
LINEAR 100 0 REPEAT-NONE blend-gradient-reverse GRADIENT-LINEAR 100 0 REPEAT-NONE blend-gradient-reverse
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 width 0) 0 0 width 0)

View File

@ -94,7 +94,7 @@
(begin (begin
; blend with 20% offset to get less transparency in the front ; blend with 20% offset to get less transparency in the front
(gimp-blend bl-mask FG-BG-RGB NORMAL-MODE (gimp-blend bl-mask FG-BG-RGB NORMAL-MODE
LINEAR 100 20 REPEAT-NONE FALSE GRADIENT-LINEAR 100 20 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
(+ bl-x-off bl-width) 0 bl-x-off 0))) (+ bl-x-off bl-width) 0 bl-x-off 0)))
@ -116,7 +116,7 @@
;--- blend glow color inside the letters ;--- blend glow color inside the letters
(gimp-palette-set-foreground glow-color) (gimp-palette-set-foreground glow-color)
(gimp-blend bl-layer FG-TRANS NORMAL-MODE (gimp-blend bl-layer FG-TRANS NORMAL-MODE
LINEAR 100 0 REPEAT-NONE FALSE GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
(+ bl-x-off bl-width) 0 (+ bl-x-off bl-width) 0
(- (+ bl-x-off bl-width) after-glow) 0) (- (+ bl-x-off bl-width) after-glow) 0)
@ -129,7 +129,7 @@
(gimp-selection-feather img corona-width) (gimp-selection-feather img corona-width)
(gimp-palette-set-foreground glow-color) (gimp-palette-set-foreground glow-color)
(gimp-blend bl-layer FG-TRANS NORMAL-MODE (gimp-blend bl-layer FG-TRANS NORMAL-MODE
LINEAR 100 0 REPEAT-NONE FALSE GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
(- (+ bl-x-off bl-width) corona-width) 0 (- (+ bl-x-off bl-width) corona-width) 0
(- (+ bl-x-off bl-width) after-glow) 0))) (- (+ bl-x-off bl-width) after-glow) 0)))

View File

@ -54,7 +54,7 @@
(gimp-gradients-set-gradient "Coffee") (gimp-gradients-set-gradient "Coffee")
(gimp-blend theStain CUSTOM NORMAL (gimp-blend theStain CUSTOM NORMAL
SHAPEBURST-DIMPLED 100 0 REPEAT-NONE FALSE GRADIENT-SHAPEBURST-DIMPLED 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 0 0) 0 0 0 0)

View File

@ -75,7 +75,7 @@
(gimp-selection-all img) (gimp-selection-all img)
(gimp-blend logo-layer CUSTOM NORMAL (gimp-blend logo-layer CUSTOM NORMAL
LINEAR 100 0 REPEAT-NONE gradient-reverse GRADIENT-LINEAR 100 0 REPEAT-NONE gradient-reverse
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 (* height 0.33333) 0 (* height 0.83333)) 0 (* height 0.33333) 0 (* height 0.83333))

View File

@ -48,7 +48,7 @@
(gimp-gradients-set-gradient gradient) (gimp-gradients-set-gradient gradient)
(gimp-blend logo-layer CUSTOM NORMAL (gimp-blend logo-layer CUSTOM NORMAL
LINEAR 100 0 REPEAT-NONE gradient-reverse GRADIENT-LINEAR 100 0 REPEAT-NONE gradient-reverse
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 0 (+ height 5)) 0 0 0 (+ height 5))
@ -96,7 +96,7 @@
(gimp-palette-set-foreground '(255 255 255)) (gimp-palette-set-foreground '(255 255 255))
(gimp-palette-set-background '(0 0 0)) (gimp-palette-set-background '(0 0 0))
(gimp-blend layer-mask FG-BG-RGB NORMAL (gimp-blend layer-mask FG-BG-RGB NORMAL
LINEAR 100 0 REPEAT-NONE FALSE GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 (- (/ height 2)) 0 height) 0 (- (/ height 2)) 0 height)

View File

@ -81,7 +81,7 @@
(gimp-gradients-set-gradient blend-gradient-text) (gimp-gradients-set-gradient blend-gradient-text)
(gimp-blend logo-layer CUSTOM NORMAL (gimp-blend logo-layer CUSTOM NORMAL
LINEAR 100 0 REPEAT-NONE blend-gradient-text-reverse GRADIENT-LINEAR 100 0 REPEAT-NONE blend-gradient-text-reverse
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 0 (+ height 5)))) 0 0 0 (+ height 5))))
@ -106,7 +106,7 @@
(gimp-gradients-set-gradient blend-gradient-outline) (gimp-gradients-set-gradient blend-gradient-outline)
(gimp-blend grow-me CUSTOM NORMAL (gimp-blend grow-me CUSTOM NORMAL
LINEAR 100 0 REPEAT-NONE blend-gradient-outline-reverse GRADIENT-LINEAR 100 0 REPEAT-NONE blend-gradient-outline-reverse
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 0 (+ height 5)))) 0 0 0 (+ height 5))))

View File

@ -60,7 +60,7 @@
(gimp-selection-all img) (gimp-selection-all img)
(gimp-blend logo-layer FG-BG-RGB NORMAL (gimp-blend logo-layer FG-BG-RGB NORMAL
RADIAL 95 0 REPEAT-NONE FALSE GRADIENT-RADIAL 95 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
indentX indentY indentX (- height indentY)) indentX indentY indentX (- height indentY))

View File

@ -48,7 +48,7 @@
; Render gradient ; Render gradient
(gimp-blend drawable CUSTOM NORMAL (gimp-blend drawable CUSTOM NORMAL
LINEAR 100 0 REPEAT-NONE gradient-reverse GRADIENT-LINEAR 100 0 REPEAT-NONE gradient-reverse
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 (- width 1) 0) 0 0 (- width 1) 0)

View File

@ -141,7 +141,7 @@
(gimp-palette-set-background lr-color) (gimp-palette-set-background lr-color)
(gimp-blend gradient FG-BG-RGB NORMAL (gimp-blend gradient FG-BG-RGB NORMAL
LINEAR 100 0 REPEAT-NONE FALSE GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 0 (- height 1)) 0 0 0 (- height 1))

View File

@ -57,7 +57,7 @@
(gimp-image-add-layer-mask theImage thinLayer theMask) (gimp-image-add-layer-mask theImage thinLayer theMask)
(gimp-blend theMask FG-BG-RGB NORMAL (gimp-blend theMask FG-BG-RGB NORMAL
LINEAR 100 0 REPEAT-TRIANGULAR FALSE GRADIENT-LINEAR 100 0 REPEAT-TRIANGULAR FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 0 (/ theHeight 2))) 0 0 0 (/ theHeight 2)))

View File

@ -54,7 +54,7 @@
(* 2 radius) (* 2 radius) REPLACE TRUE FALSE 0) (* 2 radius) (* 2 radius) REPLACE TRUE FALSE 0)
(gimp-blend drawable FG-BG-RGB NORMAL (gimp-blend drawable FG-BG-RGB NORMAL
RADIAL 100 offset REPEAT-NONE FALSE GRADIENT-RADIAL 100 offset REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
light-x light-y light-end-x light-end-y) light-x light-y light-end-x light-end-y)

View File

@ -95,7 +95,7 @@
(gimp-palette-set-foreground '(255 255 255)) (gimp-palette-set-foreground '(255 255 255))
(gimp-blend logo-layer FG-BG-RGB NORMAL (gimp-blend logo-layer FG-BG-RGB NORMAL
BILINEAR 100 0 REPEAT-NONE FALSE GRADIENT-BILINEAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
cx cy bx by) cx cy bx by)

View File

@ -176,7 +176,7 @@
(* 2 radius) (* 2 radius) REPLACE TRUE FALSE 0) (* 2 radius) (* 2 radius) REPLACE TRUE FALSE 0)
(gimp-blend drawable FG-BG-RGB NORMAL (gimp-blend drawable FG-BG-RGB NORMAL
RADIAL 100 offset REPEAT-NONE FALSE GRADIENT-RADIAL 100 offset REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
light-x light-y light-end-x light-end-y) light-x light-y light-end-x light-end-y)
@ -186,7 +186,7 @@
(gimp-ellipse-select img 10 10 50 50 REPLACE TRUE FALSE 0) (gimp-ellipse-select img 10 10 50 50 REPLACE TRUE FALSE 0)
(gimp-blend drawable CUSTOM NORMAL (gimp-blend drawable CUSTOM NORMAL
LINEAR 100 offset REPEAT-NONE gradient-reverse GRADIENT-LINEAR 100 offset REPEAT-NONE gradient-reverse
FALSE 0 0 TRUE FALSE 0 0 TRUE
10 10 30 60) 10 10 30 60)

View File

@ -67,7 +67,7 @@
(gimp-palette-set-foreground '(255 255 255)) (gimp-palette-set-foreground '(255 255 255))
(gimp-blend text-shadow-layer FG-BG-RGB NORMAL (gimp-blend text-shadow-layer FG-BG-RGB NORMAL
SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 1 1) 0 0 1 1)
@ -76,7 +76,7 @@
(gimp-palette-set-background blend-bg) (gimp-palette-set-background blend-bg)
(gimp-blend blend-layer FG-BG-RGB NORMAL (gimp-blend blend-layer FG-BG-RGB NORMAL
LINEAR 100 0 REPEAT-NONE FALSE GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 0 width 0) 0 0 width 0)

View File

@ -122,7 +122,7 @@
(gimp-layer-set-preserve-trans text-layer TRUE) (gimp-layer-set-preserve-trans text-layer TRUE)
(gimp-blend text-layer CUSTOM NORMAL (gimp-blend text-layer CUSTOM NORMAL
LINEAR 100 0 REPEAT-NONE gradient-reverse GRADIENT-LINEAR 100 0 REPEAT-NONE gradient-reverse
FALSE 0.2 3 TRUE FALSE 0.2 3 TRUE
padding padding padding padding
(- text-width padding 1) (- text-height padding 1)) (- text-width padding 1) (- text-height padding 1))
@ -146,7 +146,7 @@
(gimp-palette-set-background '(0 0 0)) (gimp-palette-set-background '(0 0 0))
(gimp-blend bg-layer FG-BG-RGB NORMAL (gimp-blend bg-layer FG-BG-RGB NORMAL
LINEAR 100 0 REPEAT-NONE FALSE GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
FALSE 0.2 3 TRUE FALSE 0.2 3 TRUE
(- img-width fade-width) 0 (- img-width 1) 0) (- img-width fade-width) 0 (- img-width 1) 0)

View File

@ -69,7 +69,7 @@
0) 0)
(gimp-blend drawable FG-BG-RGB NORMAL (gimp-blend drawable FG-BG-RGB NORMAL
BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE GRADIENT-BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
(/ (+ (* 2 ribbon-spacing) ribbon-width -1) 2) 0 0 0) (/ (+ (* 2 ribbon-spacing) ribbon-width -1) 2) 0 0 0)
@ -85,7 +85,7 @@
0) 0)
(gimp-blend drawable FG-BG-RGB NORMAL (gimp-blend drawable FG-BG-RGB NORMAL
BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE GRADIENT-BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE
FALSE 0 0 TRUE FALSE 0 0 TRUE
0 (/ (+ (* 2 ribbon-spacing) ribbon-width -1) 2) 0 0) 0 (/ (+ (* 2 ribbon-spacing) ribbon-width -1) 2) 0 0)

View File

@ -55,20 +55,20 @@ siod_get_output_file (void)
return siod_output; return siod_output;
} }
void void
siod_set_output_file (FILE *file) siod_set_output_file (FILE *file)
{ {
siod_output = file; siod_output = file;
} }
int int
siod_get_verbose_level (void) siod_get_verbose_level (void)
{ {
return siod_verbose_level; return siod_verbose_level;
} }
void void
siod_set_verbose_level (gint verbose_level) siod_set_verbose_level (gint verbose_level)
{ {
siod_verbose_level = verbose_level; siod_verbose_level = verbose_level;
@ -107,7 +107,7 @@ static void init_procedures (void);
static gboolean register_scripts = FALSE; static gboolean register_scripts = FALSE;
void void
siod_init (gboolean local_register_scripts) siod_init (gboolean local_register_scripts)
{ {
char *siod_argv[] = char *siod_argv[] =
@ -147,10 +147,10 @@ static LISP script_fu_quit_call (LISP a);
/********* /*********
Below can be found the functions responsible for registering the gimp functions Below can be found the functions responsible for registering the gimp functions
and types against the scheme interpreter. and types against the scheme interpreter.
********/ ********/
@ -178,7 +178,7 @@ init_procedures (void)
init_lsubr ("script-fu-register", script_fu_register_call); init_lsubr ("script-fu-register", script_fu_register_call);
init_lsubr ("script-fu-quit", script_fu_quit_call); init_lsubr ("script-fu-quit", script_fu_quit_call);
gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*", gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*",
&num_procs, &proc_list); &num_procs, &proc_list);
/* Register each procedure as a scheme func */ /* Register each procedure as a scheme func */
@ -187,13 +187,13 @@ init_procedures (void)
proc_name = g_strdup (proc_list[i]); proc_name = g_strdup (proc_list[i]);
/* lookup the procedure */ /* lookup the procedure */
if (gimp_procedural_db_proc_info (proc_name, if (gimp_procedural_db_proc_info (proc_name,
&proc_blurb, &proc_blurb,
&proc_help, &proc_help,
&proc_author, &proc_author,
&proc_copyright, &proc_copyright,
&proc_date, &proc_date,
&proc_type, &proc_type,
&nparams, &nreturn_vals, &nparams, &nreturn_vals,
&params, &return_vals)) &params, &return_vals))
{ {
@ -221,8 +221,8 @@ init_procedures (void)
args = cons (cintern (proc_name), args); args = cons (cintern (proc_name), args);
/* set the acture pdb procedure name */ /* set the acture pdb procedure name */
code = cons (cons (cintern ("quote"), code = cons (cons (cintern ("quote"),
cons (cintern (proc_list[i]), NIL)), cons (cintern (proc_list[i]), NIL)),
code); code);
code = cons (cintern ("gimp-proc-db-call"), code); code = cons (cintern ("gimp-proc-db-call"), code);
@ -247,17 +247,17 @@ init_constants (void)
{ {
gchar *gimp_plugin_dir; gchar *gimp_plugin_dir;
setvar (cintern ("gimp-data-dir"), setvar (cintern ("gimp-data-dir"),
strcons (-1, (gchar *) gimp_data_directory ()), NIL); strcons (-1, (gchar *) gimp_data_directory ()), NIL);
gimp_plugin_dir = gimp_gimprc_query ("gimp_plugin_dir"); gimp_plugin_dir = gimp_gimprc_query ("gimp_plugin_dir");
if (gimp_plugin_dir) if (gimp_plugin_dir)
{ {
setvar (cintern ("gimp-plugin-dir"), setvar (cintern ("gimp-plugin-dir"),
strcons (-1, gimp_plugin_dir), NIL); strcons (-1, gimp_plugin_dir), NIL);
g_free (gimp_plugin_dir); g_free (gimp_plugin_dir);
} }
/* Generated constants */ /* Generated constants */
init_generated_constants (); init_generated_constants ();
@ -322,6 +322,18 @@ init_constants (void)
setvar (cintern ("VERTICAL"), flocons (GIMP_ORIENTATION_VERTICAL), NIL); setvar (cintern ("VERTICAL"), flocons (GIMP_ORIENTATION_VERTICAL), NIL);
setvar (cintern ("UNKNOWN"), flocons (GIMP_ORIENTATION_UNKNOWN), NIL); setvar (cintern ("UNKNOWN"), flocons (GIMP_ORIENTATION_UNKNOWN), NIL);
setvar (cintern ("LINEAR"), flocons (GIMP_GRADIENT_LINEAR), NIL);
setvar (cintern ("BILINEAR"), flocons (GIMP_GRADIENT_BILINEAR), NIL);
setvar (cintern ("RADIAL"), flocons (GIMP_GRADIENT_RADIAL), NIL);
setvar (cintern ("SQUARE"), flocons (GIMP_GRADIENT_SQUARE), NIL);
setvar (cintern ("CONICAL-SYMMETRIC"), flocons (GIMP_GRADIENT_CONICAL_SYMMETRIC), NIL);
setvar (cintern ("CONICAL-ASYMMETRIC"), flocons (GIMP_GRADIENT_CONICAL_ASYMMETRIC), NIL);
setvar (cintern ("SHAPEBURST-ANGULAR"), flocons (GIMP_GRADIENT_SHAPEBURST_ANGULAR), NIL);
setvar (cintern ("SHAPEBURST-SPHERICAL"), flocons (GIMP_GRADIENT_SHAPEBURST_SPHERICAL), NIL);
setvar (cintern ("SHAPEBURST-DIMPLED"), flocons (GIMP_GRADIENT_SHAPEBURST_DIMPLED), NIL);
setvar (cintern ("SPIRAL-CLOCKWISE"), flocons (GIMP_GRADIENT_SPIRAL_CLOCKWISE), NIL);
setvar (cintern ("SPIRAL-ANTICLOCKWISE"), flocons (GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE), NIL);
/* Useful misc stuff */ /* Useful misc stuff */
setvar (cintern ("TRUE"), flocons (TRUE), NIL); setvar (cintern ("TRUE"), flocons (TRUE), NIL);
setvar (cintern ("FALSE"), flocons (FALSE), NIL); setvar (cintern ("FALSE"), flocons (FALSE), NIL);
@ -420,7 +432,7 @@ marshall_proc_db_call (LISP a)
"The procedure to be executed and the arguments it requires " "The procedure to be executed and the arguments it requires "
"(possibly none) must be specified.", NIL); "(possibly none) must be specified.", NIL);
/* Derive the pdb procedure name from the argument /* Derive the pdb procedure name from the argument
or first argument of a list */ or first argument of a list */
if (TYPEP (a, tc_cons)) if (TYPEP (a, tc_cons))
proc_name = get_c_string (car (a)); proc_name = get_c_string (car (a));
@ -431,9 +443,9 @@ marshall_proc_db_call (LISP a)
script_fu_report_cc (proc_name); script_fu_report_cc (proc_name);
/* Attempt to fetch the procedure from the database */ /* Attempt to fetch the procedure from the database */
if (! gimp_procedural_db_proc_info (proc_name, if (! gimp_procedural_db_proc_info (proc_name,
&proc_blurb, &proc_blurb,
&proc_help, &proc_help,
&proc_author, &proc_author,
&proc_copyright, &proc_copyright,
&proc_date, &proc_date,
@ -457,7 +469,7 @@ marshall_proc_db_call (LISP a)
/* Check the supplied number of arguments */ /* Check the supplied number of arguments */
if ((nlength (a) - 1) != nparams) if ((nlength (a) - 1) != nparams)
{ {
g_snprintf (error_str, sizeof (error_str), g_snprintf (error_str, sizeof (error_str),
"Invalid arguments supplied to %s--(# args: %ld, expecting: %d)", "Invalid arguments supplied to %s--(# args: %ld, expecting: %d)",
proc_name, (nlength (a) - 1), nparams); proc_name, (nlength (a) - 1), nparams);
return my_err (error_str, NIL); return my_err (error_str, NIL);
@ -530,7 +542,7 @@ marshall_proc_db_call (LISP a)
if (success) if (success)
{ {
args[i].type = GIMP_PDB_INT32ARRAY; args[i].type = GIMP_PDB_INT32ARRAY;
args[i].data.d_int32array = args[i].data.d_int32array =
(gint32*) (car (a))->storage_as.long_array.data; (gint32*) (car (a))->storage_as.long_array.data;
} }
break; break;
@ -541,7 +553,7 @@ marshall_proc_db_call (LISP a)
if (success) if (success)
{ {
args[i].type = GIMP_PDB_INT16ARRAY; args[i].type = GIMP_PDB_INT16ARRAY;
args[i].data.d_int16array = args[i].data.d_int16array =
(gint16*) (car (a))->storage_as.long_array.data; (gint16*) (car (a))->storage_as.long_array.data;
} }
break; break;
@ -552,7 +564,7 @@ marshall_proc_db_call (LISP a)
if (success) if (success)
{ {
args[i].type = GIMP_PDB_INT8ARRAY; args[i].type = GIMP_PDB_INT8ARRAY;
args[i].data.d_int8array = args[i].data.d_int8array =
(gint8*) (car (a))->storage_as.string.data; (gint8*) (car (a))->storage_as.string.data;
} }
break; break;
@ -563,7 +575,7 @@ marshall_proc_db_call (LISP a)
if (success) if (success)
{ {
args[i].type = GIMP_PDB_FLOATARRAY; args[i].type = GIMP_PDB_FLOATARRAY;
args[i].data.d_floatarray = args[i].data.d_floatarray =
(car (a))->storage_as.double_array.data; (car (a))->storage_as.double_array.data;
} }
break; break;
@ -586,7 +598,7 @@ marshall_proc_db_call (LISP a)
num_strings = args[i - 1].data.d_int32; num_strings = args[i - 1].data.d_int32;
if (nlength (list) != num_strings) if (nlength (list) != num_strings)
return my_err ("String array argument has incorrectly specified length", NIL); return my_err ("String array argument has incorrectly specified length", NIL);
array = args[i].data.d_stringarray = array = args[i].data.d_stringarray =
g_new (char *, num_strings); g_new (char *, num_strings);
for (j = 0; j < num_strings; j++) for (j = 0; j < num_strings; j++)
@ -619,7 +631,7 @@ marshall_proc_db_call (LISP a)
break; break;
case GIMP_PDB_REGION: case GIMP_PDB_REGION:
return my_err ("Regions are currently unsupported as arguments", return my_err ("Regions are currently unsupported as arguments",
car (a)); car (a));
break; break;
@ -684,12 +696,12 @@ marshall_proc_db_call (LISP a)
break; break;
case GIMP_PDB_BOUNDARY: case GIMP_PDB_BOUNDARY:
return my_err ("Boundaries are currently unsupported as arguments", return my_err ("Boundaries are currently unsupported as arguments",
car (a)); car (a));
break; break;
case GIMP_PDB_PATH: case GIMP_PDB_PATH:
return my_err ("Paths are currently unsupported as arguments", return my_err ("Paths are currently unsupported as arguments",
car (a)); car (a));
break; break;
@ -701,9 +713,9 @@ marshall_proc_db_call (LISP a)
args[i].type = GIMP_PDB_PARASITE; args[i].type = GIMP_PDB_PARASITE;
/* parasite->name */ /* parasite->name */
intermediate_val = car (a); intermediate_val = car (a);
args[i].data.d_parasite.name = args[i].data.d_parasite.name =
get_c_string (car (intermediate_val)); get_c_string (car (intermediate_val));
/* parasite->flags */ /* parasite->flags */
intermediate_val = cdr (intermediate_val); intermediate_val = cdr (intermediate_val);
args[i].data.d_parasite.flags = get_c_long (car(intermediate_val)); args[i].data.d_parasite.flags = get_c_long (car(intermediate_val));
@ -740,7 +752,7 @@ marshall_proc_db_call (LISP a)
{ {
strcpy (error_str, "Procedural database execution did not return a status:\n "); strcpy (error_str, "Procedural database execution did not return a status:\n ");
lprin1s (a_saved, error_str + strlen(error_str)); lprin1s (a_saved, error_str + strlen(error_str));
return my_err (error_str, NIL); return my_err (error_str, NIL);
} }
@ -766,22 +778,22 @@ marshall_proc_db_call (LISP a)
switch (return_vals[i].type) switch (return_vals[i].type)
{ {
case GIMP_PDB_INT32: case GIMP_PDB_INT32:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_INT16: case GIMP_PDB_INT16:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_INT8: case GIMP_PDB_INT8:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_FLOAT: case GIMP_PDB_FLOAT:
return_val = cons (flocons (values[i + 1].data.d_float), return_val = cons (flocons (values[i + 1].data.d_float),
return_val); return_val);
break; break;
@ -799,7 +811,7 @@ marshall_proc_db_call (LISP a)
array = arcons (tc_long_array, values[i].data.d_int32, 0); array = arcons (tc_long_array, values[i].data.d_int32, 0);
for (j = 0; j < values[i].data.d_int32; j++) for (j = 0; j < values[i].data.d_int32; j++)
{ {
array->storage_as.long_array.data[j] = array->storage_as.long_array.data[j] =
values[i + 1].data.d_int32array[j]; values[i + 1].data.d_int32array[j];
} }
return_val = cons (array, return_val); return_val = cons (array, return_val);
@ -818,7 +830,7 @@ marshall_proc_db_call (LISP a)
array = arcons (tc_byte_array, values[i].data.d_int32, 0); array = arcons (tc_byte_array, values[i].data.d_int32, 0);
for (j = 0; j < values[i].data.d_int32; j++) for (j = 0; j < values[i].data.d_int32; j++)
{ {
array->storage_as.string.data[j] = array->storage_as.string.data[j] =
values[i + 1].data.d_int8array[j]; values[i + 1].data.d_int8array[j];
} }
return_val = cons (array, return_val); return_val = cons (array, return_val);
@ -833,7 +845,7 @@ marshall_proc_db_call (LISP a)
array = arcons (tc_double_array, values[i].data.d_int32, 0); array = arcons (tc_double_array, values[i].data.d_int32, 0);
for (j = 0; j < values[i].data.d_int32; j++) for (j = 0; j < values[i].data.d_int32; j++)
{ {
array->storage_as.double_array.data[j] = array->storage_as.double_array.data[j] =
values[i + 1].data.d_floatarray[j]; values[i + 1].data.d_floatarray[j];
} }
return_val = cons (array, return_val); return_val = cons (array, return_val);
@ -853,7 +865,7 @@ marshall_proc_db_call (LISP a)
for (j = 0; j < num_strings; j++) for (j = 0; j < num_strings; j++)
{ {
string_len = strlen (array[j]); string_len = strlen (array[j]);
string_array = cons (strcons (string_len, array[j]), string_array = cons (strcons (string_len, array[j]),
string_array); string_array);
} }
@ -880,32 +892,32 @@ marshall_proc_db_call (LISP a)
break; break;
case GIMP_PDB_DISPLAY: case GIMP_PDB_DISPLAY:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_IMAGE: case GIMP_PDB_IMAGE:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_LAYER: case GIMP_PDB_LAYER:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_CHANNEL: case GIMP_PDB_CHANNEL:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_DRAWABLE: case GIMP_PDB_DRAWABLE:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
case GIMP_PDB_SELECTION: case GIMP_PDB_SELECTION:
return_val = cons (flocons (values[i + 1].data.d_int32), return_val = cons (flocons (values[i + 1].data.d_int32),
return_val); return_val);
break; break;
@ -930,15 +942,15 @@ marshall_proc_db_call (LISP a)
string_len = strlen (values[i + 1].data.d_parasite.name); string_len = strlen (values[i + 1].data.d_parasite.name);
name = strcons (string_len, name = strcons (string_len,
values[i + 1].data.d_parasite.name); values[i + 1].data.d_parasite.name);
flags = flocons (values[i + 1].data.d_parasite.flags); flags = flocons (values[i + 1].data.d_parasite.flags);
data = arcons (tc_byte_array, data = arcons (tc_byte_array,
values[i+1].data.d_parasite.size, 0); values[i+1].data.d_parasite.size, 0);
memcpy(data->storage_as.string.data, memcpy(data->storage_as.string.data,
values[i+1].data.d_parasite.data, values[i+1].data.d_parasite.data,
values[i+1].data.d_parasite.size); values[i+1].data.d_parasite.size);
intermediate_val = cons (name, intermediate_val = cons (name,
cons(flags, cons(data, NIL))); cons(flags, cons(data, NIL)));
return_val = cons (intermediate_val, return_val); return_val = cons (intermediate_val, return_val);
} }